Skip to content

Environment Variables

Sublarr is UI-first: only 11 bootstrap variables can be set via the environment. Everything else — translation, providers, scheduling, profiles, notifications — is configured through the Settings UI and stored in the database, where it survives container restarts.

If you set a non-bootstrap variable like SUBLARR_TRANSLATION_ENABLED, SUBLARR_OLLAMA_URL, or SUBLARR_OPENSUBTITLES_API_KEY, the container logs a warning and ignores it. Move the value into the Settings UI.


These 11 variables — and only these — can be set via the environment. Everything is optional; the defaults below ship a working container.

VariableDefaultDescription
SUBLARR_PORT5765HTTP port the Flask app binds to
SUBLARR_API_KEY(empty)Optional API key for X-Api-Key header. Empty = no auth required
SUBLARR_CORS_ORIGINShttp://localhost:5173,http://localhost:5765Comma-separated list of allowed CORS / WebSocket origins. Set * only in fully trusted environments
VariableDefaultDescription
SUBLARR_MEDIA_PATH/mediaRoot path of your media library (must match a Docker volume mount)
SUBLARR_CONFIG_DIR/configSublarr’s persistent config directory (database, backups, logs)
VariableDefaultDescription
SUBLARR_DB_PATH/config/sublarr.dbSQLite database path (used when DATABASE_URL is empty)
SUBLARR_DATABASE_URL(empty)Full SQLAlchemy URL (e.g. postgresql://user:pw@host/db). Wins over DB_PATH when set
SUBLARR_REDIS_URL(empty)Redis URL (e.g. redis://redis:6379/0). Empty = in-process queue + cache
VariableDefaultDescription
SUBLARR_LOG_LEVELINFODEBUG, INFO, WARNING, ERROR
SUBLARR_LOG_FILElog/sublarr.logLog file path. Docker default: set to /config/sublarr.log
SUBLARR_LOG_FORMATtexttext or json (structured for log aggregators like Loki)

Container conventions (linuxserver-style, not Sublarr-internal)

Section titled “Container conventions (linuxserver-style, not Sublarr-internal)”
VariableDefaultDescription
PUID / PGID1000UID/GID the container process runs as. Pick the IDs that own your /media and /config volumes

The only values that need to be set before Sublarr can boot, write its database, and accept its first HTTP request live in the table above. Everything else — every provider API key, every translation backend toggle, every scan/cleanup/upgrade option, every notification URL — is runtime-changeable through the UI. Putting it all in the database makes configuration:

  • Discoverable — every option has a label, help text, and validation in the UI; you don’t need to grep this page to find what to set.
  • Per-environment correctSettings → Backup → Restore carries config across hosts; you don’t re-write a 200-line .env for every machine.
  • Recoverable — a typo in a UI field shows an inline error before it persists; a typo in .env only surfaces when the container fails to start.

If you used to set SUBLARR_<X> in your .env, here is where the same setting now lives in the UI:

Old environment variable groupNow configured at
SUBLARR_TRANSLATION_*Settings → Translation
SUBLARR_OLLAMA_URL, SUBLARR_OLLAMA_MODELSettings → Translation → Backends
SUBLARR_*_API_KEY (OpenSubtitles, Jimaku, SubDL, SubsDump, …)Settings → Providers → API Keys
SUBLARR_PROVIDER_* (priorities, timeouts, rate limits)Settings → Providers
SUBLARR_SONARR_*, SUBLARR_RADARR_*Settings → Sonarr / Radarr
SUBLARR_JELLYFIN_*, SUBLARR_MEDIA_SERVERS_JSONSettings → Media Servers
SUBLARR_WANTED_*, SUBLARR_WEBHOOK_*Settings → Automation
SUBLARR_UPGRADE_*Settings → Automation → Upgrades
SUBLARR_REMUX_*Settings → Automation → Stream Removal
SUBLARR_AUTO_CLEANUP_*, SUBLARR_SUBTITLE_TRASH_*Settings → Automation → Cleanup
SUBLARR_HI_*, SUBLARR_FORCED_*, SUBLARR_CREDIT_*, SUBLARR_OP_WINDOW_*Settings → Translation
SUBLARR_SUBTITLE_* (naming)Settings → Media Management
SUBLARR_SCAN_*Settings → Media Management → Scanning
SUBLARR_STANDALONE_*, SUBLARR_TMDB_*, SUBLARR_TVDB_*Settings → Library Sources
SUBLARR_NOTIFY_*, SUBLARR_NOTIFICATION_URLS_JSONSettings → Notifications
SUBLARR_CIRCUIT_BREAKER_*Settings → Providers → Resilience
SUBLARR_BACKUP_* (auto-backup)Settings → General → Backup
SUBLARR_INTERFACE_LANGUAGE, SUBLARR_ITEMS_PER_PAGE, SUBLARR_DEFAULT_LIBRARY_*, SUBLARR_DATETIME_FORMATSettings → General
SUBLARR_QUIET_HOURS_*Settings → General → Quiet Hours
SUBLARR_DISK_WARNING_*Settings → General → Disk Monitoring
SUBLARR_SESSION_TIMEOUT_*, SUBLARR_MAX_LOGIN_ATTEMPTS, SUBLARR_LOCKOUT_DURATION_*, SUBLARR_ALLOWED_IP_RANGESSettings → General → Authentication
SUBLARR_PLUGINS_DIR, SUBLARR_PLUGIN_HOT_RELOADSettings → Plugins
SUBLARR_AUTO_SYNC_*, SUBLARR_FFMPEG_TIMEOUT, SUBLARR_MAX_CONCURRENT_*, SUBLARR_MAX_SUBTITLE_FILE_SIZE_KBSettings → Media Management
SUBLARR_WHISPER_*Settings → Translation → Whisper
SUBLARR_PATH_MAPPINGSettings → Sonarr / Radarr → Path Mapping

If a setting you used to rely on is missing from the UI, please open a GitHub issue — every SUBLARR_* variable that ever shipped has an equivalent UI control.


Copy this into .env next to your docker-compose.yml:

# UID/GID of the user that owns /media and /config volumes
PUID=1000
PGID=1000
# Optional — uncomment to enable API-key auth
# SUBLARR_API_KEY=change-me-to-a-long-random-string
# Optional — only set if you mounted /media or /config differently
# SUBLARR_MEDIA_PATH=/media
# SUBLARR_CONFIG_DIR=/config
# Optional — set if running on a non-default port behind a reverse proxy
# SUBLARR_PORT=5765
# SUBLARR_CORS_ORIGINS=https://sublarr.example.com
# Optional — switch to PostgreSQL
# SUBLARR_DATABASE_URL=postgresql://sublarr:pw@db:5432/sublarr
# Optional — switch to Redis-backed job queue + provider cache
# SUBLARR_REDIS_URL=redis://redis:6379/0

That’s it. After the first start, open http://<HOST_IP>:5765, complete the onboarding wizard, and configure everything else through the UI.