Environment Variables Configuration

Set the minimum environment variables required to run the app locally.

For local development, put secrets and local overrides in ./.env.local.

This page intentionally avoids assuming committed ./.env.local* files already exist in your checkout.

Minimum Local Setup

DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
BETTER_AUTH_SECRET=replace-me
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_PRODUCT_NAME=My App
NEXT_PUBLIC_DEFAULT_LOCALE=en
NEXT_PUBLIC_ACCOUNT_MODE=hybrid
MAILER_PROVIDER=nodemailer
EMAIL_SENDER=My App <noreply@example.com>

If you use the provided Docker services, adjust database and mailer values to match that local setup.

Where Config Is Parsed

Use these files to see what the app actually expects:

  • apps/web/config/app.config.ts
  • apps/web/config/auth.config.ts
  • apps/web/config/account-mode.config.ts
  • apps/web/config/feature-flags.config.ts

Sensitive Values

Keep secrets such as these in ./.env.local or in your deployment provider:

  • BETTER_AUTH_SECRET
  • DATABASE_URL
  • TURNSTILE_SECRET_KEY
  • RESEND_API_KEY
  • SMTP credentials
  • Stripe and Polar secrets

Next Step

For the full variable reference, see Environment Variables Reference.