Introduction
qBittorrent is a popular and open-source torrent client that can be installed on a wide range of operating systems including Linux.
A headless mode means running a program without a GUI (Graphical User Interface), which is ideal for a server setup where a GUI is not required.
In this blog, we will guide you through the process of installing qBittorrent in a headless mode on a Linux server.
Installing qBittorrent in Headless mode
The first step is to update the package list and install the required packages:
Once the installation is complete, start the qbittorrent-nox
service with the following command:
You can access the qBittorrent interface by visiting the following URL in your web browser: http://localhost:8080
Running qBittorrent in Background with SystemD
Running the command on the terminal directly is fine for testing it out, However, we don’t want to block the terminal window whenever we are running qBittorrent.
To run qBittorrent in the background, we can use SystemD, the init system used in modern Linux distributions. Here’s how you can do it:
Create a service file by using the following command:
Add the following content to the file:
Replace your_username
with your system user who would have read/write access (preferably non-root user).
Save and close the file.
Reload the SystemD configuration with the following command:
Start the qBittorrent service and enable it to start at boot time with the following commands:
If you are curious, you can read more in detail about SystemD and how to use it for running background services in one of my previous blog
Conclusion
In this blog, we showed you how to install qBittorrent in a headless mode on a Linux server and how to run it in the background with SystemD. The steps are straightforward and easy to follow, making it convenient for you to set up qBittorrent on your server.