Environment Variables¶
Torrentarr supports a config path override plus section-level environment overrides for Settings and primary qBit fields.
Config file path override¶
Variable: TORRENTARR_CONFIG Purpose: Path to the config.toml file (or its directory, depending on deployment). Used by: All Torrentarr processes (Host, WebUI, Workers).
If set, this overrides the default config file search order.
Examples:
# Full path to config file (e.g. Docker or custom path)
export TORRENTARR_CONFIG=/config/config.toml
# Windows (PowerShell)
$env:TORRENTARR_CONFIG = "C:\path\to\config\config.toml"
Docker:
services:
torrentarr:
image: feramance/torrentarr:latest
environment:
TORRENTARR_CONFIG: /config/config.toml
volumes:
- /path/to/config:/config
When TORRENTARR_CONFIG is set and starts with /config, Torrentarr uses /config as the base directory for the database (torrentarr.db) and logs. Otherwise the data directory is the folder containing that config file. See ConfigurationLoader.GetDataDirectoryPath() in the source.
Config file search order (when TORRENTARR_CONFIG is not set)¶
./.config/config.toml(under the process current working directory)~/config/config.toml~/.config/qbitrr/config.toml~/.config/torrentarr/config.toml./config.toml
The first existing file wins. If none exist, a new default config is created at ./.config/config.toml (so the database and logs typically live in ./.config/ on first run from that working directory).
Section-level overrides¶
Torrentarr reads the following environment variables at load time:
TORRENTARR_SETTINGS_*forSettingskeys.TORRENTARR_QBIT_*for primaryqBitconnection keys.
For compatibility with qBitrr-style deployments, equivalent QBITRR_* aliases are also accepted for these keys.
Supported Settings overrides¶
TORRENTARR_SETTINGS_CONSOLE_LEVELTORRENTARR_SETTINGS_LOGGINGTORRENTARR_SETTINGS_COMPLETED_DOWNLOAD_FOLDERTORRENTARR_SETTINGS_FREE_SPACETORRENTARR_SETTINGS_FREE_SPACE_FOLDERTORRENTARR_SETTINGS_NO_INTERNET_SLEEP_TIMERTORRENTARR_SETTINGS_LOOP_SLEEP_TIMERTORRENTARR_SETTINGS_SEARCH_LOOP_DELAYTORRENTARR_SETTINGS_AUTO_PAUSE_RESUMETORRENTARR_SETTINGS_FAILED_CATEGORYTORRENTARR_SETTINGS_RECHECK_CATEGORYTORRENTARR_SETTINGS_TAGLESSTORRENTARR_SETTINGS_IGNORE_TORRENTS_YOUNGER_THANTORRENTARR_SETTINGS_FFPROBE_AUTO_UPDATETORRENTARR_SETTINGS_AUTO_UPDATE_ENABLEDTORRENTARR_SETTINGS_AUTO_UPDATE_CRONTORRENTARR_SETTINGS_PING_URLS(comma-separated list)
Supported primary qBit overrides¶
TORRENTARR_QBIT_DISABLEDTORRENTARR_QBIT_HOSTTORRENTARR_QBIT_PORTTORRENTARR_QBIT_USERNAMETORRENTARR_QBIT_PASSWORD
When both TORRENTARR_* and QBITRR_* variants are present for the same key, TORRENTARR_* takes precedence.
Related documentation¶
- Configuration File — Full
config.tomlreference - Docker Installation — Docker setup
- qBittorrent Configuration — qBittorrent connection