qBittorrent
This article will show you how to install and configure qBittorrent (project website, GitHub repository). qBittorrent is a torrent client based on libtorrent-rasterbar and is an alternative to rTorrent, Deluge or Transmission. qBittorrent is often referred to simply as "qbit".
You'll need to execute some commands via SSH to use this software. There is a separate guide on how to connect to your slot via SSH. Commands are kept as simple as possible and in most cases will simply need to be copied and pasted into the terminal window (then executed by pressing the Enter key).
Table of contents
Installation
Installation and configuration is done entirely by a script. Copy and paste the following command to install qBittorrent:
wget -O ~/install.qbittorrent.sh https://bitbucket.org/feralio/wiki/raw/HEAD/src/wiki/software/qbittorrent/install && bash ~/install.qbittorrent.sh
This script will output a success message alongside your login details: a URL, a username and a password. The password is not stored anywhere so you will need to save it—your browser's password manager is good location. Since qBittorrent is run in a container, it can only be started by the auto-restart so you will need to wait five minutes before accessing it.
Required settings
You are encouraged to configure and make qbit your own. You must take the following settings into consideration:
Bittorrent\MaxConnecs
- The maximum connections should have a limit to prevent too many at once. The default is 40.
PortForwardingEnabled=true
- qBittorrent runs in a container and relies on port forwarding for incoming connections.
Session\AsyncIOThreadsCount=1
- The disk IO thread count must be kept to one. Typically a single thread is enough to saturate a disk and can easily have an adverse impact on the performance of your own and other slots.
Session\HashingThreadsCount=1
- The hashing thread count must be kept to one. Similar to
AsyncIOThreadsCount
. WebUI\Port=9001
- qBittorrent is accessed via a proxy. The web UI port needs to remain static so that the proxy can reach it.
Starting, stopping and restarting
This section covers the qBittorrent process—starting it, stopping it and restarting it. It also covers checking if the process is running, in case that becomes necessary.
- start
- You cannot start qBittorrent manually. Wait five minutes for it to auto-restart.
- check running
- pgrep -laf qbittorrent-nox
- stop
- pkill -f qbittorrent-nox
- kill (force stop)
- pkill -9 -f qbittorrent-nox
- restart
- pkill -f qbittorrent-nox Then wait five minutes for it to auto-restart.
Updating qBittorrent
The executable binary to start qBittorrent can be found ~/.config/feral/ns/containers/docs-qbittorrent/qbittorrent-nox
. If this file is missing the latest version available will be downloaded and qBittorrent will be restarted.
You can use an SFTP / FTP client to delete this file. Or alternatively you can run the SSH command: rm ~/.config/feral/ns/containers/docs-qbittorrent/qbittorrent-nox
You can also replace this file with a specific version. A good place to find static compilations are the "x86_64" releases from userdocs/qbittorrent-nox-static. After the qbittorrent-nox file has been replaced, you will need to manually restart qBittorrent.
If you find this folder doesn't exist then you may be using a previous version of the install script. Run the install script to get the newer install.
Troubleshooting
- Visiting the URL gives a "502 Bad Gateway" error
- Wait five minutes for qbittorrent to be auto-restarted.
- Connectivity issues (no DHT nodes, not connecting to trackers)
- Installs not using the install script may see these errors. Run the install script to reinstall (you do not need to uninstall first).
- Connection status: firewalled
- You must run with port forwarding enabled. The status switches when the client sees an incoming connection so there must be some activity for this to happen.
- Missing folder
~/.config/feral/ns/containers/docs-qbittorrent
- A previous version of this script used a different install location. Run the install script to get the newer install. New installs offer an update mechanism and newer OS.
- Any other issues
- Check
~/.local/share/qBittorrent/logs
for errors and relevant information. You should also try restarting qBittorrent by running the "kill" method from the restart section above and waiting five minutes.
Uninstall
The following SSH commands will uninstall qbittorrent from your slot. You do not need to run them if reinstalling.
rm -rf ~/bin/qbittorrent-nox ~/install.qbittorrent.sh ~/.config/feral/user-container.d/wiki-qbittorrent ~/.config/feral/ns/containers/docs-qbittorrent ~/.nginx/conf.d/000-default-server.d/qbittorrent.conf ~/.nginx/conf.d/000-default-server.d/docs-qbittorrent.conf rm -rf ~/.config/qBittorrent ./.cache/qBittorrent ~/.local/share/qBittorrent/ ~/private/qBittorrent /usr/sbin/nginx -s reload -c ~/.nginx/nginx.conf 2>/dev/null pkill -9 -f qbittorrent-nox echo Uninstalled.