Skip to main content

qBittorrent

The qBittorrent project aims to provide an open-source software alternative to µTorrent. It is written in C++ and uses Boost, Qt toolkit, and libtorrent-rasterbar library.

Initial Setup

Installing qBittorrent is easy. Simply issue the following command from SSH:

sudo box install qbittorrent

This command will configure qBittorrent and the associated web interface for use with your user.

After installation, if there will be two 2 new packages installed: libtorrent-rasterbar, and qbittorrent-nox (aka qBittorrent no X). The package name for libtorrent does not interfere with any apt packages and should not issue any upgrade warnings when upgrading packages with apt-get.

Install Errata

If you were an early adopter of qBittorrent (i.e. before October 8th 2020), then a few extra packages got installed which also started background services if you chose to compile qBittorent.

qBittorrent will no longer install "recommended" packages, but out of respect for your system, these recommended packages/services will not be automatically removed as they may be required packages in certain circumstances. If you have the following packages on your system they should be safe to stop their services and/or remove them as well if you had them installed through the qBit build pipeline. PLEASE DOUBLE CHECK THESE YOURSELF AND IF IN DOUBT DISABLE SERVICES BEFORE REMOVING THEM!!!!

  • avahi-daemon (Bonjour for linux, aka, LAN Device Discovery)
  • wpasupplicant (Used for configuring wifi access points)
  • modemmanager (Used for configuring modems)

The services can be stopped with:

sudo systemctl stop wpa_supplicant ModemManager avahi-daemon

If you are satisfied they are not required, these packages can be purged or disabled:

sudo apt purge avahi-daemon wpasupplicant modemmanager
sudo apt autoremove

OR

sudo systemctl disable --now wpa_supplicant ModemManager avahi-daemon

qBittorrent Version

  • Repo: performs an apt-get install qbittorrent-nox and pulls whatever is available from your operating system's repository. To check versions, you can use the Debian Package Tracker or the Ubuntu Package Tracker.
  • qBittorrent 4.*: Downloads the latest 4.* release from qBittorrent's github repo and uses fpm to package it as a .deb for easy installation and removal with dpkg.
    • Version availability on Debian Stretch or Ubuntu Xenial is limited due to outdated QT/SSL dependencies.

Unattended variables

When installing qBittorrent, you may specify the variable QBITTORRENT_VERSION to bypass the version popup. Accepted values are:

  • repo -- Will install qBittorrent from your OS repository
  • 4.1.*(.*) -- To compile any release from 4.1. For example: 4.1.9.1 will compile 4.1.9.1 directly
  • 4.2.*(.*) -- To compile any release from 4.2. For example: 4.2.5 will compile 4.2.5 directly
  • 4.3.*(.*) -- To compile any release from 4.3. For example: 4.3.3 will compile 4.3.3 directly
  • latest -- Compiles the most recent version of qBittorrent

Libtorrent Patching

If you would like to patch the settings pack of libtorrent (or any other aspect for that matter), the libtorrent compile will check if /root/libtorrent-{RC_1_1,RC_1_2}.patch exists. If it does, then the installer will automatically patch the libtorrent source with this patch before libtorrent is compiled. This may be of note since the ltconfig plugin does not exist for qBittorent, thus if you are interested in changing certain settings pack settings for qBittorrent settings which are not currently exposed through the WebUI, then this is the only way to change those settings without manually compiling libtorrent.

RC_1_1 is used when compiling libtorrent 1.1.* (e.g. Deluge 1.3.15 and qBittorrent 4.1.*)

RC_1_2 is used when compiling libtorrent 1.2.* (e.g. Deluge 2.0 and qBittorrent >= 4.2)

You must supply your own patch!

Specifying Libtorrent Version

If you would like to swap the version of libtorrent that the client is compiled with, you can export a variable to control the branch or tag being used. export libtorrent_github_tag=RC_1_2 if you want to checkout the development branch instead of the most recent tagged release.

Upgrading and Recompiling

If you decide you'd like to change the version of qBittorrent/libtorrent you've installed, or you would like to rebuild your current versions against the most recent source, you can recompile and upgrade qBittorrent at any time with the command:

sudo box upgrade qbittorrent

This command will start the qBittorrent upgrade script. The installer will ask which version of qBittorrent you'd like to install and will then work on installing it. A second check will run to determine whether or not you are able to skip libtorrent compilation and prompt you of your choice.

How to Access

Web UI

The web UI is significantly easier to access, which is why many prefer it. You can access qBittorrent from https://yourhost.ltd/qbittorrent.

If you are not currently logged in, you will first receive a basic authentication dialog from the webserver. Once authenticated, you'll receive a secondary prompt from qBittorrent. This password is the same as the one you just entered.

note

This second password authentication layer can be disabled in the qBittorrent WebUI settings (Bypass auth for localhost). However, security implications exist if you are sharing your server with other users. If you disable localhost auth for the web UI, other users on the server can access the qBittorrent port directly from CLI -- so please only turn this option on if you trust the users on your server!

Service Management

These systemd service can be found here:

/etc/systemd/system/qbittorrent@.service

Multi-user is enabled, so in order to manipulate the service, you'll also need to specify a username.

sudo systemctl start qbittorrent@<username>

Configuration

Feel free to edit the majority of the settings here, but do not change the WebUI port if you expect the nginx proxy to continue working!

Default Download Location

Files downloaded by qBittorrent will be placed in ~/torrents/qbittorrent by default. You can change this behavior by change the preference: Download to in the qBittorrent download preferences.

Web Download Location

Similarly, any files in the default download directory (~/torrents/qbittorrent) will be available for browsing via the web server at the location: https://<yourhostname.ltd>/qbittorrent.downloads

Connect to other clients

The following variables can be used as a general guide to help you find information you'll need to know in order to connect other clients to qBittorrent.

Transdroid

Use these settings when connecting your transdroid client to your qBittorrent instance:

IP or Hostname: <yourhostname.ltd>
User name: <your username>
Password: <your password>
Advanced Settings:
Port Number: 443
Folder: /qbittorrent
Use SSL: On
Accept all SSL certificates: yes (optional with a valid ssl certificate)

Other Local Clients

Settings for connecting another local client (i.e. Sonarr), to your qBittorrent instance:

  • Host: 127.0.0.1
  • Port: Found in WebUI section of qBittorrent
  • Username: Your username
  • Password: Your password

3rd Party Utilities:

API Handlers:

AutoDL helpers:

Torrent Handlers: