# Environment variable reference

## Required in every environment

- DATABASE_URL: PostgreSQL connection string.
- REDIS_URL: Redis connection string.
- SESSION_SECRET: at least 32 random bytes, used to sign session cookies.
- APP_URL: public base URL, used in emails and redirects.

## Optional

- SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD: outbound email.
- STORAGE_BUCKET, STORAGE_KEY, STORAGE_SECRET: object storage for uploads.
- DEMO_SESSION_MINUTES: default sandbox duration, 1-180.
- REGISTRATION_OPEN: true or false; gates self-service signup.

## Rules

Secrets must never be committed. Rotate SESSION_SECRET only during a maintenance
window because rotation invalidates existing sessions.
