# Enterprise Deployment Environment Variables # Copy to .env: cp .env.example .env # # Vars hardcoded in docker-compose.yml (don't set here unless overriding): # AUTH_MODE, WAITLIST_ENABLED, DATABASE_DRIVER, DATABASE_URL, # OIDC_ISSUER, OIDC_DISCOVERY_URL, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, BETTER_AUTH_URL, # APP_URL, TRUSTED_ORIGINS, CORS_ORIGINS, # POWERSYNC_URL, POWERSYNC_JWT_SECRET, POWERSYNC_JWT_KID, RATE_LIMIT_ENABLED # Ports — change these if they conflict with your dev stack FRONTEND_PORT=3000 BACKEND_PORT=8000 KEYCLOAK_PORT=8180 POSTGRES_PORT=5434 POWERSYNC_PORT=8081 # General settings LOG_LEVEL=INFO # Required — used to sign bearer tokens and session cookies. Generate with: openssl rand -base64 32 BETTER_AUTH_SECRET= # Health Check Configuration # Bearer token for deep health routes at /v1/health/{database,powersync,email,models}. MONITORING_TOKEN= # API Keys FIREWORKS_API_KEY= EXA_API_KEY= ANTHROPIC_API_KEY= # Thunderbolt Inference THUNDERBOLT_INFERENCE_URL= THUNDERBOLT_INFERENCE_API_KEY= # OAuth Settings (optional — for Google/Microsoft sign-in alongside OIDC) GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= MICROSOFT_CLIENT_ID= MICROSOFT_CLIENT_SECRET= # Analytics (optional) POSTHOG_HOST= POSTHOG_API_KEY= # Branding (optional) — see docs/self-hosting/configuration.md#branding. # BRANDING is one line of JSON; single-quote it so the quotes and `#` survive. # BRANDING='{"appName":"Acme AI","cssVars":{"light":{"primary":"#4f46e5"}}}' # Build — source maps are disabled by default for security (prevents exposing source code via .map files). # Enable in CI to upload maps to PostHog for error tracking. ENABLE_SOURCEMAP=false # OpenTelemetry (optional) OTEL_EXPORTER_OTLP_ENDPOINT= OTEL_EXPORTER_OTLP_TOKEN= # PowerSync # PowerSync verifies this JWT locally and never calls back. Revocation cuts the # stream through the sync rules; this only bounds how long a device can keep # reconnecting. Matches the backend default — keep it short. POWERSYNC_TOKEN_EXPIRY_SECONDS=300 # Organizational key escrow (optional, off by default). # Turn on ONLY after the frontend image has been built with # VITE_ORG_ESCROW_PUBLIC_KEY set to the matching public key — otherwise every # encryption setup, rotation and upgrade fails with a 400. Generate the pair # with scripts/org-escrow-keygen.ts and keep the private half out-of-band. ORG_ESCROW_ENABLED=false # Resend (email — optional) RESEND_API_KEY= # Sender address for outgoing email. Resend only sends from a domain YOUR account # has verified, so the built-in default will be rejected on a self-hosted deployment. EMAIL_FROM= # Full access Resend key used only by /v1/health/email; RESEND_API_KEY may stay sending-only. RESEND_MONITORING_API_KEY=