How to install qBittorrent on Ubuntu Server

sudo apt install qbittorrent

Or use PPA to get latest version

sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable

qBittorrent can use with Desktop UI. On server we don’t have it, Web interface instead. In this case we’ll use qbittorrent-nox

sudo apt install qbittorrent-nox

Now you can start qbittorrent-nox by easily via command. But it’s not recommended. We’ll use as systemd service instead.

Create user & group for qbittorrent-box

sudo adduser --system --group qbittorrent-nox

The --system flag means we are creating a system user instead of normal user. A system user doesn’t have password and can’t login, which is what you would want for a torrent client. A home directory /home/qbittorent-nox will be created for this user. You might want to add your user account to group qbittorrent-nox with the following command so that the user account has access to the files downloaded by qBittorrent-nox. Files are downloaded to /home/qbittorrent-nox/Downloads/  by default. Note that you need to re-login for the groups change to take effect.

sudo adduser <your-username> qbittorrent-nox

Create systemd service

sudo nano /etc/systemd/system/qbittorrent-nox.service
[Unit]
Description=qBittorrent Command Line Client
After=network.target

[Service]
#Do not change to "simple"
Type=forking
User=qbittorrent-nox
Group=qbittorrent-nox
UMask=007
ExecStart=/usr/bin/qbittorrent-nox -d --webui-port=8080
Restart=on-failure

[Install]
WantedBy=multi-user.target

You can replace port 8080 with any port you that you need.

sudo systemctl start qbittorrent-nox
sudo systemctl daemon-reload

Auto start on system boot

sudo systemctl enable qbittorrent-nox

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Up ↑

%d bloggers like this: