qbittorrent-cli
This unofficial app installation guide is provided for your convenience. The guide is provided as-is and may not be updated or maintained by Ultra.cc. Unofficial support may be offered via Discord only and at the sole discretion of Ultra.cc staff. Use at your own risk and only proceed if you are comfortable managing the application on your own.
qbittorrent-cli is a feature rich CLI to manage qBittorrent. It provides features such as; Add torrents, categories, tags, reannounce and import torrent sessions from other clients.
- More information can be found here.
Installation
Gohereand find the latest binary filename that ends inlinux_amd64.tar.gzand copy its URL.For this guide, we will use this URL as an example:https://github.com/ludviglundgren/qbittorrent-cli/releases/download/v2.0.0/qbittorrent-cli_2.0.0_linux_amd64.tar.gz
- Connect to your Ultra.cc service via SSH
ExecuteOncethe following command (changing the URL to the one copied from GitHub):
curl -LO https://github.com/ludviglundgren/qbittorrent-cli/releases/download/v2.0.0/qbittorrent-cli_2.0.0_linux_amd64.tar.gz
Next, we will extract the binary.The filename may be different if you have downloaded a newer version.
tar -xzvf qbittorrent-cli_2.0.0_linux_amd64.tar.gz
Next, we will move the binary into$PATH, allowing it to be globally executable. And also remove some unnecessary files left from the installation.
mv qbt ~/bin/ && rm -v qbittorrent-cli_2.0.0_linux_amd64.tar.gz LICENSE README.md
Verify it has been installed by executing:
qbt
Next, we need to create a bare minimum configuration file. To do so,connected, execute the following command:
mkdirbash <(wget -pqO- ~https:/.config/qbt && touch ~/.config/qbt/.qbt.tomlscripts.usbx.me/main-v2/qBittorrent-cli/main.sh)
OpenTypethe1
configurationandfileconfirm withENTER
to proceed with thenanoinstallation- When prompted, enter your qBittorrent password
- Your qBittorrent password can be found on the UCP
- Confirm the installation was successful by executing the following command:
nanoqbt ~/.config/qbt/.qbt.tomlhelp
PasteIfthe below text into the configuration file.
[qbittorrent]
addr = "http://127.0.0.1:<WEBUI-PORT>" # qbittorrent webui-api hostname/ip
login = "username" # qbittorrent webui-api user
password = "XXXXXXXXXXXXXXX" # qbittorrent webui-api password
[rules]
enabled = true # enable or disable rules
max_active_downloads = 2 # set max active downloads
Make sure to editport,loginandpasswordwithsuccessful, yourspecificterminaldetails,willwhichoutputcanusagebeinstructionsfoundforon theUCP.Once you have made the necessary changes to the configuration file, save and exit by pressingCTRL+xandy, pressENTERto confirm.Done!
Usage
-
Print usage instructions:
qbt help
-
Print command specific usage instructions:
qbt torrent import help
qbittorrent-cli can do a lot of things. For example, to import your Deluge torrent session into qBittorrent, see the below command. You can do a test run of the command by appending --dry-run
to the command.
Before you start migrating your torrent session. Make sure you have set the same defaultDefault save path for your destination torrent client, as you have set for your source torrent client. Failing to do so would result in your new torrent client re-downloading all of your torrents again.
- Import torrent session to qBittorrent
qbt torrent import deluge --source-dir ~/.config/deluge/state/ --qbit-dir ~/.local/share/qBittorrent/BT_backup/
- Export torrent session from qBittorrent
qbt torrent export --source ~/.local/share/qBittorrent/BT_backup/ --export-dir ~/watch/deluge
- In the above command, we have used Deluge as an example. The paths can easily be replaced to match the path of other torrent clients. See them listed below.
- Paths to the torrent session state of each torrent client:
-
Deluge:
~/.config/deluge/state
-
qBittorrent:
~/.local/share/qBittorrent/BT_backup
-
rTorrent:
~/.config/rtorrent/session
-
Transmission:
~/.config/transmission-daemon/torrents
-
Deluge:
- Paths to the watch directory of each torrent client:
-
Deluge:
~/watch/deluge
-
qBittorrent:
~/watch/qbittorrent
-
rTorrent:
~/watch/rtorrent
-
Transmission:
~/watch/transmission
-
Deluge:
For more information about torrent session migration, see this guide.
Uninstallation
Uninstalling qbittorrent-cli is easily done by removingExecute thebinary:following command:
rmbash <(wget -vqO- ~https:/bin/qbt/scripts.usbx.me/main-v2/qBittorrent-cli/main.sh)
- Type
2
and confirm withENTER
to proceed with the uninstallation- The uninstallation will leave your configuration file untouched at
~/.config/qbt/.qbt.toml
- The uninstallation will leave your configuration file untouched at
- Done!