Edit this page

Environment variables

Every variable in .env.example, what it's for, and which features need it.

Copy .env.example to .env and fill in what you need. Never commit .env.

Hosts

Variable Purpose
FRONTEND_HOST Public URL of the web app, used in emails and redirects. Locally http://localhost:8082.
API_HOST Public URL of the API. Locally http://localhost:3000.
WHOP_API_HOST An https:// URL for Whop callbacks, such as an ngrok tunnel, in local development.
PORT Port the API listens on. Defaults to 3000.

Sign-in providers

Variable Purpose
GITHUB_ID, GITHUB_SECRET GitHub OAuth app. Needed for GitHub sign-in, private imports and solution checks.
BITBUCKET_ID, BITBUCKET_SECRET Bitbucket OAuth.
GOOGLE_ID, GOOGLE_SECRET Google sign-in.
FACEBOOK_ID, FACEBOOK_SECRET Facebook sign-in.
SECRET_PHRASE Secret used to sign tokens. Use a long random value.
GOOGLE_RECAPTCHA_SITE_KEY reCAPTCHA on sign-up.

Payments

Variable Purpose
PAYMENT_PROVIDER whop or stripe. Defaults to stripe.
WHOP_API_KEY Company API key of the platform business.
WHOP_COMPANY_ID The platform company, biz_…. Connected companies are created under it.
WHOP_APP_ID The Whop app ID.
WHOP_WEBHOOK_SECRET Verifies POST /webhooks/whop.
WHOP_SANDBOX true to use Whop’s sandbox.
STRIPE_KEY, STRIPE_PUBKEY Stripe secret and publishable keys.
STRIPE_WEBHOOK_SECRET_PLATFORM, STRIPE_WEBHOOK_SECRET_CONNECT Verify the Stripe webhooks.
PAYPAL_HOST Legacy PayPal API host.

The frontend build reads PAYMENT_PROVIDER, STRIPE_PUBKEY and WHOP_COMPANY_ID. Rebuild it after changing them.

Email and notifications

Variable Purpose
SENDGRID_API_KEY Sends transactional email.
MAILCHIMP_API_KEY, MAILCHIMP_LIST_ID Newsletter sign-ups.
SLACK_WEBHOOK_URL, SLACK_TOKEN, SLACK_CHANNEL_ID Notifications to the team’s Slack.
SLACK_CHANNEL_INVITE_LINK The community invite link shown in the app.

Scheduled jobs

Variable Purpose
INNGEST_ENABLED true to mount /api/inngest and let Inngest own migrated jobs.
INNGEST_DEV 1 to use the local Inngest Dev Server.
INNGEST_EVENT_KEY, INNGEST_SIGNING_KEY Inngest Cloud keys, in production.

Database with Docker

Variable Purpose
POSTGRES_PASSWORD, POSTGRES_DB, POSTGRES_PORT Used by docker-compose.

Next steps