How to Install qBittorrent on CentOS 8/RHEL 8 Desktop & Server

This tutorial will be showing you how to install qBittorrent on CentOS 8/RHEL 8. qBittorrent is a free, open-source, fast and lightweight P2P BitTorrent client written in C++ / Qt, available for Linux, FreeBSD, MacOS and Windows. It aims to provide an open-source alternative to uTorrent, which is a very popular BitTorrent client among Windows users.

qBittorrent Features

  • A uTorrent-like interface
  • Supports main BitTorrent extensions like DHT, peer exchange, full encryption (Vuze compatible)
  • It provides a good integrated search engine
  • It also comes with UPnP port forwarding / NAT-PMP
  • You can also remotely control it via the qBittorrent Web interface.
  • Torrent creation tool
  • And many more

Install qBittorrent on CentOS 8/RHEL 8 Desktop

qBittorrent is included in the EPEL software repository. You can easily install it on CentOS 8/RHEL 8 desktop by running the following command in a terminal window.

sudo dnf install epel-release
sudo dnf install qbittorrent qt5-qtsvg

Once installed, you can start qBittorrent from the application menu.

qbittorrent centos 8 desktop

How to Enable qBittorrent Web UI on CentOS 8/RHEL 8 Desktop

The web UI allows you to remotely control qBittorrent in a web browser.

  1. In the qBittorrent application window, go to tools > Preferences > Web UI.
  2. Tick on the Web User Interface (Remote Control) option.
  3. You can also choose to use UPnP/NAT-PMP to forward the port from your router, so that you will be able access qBittorrent from outside network.
  4. By default, the web UI is accessible on port 8080. If there’s another service using port 8080, you need to change the port number in qBittorrent.
  5. Set a username and password. (By default “admin” and “adminadmin” respectively).
  6. At the bottom, you can also choose to use one of two dynamic DNS services: DynDNS and No-IP.
  7. Click Apply button.

qbittorrent-upnp-centos8

Now in my local network, I can access qBittorrent web interface via 192.168.0.102:8080.

qbittorrent webui

If the qBittorrent web interface can’t be loaded, it might be that you need to open TCP port 8080 in the firewall with the following two commands.

sudo firewall-cmd --permanent --add-port=8080/tcp
sudo systemctl reload firewalld

If you are going to access qBittorrent from outside network, then make sure you have enabled UPnP/NAT-PMP and you will need to enter something like below in the web browser.

12.34.56.78:8080

Replace 12.34.56.78 with the public IP address of your router.

How to Install qBittorrent on CentOS 8/RHEL 8 Server

You can install qBittorrent command-line client on a headless CentOS 8/RHEL 8 server and manage it via the qBittorrent web interface (You control it in a web browser). SSH into your CentOS 8/RHEL 8 server and run the following commands to install qBittorrent daemon.

sudo dnf install epel-release
sudo dnf install qbittorrent-nox

Note that we need to install qbittorrent-nox (without X), instead of qbittorrent. qBittorrent-nox is meant to be controlled via its feature-rich Web UI which is accessible as a default on http://localhost:8080. The Web UI access is secured and the default account username is “admin” with “adminadmin” as a password. You can start qBitorrent-nox with:

qbittorrent-nox

However, starting qBittorrent-nox this way isn’t recommended, because you can’t run other commands while it’s running. Press Ctrl+C to quit it now. We can create a systemd service unit so it can run in the background and also automatically start at system boot time.

The qbittorrent-nox package ships with the needed systemd service file. Under /usr/lib/systemd/system/ directory, you will find a [email protected] file. Enable qbittorrent-nox to auto-start at boot time by running the below command. Replace username with your actual username.

sudo systemctl enable qbittorrent-nox@username.service

Now we can start the qBittorrent service with the following command.

sudo systemctl start qbittorrent-nox@username.service

Check status

systemctl status qbittorrent-nox@username.service

Output:

systemctl status qbittorrent-nox@username.service

Hint: If the above command doesn’t quit immediately, press Q to gain back control of the terminal.

We can see that qBittorrent autostart is enabled and it’s running.

Accessing qBittorrent Web UI

To access the qBittorrent Web UI from local network, enter the Ubuntu server’s private IP address followed by the port number like below.

192.168.0.101:8080

Username is admin. Default password is “adminadmin”.

install-qbittorrent-centos-server

The default web interface.

qbittorrent-as-a-service-centos8

It’s strongly recommended to change the default username and password. Go to Tools > Options and select the Web UI tab. Under the Authentication section, change both username and password.

qbittorrent-nox config file

And now you can start downloading torrents on your CentOS 8/RHEL 8 server. You have the option to upload local torrents or add magnet links.

