Environment variables
Environment variables override the file. This is how a container gets
credentials without writing them to a mounted config, and it means you can keep
subtrace.toml in version control with empty secrets.
An empty or unset variable changes nothing; integer variables that do not parse are ignored.
Config location
| Variable | Effect |
|---|---|
SUBTRACE_CONFIG | Path to the config file. Checked after --config, before ./subtrace.toml. |
Credentials and quotas
| Variable | Overrides |
|---|---|
SUBTRACE_OPENSUBTITLES_API_KEY | providers.opensubtitles.api_key |
SUBTRACE_OPENSUBTITLES_USERNAME | providers.opensubtitles.username |
SUBTRACE_OPENSUBTITLES_PASSWORD | providers.opensubtitles.password |
SUBTRACE_OPENSUBTITLES_DAILY_CAP | providers.opensubtitles.daily_cap |
SUBTRACE_SUBDL_API_KEY | providers.subdl.api_key |
SUBTRACE_SUBDL_DAILY_CAP | providers.subdl.daily_cap |
Run behavior
| Variable | Overrides |
|---|---|
SUBTRACE_DB_PATH | run.db_path |
SUBTRACE_INTERVAL | run.interval ("6h", "90m") |
SUBTRACE_CONCURRENCY | run.concurrency |
SUBTRACE_MAX_PER_RUN | run.max_per_run |
SUBTRACE_LANGUAGES | subtitles.languages — comma-separated, e.g. en,es |
SUBTRACE_PROVIDER_ORDER | providers.order — comma-separated, e.g. subdl,opensubtitles |
Integrations
| Variable | Overrides |
|---|---|
SUBTRACE_PLEX_URL | plex.url |
SUBTRACE_PLEX_TOKEN | plex.token — also sets plex.enabled = true |
SUBTRACE_NOTIFY_URLS | notify.urls — comma-separated shoutrrr URLs |
Container ownership
Read by the CLI rather than the config loader, and applied to every file subtrace writes:
| Variable | Effect |
|---|---|
PUID | uid to chown written subtitles to |
PGID | gid to chown written subtitles to |
The chown only happens when the process is running as root — which is the
container’s startup state before it drops privileges. Unset means “do not
chown”. See Troubleshooting if new .srt files end up
unreadable by your media server.
Checking what took effect
subtrace config showprints the effective configuration after environment overrides, with secrets masked to their last four characters.