Reference
Environment Variables
A quick reference to every environment variable grouped by where it lives, with required values marked. See the Environment Variables guide for full descriptions.
A lookup table of all environment variables, grouped by where each one belongs.
For full descriptions, defaults, and setup steps, see the narrative guide:
Environment Variables. The
environment doctor (bun check-env) validates these for you.
* marks a value that is required for the app to run.
Product app — apps/app/.env
Browser-exposed values are prefixed NEXT_PUBLIC_. The SENTRY_* build values
are server-only.
| Variable | Notes |
|---|---|
NEXT_PUBLIC_CONVEX_URL * | Convex deployment URL. |
NEXT_PUBLIC_CONVEX_SITE_URL * | Convex HTTP actions URL (auth). |
NEXT_PUBLIC_APP_URL * | Canonical app metadata URL; auth client base and callbacks. |
NEXT_PUBLIC_DOCS_URL | Optional documentation destination for the product app; the Documentation links are hidden when unset. |
NEXT_PUBLIC_ANALYTICS_ENABLED | true to enable browser analytics. |
NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN | PostHog token (phc_…) when analytics on. |
NEXT_PUBLIC_POSTHOG_HOST | PostHog host; defaults to US cloud. |
NEXT_PUBLIC_SENTRY_DSN | Sentry client/server reporting. |
NEXT_PUBLIC_AUTH_MICROSOFT_ENABLED | true to render the Microsoft sign-in button. |
SENTRY_AUTH_TOKEN / SENTRY_ORG / SENTRY_PROJECT | Sentry sourcemap upload. |
Marketing site — apps/marketing/.env
All public; the site builds with local defaults out of the box.
| Variable | Notes |
|---|---|
NEXT_PUBLIC_SITE_URL | Canonical marketing URL. |
NEXT_PUBLIC_APP_URL | "View demo" / app destination. |
NEXT_PUBLIC_DOCS_URL | Documentation site link. |
NEXT_PUBLIC_PURCHASE_URL | Optional checkout URL (CTAs degrade gracefully if unset). |
NEXT_PUBLIC_ANALYTICS_ENABLED / NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN / NEXT_PUBLIC_POSTHOG_HOST | Analytics (optional). |
Documentation site — apps/docs/.env
| Variable | Notes |
|---|---|
NEXT_PUBLIC_DOCS_URL | Canonical documentation URL. |
NEXT_PUBLIC_SITE_URL | External marketing-site destination. |
Backend — Convex deployment
Set in the Convex dashboard (and packages/backend/.env for local tooling).
These are never exposed to the browser.
| Group | Variables |
|---|---|
| Identity * | APP_NAME, SITE_URL, CONVEX_SITE_URL |
| Auth * | BETTER_AUTH_SECRET, AUTH_GOOGLE_ID, AUTH_GOOGLE_SECRET |
| Auth (optional) | AUTH_MICROSOFT_ID, AUTH_MICROSOFT_SECRET, AUTH_MICROSOFT_TENANT_ID, AUTH_TRUSTED_ORIGINS |
| Billing | BILLING_PROVIDER, POLAR_*, STRIPE_*, LEMON_SQUEEZY_* (see Billing Plans) |
RESEND_API_KEY, RESEND_FROM_EMAIL, RESEND_AUTH_FROM_EMAIL, RESEND_WEBHOOK_SECRET | |
| Analytics | ANALYTICS_ENABLED, POSTHOG_COMPONENT_ENABLED, POSTHOG_PROJECT_TOKEN, POSTHOG_HOST, POSTHOG_PERSONAL_API_KEY |
| Admin | SUPER_ADMIN_EMAILS, SUPER_ADMIN_REQUIRE_2FA |