Environment variables
SpeedyFiles is mostly configurable via the admin UI (Settings → Mail / Site / Webhooks). The env vars below are the bootstrap layer — values needed before the app can connect to its database.
Required
| Variable | Description |
SESSION_SECRET |
32-byte random string used to sign session cookies AND derive the encryption key for stored secrets. Generate: openssl rand -hex 32. Rotating invalidates stored SMTP credentials — you'd need to re-enter them. |
Recommended
| Variable | Default | Description |
PUBLIC_BASE_URL |
http://localhost:5300 |
URL recipients see in their magic-link emails. Set to your real hostname. |
DATABASE_URL |
sqlite+aiosqlite:///./data/app.db |
SQLAlchemy URL. For Postgres: postgresql+asyncpg://user:pass@host/db |
Storage
| Variable | Default | Description |
STORAGE_BACKEND | local | local or s3 |
LOCAL_STORAGE_ROOT | ./files | Directory for the local backend |
S3_BUCKET | — | Bucket name (s3 backend) |
S3_REGION | us-east-1 | AWS region |
S3_PREFIX | packages | Key prefix inside the bucket |
AWS_ENDPOINT_URL | — | Optional: non-AWS S3 endpoint (R2, MinIO, etc.) |
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY | — | Standard AWS credentials |
Mail bootstrap defaults
All overridable in the admin UI under Settings → Mail. Env values only seed the first-run wizard.
| Variable | Default |
SMTP_HOST | 127.0.0.1 |
SMTP_PORT | 587 |
MAIL_FROM_ADDRESS | noreply@example.com |
MAIL_FROM_NAME | SpeedyFiles |
MAIL_ENVELOPE_HELO | (From-address domain) |
Sessions
| Variable | Default |
SESSION_COOKIE_NAME | speedyfiles_session |
SESSION_MAX_AGE_SECONDS | 604800 (7 days) |
Misc
| Variable | Default | Description |
APP_NAME | SpeedyFiles | Brand name in titles/emails (overridable in Settings → Site) |
DEBUG | false | Set true to relax cookie Secure flag (HTTP-only localhost dev). Never in production. |
Where they're loaded from
In priority order:
- Real environment (e.g.
docker-compose.yml environment: block)
.env file in the working directory
- Defaults in
app/config.py