Skip to main content
Environment variables override overlay.config.json. Put secrets in the runtime secret manager; keep JSON config focused on non-secret deployment shape.

Base Runtime

Provider Variables

Private Deployment Defaults

For private deployments, disable unapproved processors in both server and client-visible env:

Backend-specific placement

When the app-data provider is Convex, configure:
  • INTERNAL_API_SECRET, matching the app runtime.
  • If transactional email is enabled, the same OVERLAY_EMAIL_* provider, sender, and provider-credential values used by the app runtime. Convex owns the durable delivery action for this backend.
Session and crypto secrets belong only on the Next.js app runtime:
  • SESSION_SECRET
  • SESSION_TRANSFER_KEY
  • SESSION_COOKIE_ENCRYPTION_KEY
  • INTERNAL_SERVICE_AUTH_SECRET
After editing convex/, push both deployments:
Do not pass .env.local to production Convex deploy commands; use the package scripts so production and development deployments receive the right environment. When the app-data provider is Postgres, omit NEXT_PUBLIC_CONVEX_URL, DEV_NEXT_PUBLIC_CONVEX_URL, CONVEX_DEPLOYMENT, and INTERNAL_API_SECRET. Use OVERLAY_DATABASE_URL for application data and BETTER_AUTH_DATABASE_URL for Better Auth. They must use separate databases, roles, and migration lifecycles. Postgres deployments deliver the same outbox through the supervised npm run app-db:worker process. Keep OVERLAY_EMAIL_PROVIDER=none to disable all Overlay transactional email. WorkOS or the selected IdP remains responsible for verification and password-reset messages in every mode. Convex-backed deployments run transactional delivery from convex/crons.ts, so the selected provider variables must also exist in the matching Convex deployment; setting them only on Vercel does not configure the Convex email worker.