Environment Variables
Overview
SpeedPy uses django-environ for environment variable management. Variables are read from a .env file in the project root.
The Docker setup uses .docker.env as the template (copied to .env during make init).
Variable Reference
Core
| Variable |
Type |
Default |
Description |
DEBUG |
bool |
False |
Enable debug mode |
SECRET_KEY |
string |
"change_me" |
Django secret key |
SALT_KEY |
string |
"changeme" |
Encryption salt for Fernet encrypted fields |
ALLOWED_HOSTS |
list |
["*"] |
Comma-separated list of allowed hostnames |
ADMIN_URL |
string |
"admin/" |
URL path for the Django admin |
SITE_URL |
string |
auto-detected |
Full URL of the site (e.g., https://example.com) |
Database
| Variable |
Type |
Default |
Description |
DATABASE_URL |
string |
"sqlite:///db.sqlite3" |
Database connection string |
CONN_MAX_AGE |
int |
60 |
Persistent database connection lifetime (seconds, PostgreSQL only) |
Cache
| Variable |
Type |
Default |
Description |
CACHE_URL |
string |
"dummycache://" |
Cache backend connection string |
Redis & Celery
| Variable |
Type |
Default |
Description |
REDIS_URL |
string |
None |
Redis URL for Celery broker, result backend, and Redbeat |
Email
EMAIL_PROVIDER selects the sending backend behind django-post_office. See the Email page for full details. Provider credentials default to placeholders so the app boots without them; real keys are required to actually send.
| Variable |
Type |
Default |
Description |
EMAIL_PROVIDER |
string |
"console" |
Sending backend: console, smtp, ses, mailgun, sendgrid, postmark, resend. Invalid values fail at startup. |
EMAIL_URL |
string |
"smtp://user:password@localhost:25" |
SMTP connection string (used when EMAIL_PROVIDER=smtp) |
DEFAULT_FROM_EMAIL |
string |
"admin@example.com" |
Default sender address |
SERVER_EMAIL |
string |
value of DEFAULT_FROM_EMAIL |
Sender for Django error/admin emails |
AWS_SES_ACCESS_KEY_ID |
string |
"change_me" |
AWS SES access key (provider ses) |
AWS_SES_SECRET_ACCESS_KEY |
string |
"change_me" |
AWS SES secret key (provider ses) |
AWS_SES_REGION_NAME |
string |
"eu-central-1" |
AWS SES region (provider ses) |
MAILGUN_API_KEY |
string |
"change_me" |
Mailgun API key (provider mailgun) |
MAILGUN_SENDER_DOMAIN |
string |
"example.com" |
Mailgun sender domain (provider mailgun) |
MAILGUN_API_URL |
string |
"https://api.mailgun.net/v3" |
Mailgun API base URL; use the EU endpoint for EU accounts |
SENDGRID_API_KEY |
string |
"change_me" |
SendGrid API key (provider sendgrid) |
POSTMARK_SERVER_TOKEN |
string |
"change_me" |
Postmark server token (provider postmark) |
RESEND_API_KEY |
string |
"change_me" |
Resend API key (provider resend) |
| Variable |
Type |
Default |
Description |
STATIC_URL |
string |
"/static/" |
URL prefix for static files |
STATIC_ROOT |
string |
BASE_DIR / "staticfiles" |
Directory for collected static files |
MEDIA_ROOT |
string |
BASE_DIR / "media" |
Directory for uploaded media files |
MEDIA_PATH |
string |
"/media/" |
URL prefix for media files |
Authentication & Security
| Variable |
Type |
Default |
Description |
RECAPTCHA_PUBLIC_KEY |
string |
"" |
Google reCAPTCHA site key |
RECAPTCHA_PRIVATE_KEY |
string |
"" |
Google reCAPTCHA secret key |
RECAPTCHA_REQUIRED_SCORE |
float |
0.5 |
Minimum reCAPTCHA score (0.0–1.0) |
OTP_TOTP_ISSUER |
string |
"uptimefor.me" |
Name shown in authenticator apps |
TOS_LINK |
string |
"/" |
Terms of Service URL |
DPA_LINK |
string |
"/" |
Privacy Policy URL |
Features
| Variable |
Type |
Default |
Description |
SPEEDPY_TEAMS_ENABLED |
bool |
True |
Enable/disable teams functionality |
SPEEDPY_TOURS_ENABLED |
bool |
True |
Enable/disable onboarding tours |
DEMO_MODE |
bool |
False |
Pre-fill login form with demo credentials |
DEFAULT_ADMIN_PASSWORD |
string |
None |
Password for the auto-created superuser |
Docker Default Environment
The .docker.env file used by Docker Compose:
DEBUG=True
DATABASE_URL=postgres://speedpycom:speedpycom@db:5432/speedpycom
REDIS_URL=redis://redis:6379/0
SECRET_KEY=changeme