Skip to content

Environment variables

Copy .env.example to .env. Never commit secrets — production uses Cloudflare secrets / .dev.vars.

VariableRequiredWhat it does
TURSO_DATABASE_URLyesDB URL (file:./local.db locally, libsql://… live)
TURSO_AUTH_TOKENlive onlyTurso auth token
BETTER_AUTH_SECRETyesSession encryption (32+ chars)
BETTER_AUTH_URLyesCanonical URL (drives email links)
PAYMENT_PROVIDERnododo (default) / stripe / lemonsqueezy
DODO_PAYMENTS_API_KEYif dodoCheckout + API calls
DODO_PAYMENTS_ENVIRONMENTnotest_mode (default) / live_mode
DODO_PAYMENTS_WEBHOOK_SECRETif dodoStandard Webhooks verification
DODO_PRODUCTS_JSONif sellingproduct_id → tier catalog (see Payments)
DODO_PORTAL_URLnoCustomer portal base URL
STRIPE_SECRET_KEYif stripeStripe API
STRIPE_WEBHOOK_SECRETif stripeStripe signature verify
LEMONSQUEEZY_API_KEYif LSLS API
LEMONSQUEEZY_STORE_IDif LSCheckout store
LEMONSQUEEZY_WEBHOOK_SECRETif LSLS signature verify
RESEND_API_KEYif emailSending (missing = skip silently)
EMAIL_FROMif emailSender address
SITE_URLyesLinks, callbacks, sitemap
PUBLIC_POSTHOG_KEY / PUBLIC_POSTHOG_HOSTnoAnalytics