Accessing qBittorrent Web Interface Outside of Your Home Network

If you want to access qBittorrent Web UI remotely from your mobile phone or public Wi-fi, then you need to set up port forwarding in your router. Also I recommend setting up Nginx reverse proxy and enable HTTPS protocol to encrypt the communication.

Set Up Nginx Reverse Proxy for qBittorrent WebUI

A reverse proxy is a proxy for another web server. In this case Nginx will be acting as the reverse proxy for the qBittorrent WebUI. Setting up Nginx reverse proxy makes it easy to enable HTTPS protocol. Run the following command to install Nginx on CentOS 8/RHEL 8.

sudo dnf install nginx

Start Nginx.

sudo systemctl start nginx

Enable auto-start at boot time.

sudo systemctl enable nginx

Then create an Nginx server block file for qBittorrent WebUI.

sudo nano /etc/nginx/conf.d/qbittorrent-webui.conf

Copy and paste the following texts into the file. Replace the red-colored text with your own domain name. You should also set DNS A record for your domain name. If you don’t have a domain name yet, then I recommend buying a domain name from Namecheap because their price is lower than GoDaddy and they give you whois privacy protection free for life.

server {
  listen 80;
  listen [::]:80;
  server_name torrent.your-domain.com;

  access_log /var/log/nginx/qbittorrent.access;
  error_log /var/log/nginx/qbittorrent.access;

  location / {
    proxy_pass              http://localhost:8080/;
    proxy_set_header        X-Forwarded-Host        $server_name:$server_port;
    proxy_hide_header       Referer;
    proxy_hide_header       Origin;
    proxy_set_header        Referer                 '';
    proxy_set_header        Origin                  '';
    add_header              X-Frame-Options         "SAMEORIGIN";
  }
}

Save and close the file. Then test Nginx configuration.

sudo nginx -t

If the test is successful, reload Nginx

sudo systemctl reload nginx

Now in your router, forward HTTP request (port 80) to the IP address of your Ubuntu server. After that, you can access qBittorrent WebUI via your domain name (torrent.your-domain.com).

Enable HTTPS to Encrypt Communications

To secure the Web UI, you can install a free TLS certificate issued by Let’s Encrypt. First you need to install the Let’s Encrypt client (certbot) on CentOS 8/RHEL 8 server.

sudo dnf install certbot python3-certbot-nginx

Python3-certbot-nginx is the Certbot Nginx plugin. After they are installed, run the following command to automatically obtain and install Let’s Encrypt certificate.

sudo certbot --nginx --redirect --agree-tos --hsts --staple-ocsp --email your-email-address -d torrent.your-domain.com

Once that’s done, refresh the qBittorrent Web UI. It will be automatically redirected to HTTPS connection.

qbittorrent remote webui

If the qBittorrent web interface can’t be loaded, you may need to open TCP port 80 and 443 in the firewall with the following two commands.

sudo firewall-cmd --permanent --add-service={http,https}
sudo systemctl reload firewalld

Wrapping Up

I hope this tutorial helped you install qBittorrent on CentOS 8/RHEL 8 desktop or server. You may want to use a VPN to hide your IP address when downloading torrents.

As always, if you found this post useful, then subscribe to our free newsletter to get more tips and tricks. Take care 🙂

Rate this tutorial
[Total: 1 Average: 5]

3 Responses to “How to Install qBittorrent on CentOS 8/RHEL 8 Desktop & Server

  • Przemek
    3 years ago

    Hello, I try to open port 6881 on my CentOS VPS server for qbittirrent. I try that methods but don’t work for me. Port is still closed. I use that VPS as a wireguard server.
    My qbittirrent (docker) is installed on local device connected as wireguard client (Ubuntu server 20.04 on Rpi3) with tunnel to my VPS wireguard server.
    Regards.

  • mark edwards
    1 year ago

    congratulations – you have the *ONLY* list of instructions for any torrent product on the RH-8 series linux’s that is very easy to follow and actually works. i finally gave up on ruTorrent. Deluge is not too bad, but had to install ‘snapd’ which seems like overkill.

    i am using rocky-linux 8.

    suggestion: some installations dont have the desktop. i was able to easily follow your excellent instructions and add a couple more:

    dnf –assumeyes install qbittorrent-nox ; ## imho i really like –assumeyes over -y but i am weird
    qbittorrent-nox ; ## starts the qbittorrent server without desktop

    you might consider including these lines in your excellent instruction list.

    also played with
    qbittorrent-nox –webui-port=12345 ; ## instead of the default port 8080

    thank you for your work.

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here