Skip to content

Configuration

qbt is configured with a TOML file. Most commands need at least the [qbittorrent] connection block.

Create .qbt.toml in ~/.config/qbt/:

Terminal window
mkdir -p ~/.config/qbt && touch ~/.config/qbt/.qbt.toml

qbt looks for a file named .qbt.toml in the following locations, in order:

  1. the current working directory
  2. your home directory ($HOME)
  3. $HOME/.config/qbt

You can also point at a specific file with the global --config flag:

Terminal window
qbt --config /path/to/.qbt.toml torrent list
[qbittorrent]
addr = "http://127.0.0.1:6776" # qbittorrent webui-api hostname/ip
login = "user" # qbittorrent webui-api user (optional)
password = "password" # qbittorrent webui-api password (optional)
Key Description
addr qBittorrent Web API URL, including scheme and port
login Web API username (optional)
password Web API password (optional)
apikey Web API key - qBittorrent 5.2.x and newer only (optional)
basicUser HTTP basic auth username, if your Web API is behind basic auth
basicPass HTTP basic auth password, if your Web API is behind basic auth

Some trackers are buggy and need a reannounce before a torrent can start. These values are used by qbt torrent reannounce.

[reannounce]
enabled = true # true or false
attempts = 10 # number of attempts, typically 10-30
interval = 7000 # interval between attempts, in milliseconds

Limit how many torrents download simultaneously. Applied when adding torrents unless you pass --ignore-rules.

[rules]
enabled = true # enable or disable rules
max_active_downloads = 2 # max active downloads
  • On HDDs with 1 Gbit, max_active_downloads = 2 is a good value to avoid overloading the disks while giving each torrent as much bandwidth as possible.
  • On SSDs and 1 Gbit+ you can increase this value.

Defaults applied by qbt torrent add.

[add]
sequential = false # download pieces in sequential order (useful for streaming)
first_last_piece = false # prioritize first and last pieces for all new torrents

qbt torrent compare can compare torrents against other qBittorrent instances. Add one [[compare]] block per instance.

[[compare]]
addr = "http://100.100.100.100:6776"
login = "user"
password = "password"
#basicUser = "user"
#basicPass = "password"
[[compare]] # you can specify multiple compare blocks
addr = "http://100.100.100.101:6776"
login = "user"
password = "password"

qbt torrent add works well as an autodl-irssi upload action.

Edit autodl.cfg.

Global action:

[options]
...
upload-type = exec
upload-command = /usr/bin/qbt
upload-args = add "$(TorrentPathName)"

Per filter:

[filter example_filter_action]
...
upload-type = exec
upload-command = /usr/bin/qbt
upload-args = add "$(TorrentPathName)" --category cat1 --tags tag1

In ruTorrent, go to autodl-irssi Preferences, then the Action tab and set the following for the global action. This can be set per filter as well, where you can also add a category, tags and so on.

Choose .torrent action: Run Program
Command: /usr/bin/qbt
Arguments: add "$(TorrentPathName)"