Skip to content

Environment Variables

All configuration is driven by an environment file copied from env.sample (.env.dev for development, .env for production). Boolean values must be lowercase true / false. This page is the grouped reference; the deeper topics have their own pages.

Django / runtime

VariablePurpose
SECRET_KEYDjango secret key — change for production
DJANGO_DEBUGtrue for dev, false for production
ALLOWED_HOSTSComma-separated hostnames
CSRF_TRUSTED_ORIGINS, CORS_ALLOWED_ORIGINSOrigins allowed to call the API
SITE_DOMAIN, SITE_NAMEPublic site domain (no protocol) — used for OAuth and webhooks
FRONTEND_URL, VITE_API_BASE_URLFrontend URL and the API base the frontend calls
DJANGO_SUPERUSER_USERNAME / _EMAIL / _PASSWORDAuto-created superuser on first run

Database

Select an engine with DB_ENGINE. See Database for details.

Celery / Redis / cache

VariablePurpose
CELERY_BROKER_URL, CELERY_RESULT_BACKENDPoint to redis://redis:6379/0
CELERY_CONCURRENCY, CELERY_LOG_LEVELWorker tuning
CACHE_BACKENDredis
FLOWER_HOST_PORTFlower monitoring port (dev)

Email / notifications

See Email & notifications.

VariablePurpose
EMAIL_BACKENDsmtp backend for production, console for dev
EMAIL_HOST, EMAIL_PORT, EMAIL_HOST_USER, EMAIL_HOST_PASSWORD, EMAIL_USE_TLSOutbound SMTP for notifications
DEFAULT_FROM_EMAILFrom address
AUTO_ASSIGN_EMAIL_DOMAINDomain for auto-assigned inbound mailboxes (Haraka)
HARAKA_SMTP_PORT, HARAKA_EMAIL_BASE_DIRInbound SMTP settings

OAuth (optional)

See OAuth login.

VariablePurpose
GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRETGoogle login
ACCOUNT_DEFAULT_HTTP_PROTOCOLhttp for dev, https for production

AI models / providers

env.sample includes legacy Azure OpenAI variables (AZURE_OPENAI_*), but model providers are configured in the management console after startup, not primarily through .env. See LLM providers.

Monitoring (optional)

SENTRY_* and VITE_SENTRY_* — leave empty to disable Sentry.