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:Where each secret goes
Set backend values with
npx convex env set <NAME> <value> against your deployment (for a self-hosted backend, add --env-file convex.env.local). After changing convex/, deploy it with npx convex deploy. Never point a production deploy at a development env file.
Public and safe to expose: NEXT_PUBLIC_APP_URL, NEXT_PUBLIC_CONVEX_URL, NEXT_PUBLIC_POSTHOG_TOKEN, NEXT_PUBLIC_POSTHOG_HOST, and the origins in app.cspConnectSrc.
Use different values in staging and production for every secret, the app URL, the Convex deployment, identity provider and Stripe credentials, buckets, and telemetry projects. The config schema rejects some mixed combinations, but keeping environments apart is the operator’s job.
Better Auth and email
Whenauth.provider="better-auth", BETTER_AUTH_DATABASE_URL points at a
separate auth-scoped Postgres database owned by Better Auth. It is unrelated to
application data, which always lives in Convex.
Transactional email is sent from the Convex backend, so the selected
OVERLAY_EMAIL_* values must exist on the backend as well as the app. Keep
OVERLAY_EMAIL_PROVIDER=none to turn off all Overlay transactional email. Your
identity provider still sends its own verification and password-reset messages.