Skip to content
Environment variables

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

VariableEffect
SUBTRACE_CONFIGPath to the config file. Checked after --config, before ./subtrace.toml.

Credentials and quotas

VariableOverrides
SUBTRACE_OPENSUBTITLES_API_KEYproviders.opensubtitles.api_key
SUBTRACE_OPENSUBTITLES_USERNAMEproviders.opensubtitles.username
SUBTRACE_OPENSUBTITLES_PASSWORDproviders.opensubtitles.password
SUBTRACE_OPENSUBTITLES_DAILY_CAPproviders.opensubtitles.daily_cap
SUBTRACE_SUBDL_API_KEYproviders.subdl.api_key
SUBTRACE_SUBDL_DAILY_CAPproviders.subdl.daily_cap

Run behavior

VariableOverrides
SUBTRACE_DB_PATHrun.db_path
SUBTRACE_INTERVALrun.interval ("6h", "90m")
SUBTRACE_CONCURRENCYrun.concurrency
SUBTRACE_MAX_PER_RUNrun.max_per_run
SUBTRACE_LANGUAGESsubtitles.languages — comma-separated, e.g. en,es
SUBTRACE_PROVIDER_ORDERproviders.order — comma-separated, e.g. subdl,opensubtitles

Integrations

VariableOverrides
SUBTRACE_PLEX_URLplex.url
SUBTRACE_PLEX_TOKENplex.tokenalso sets plex.enabled = true
SUBTRACE_NOTIFY_URLSnotify.urls — comma-separated shoutrrr URLs

Container ownership

Read by the CLI rather than the config loader, and applied to every file subtrace writes:

VariableEffect
PUIDuid to chown written subtitles to
PGIDgid 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 show

prints the effective configuration after environment overrides, with secrets masked to their last four characters.