Environment Variables
Use .env.example as the source of truth and copy it to .env:
cp .env.example .env
Core runtime variables
These should always be set intentionally.
ENVIRONMENT—devorprodDEBUG— keepoff/Falseoutside local developmentSECRET_KEY— Django secret keySITE_URL— canonical app URLMEDIA_ROOT— path for generated artifacts and uploaded files
Database
POSTGRES_DBPOSTGRES_USERPOSTGRES_PASSWORDPOSTGRES_HOSTPOSTGRES_PORT
Redis + background jobs
REDIS_HOSTREDIS_PORTREDIS_PASSWORDREDIS_DB
Django Q2 uses Redis for queueing and worker communication.
Project generation
COOKIECUTTER_TEMPLATE_PATH— template source used for generated projects
If not set, Djass uses the default template path configured in settings.
Optional integrations
Enable only what you actively use.
Authentication
GITHUB_CLIENT_IDGITHUB_CLIENT_SECRET
Storage
AWS_S3_ENDPOINT_URLAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_S3_BUCKET_NAME
If AWS_S3_ENDPOINT_URL is empty, filesystem storage is used.
Email and newsletter
MAILGUN_API_KEYMAILGUN_SENDER_DOMAIN(e.g.mg.gregagi.com)MAILGUN_API_URL(optional, sethttps://api.eu.mailgun.netfor EU-region accounts)DEFAULT_FROM_EMAIL(optional sender override)SERVER_EMAIL(optional error sender override)BUTTONDOWN_API_KEY
Customer support
CHATWOOT_BASE_URL(e.g.https://chatwoot.example.com)CHATWOOT_WEBSITE_TOKEN(public website inbox token)
Observability
SENTRY_DSNSENTRY_ENABLED(optional; defaults to enabled only whenSENTRY_DSNis set inprod)SENTRY_ENVIRONMENT(optional Sentry environment override)SENTRY_RELEASE(optional release/version, ideally the deployed commit SHA)SENTRY_TRACES_SAMPLE_RATE(default1.0)SENTRY_PROFILE_SESSION_SAMPLE_RATE(default1.0)SENTRY_ENABLE_LOGS(defaultTrue)SENTRY_SEND_DEFAULT_PII(defaultFalse)SENTRY_INCLUDE_LOCAL_VARIABLES(defaultFalse)SENTRY_MAX_BREADCRUMBS(default100)SENTRY_AI_INCLUDE_PROMPTS(defaultFalse; set toTrueonly if prompt/response capture is acceptable)SENTRY_AI_HANDLED_TOOL_CALL_EXCEPTIONS(defaultTrue)LOGFIRE_TOKENPOSTHOG_API_KEY(project API keyphc_...used by Djass capture calls)POSTHOG_HOST(https://us.i.posthog.comorhttps://eu.i.posthog.com)
Payments
PAYMENTS_ENABLED(defaultFalse) — when disabled, checkout and customer portal routes stay dormant; when enabled, project generation requires active account accessGRANT_PRO_MEMBERSHIP_ON_SIGNUP(defaultTrue) — assigns new users subscribed/pro access immediatelySTRIPE_SECRET_KEYSTRIPE_WEBHOOK_SECRETSTRIPE_PRICE_ID_ONE_TIMESTRIPE_ONE_TIME_AMOUNT_CENTS(default99900)
AI provider
OPENAI_API_KEY
Optional model overrides:
OPENAI_MODEL_FAST,OPENAI_MODEL_BALANCED,OPENAI_MODEL_SMARTANTHROPIC_MODEL_FAST,ANTHROPIC_MODEL_BALANCED,ANTHROPIC_MODEL_SMARTGEMINI_MODEL_FAST,GEMINI_MODEL_BALANCED,GEMINI_MODEL_SMART
Configuration sanity checklist
DEBUGis off outside local development- DB/Redis credentials are not default placeholders
- secrets are managed securely and never committed
MEDIA_ROOT(or S3 config) is persistent for generated artifacts
Security notes
- Never commit
.env. - Rotate credentials immediately if exposed.
- Prefer secret managers over plaintext files when possible.
- Keep PostHog personal/management API keys out of app runtime config; Djass only needs the project API key for ingestion.