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

VariableDescription
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

VariableDefaultDescription
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

VariableDefaultDescription
STORAGE_BACKENDlocallocal or s3
LOCAL_STORAGE_ROOT./filesDirectory for the local backend
S3_BUCKETBucket name (s3 backend)
S3_REGIONus-east-1AWS region
S3_PREFIXpackagesKey prefix inside the bucket
AWS_ENDPOINT_URLOptional: 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.

VariableDefault
SMTP_HOST127.0.0.1
SMTP_PORT587
MAIL_FROM_ADDRESSnoreply@example.com
MAIL_FROM_NAMESpeedyFiles
MAIL_ENVELOPE_HELO(From-address domain)

Sessions

VariableDefault
SESSION_COOKIE_NAMEspeedyfiles_session
SESSION_MAX_AGE_SECONDS604800 (7 days)

Misc

VariableDefaultDescription
APP_NAMESpeedyFilesBrand name in titles/emails (overridable in Settings → Site)
DEBUGfalseSet true to relax cookie Secure flag (HTTP-only localhost dev). Never in production.

Where they're loaded from

In priority order:

  1. Real environment (e.g. docker-compose.yml environment: block)
  2. .env file in the working directory
  3. Defaults in app/config.py