ArrowLeft Icon

Effortlessly Manage Torrent Downloads with Headless qBittorrent on Linux

📆 · ⏳ 2 min read · 👀
·

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:

sudo apt update
sudo apt install qbittorrent-nox

Once the installation is complete, start the qbittorrent-nox service with the following command:

qbittorrent-nox

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:

sudo vi /etc/systemd/system/qbittorrent.service

Add the following content to the file:

[Unit]
Description=qBittorrent Daemon

[Service]
User=your_username
ExecStart=/usr/bin/qbittorrent-nox
Restart=on-failure

[Install]
WantedBy=multi-user.target

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:

sudo systemctl daemon-reload

Start the qBittorrent service and enable it to start at boot time with the following commands:

sudo systemctl start qbittorrent
sudo systemctl enable qbittorrent

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.

EnvelopeOpen IconStay up to date

Get notified when I publish something new, and unsubscribe at any time.

You may also like

  • # linux

    How to Use the Linux Socat Command for Bidirectional Data Transfer Between Network Connections

    The Linux socat command provides a powerful and flexible solution for bidirectional data transfer between network connections. In this article, we'll explore how to use the socat command in Linux and provide practical examples to help you get started.

  • # linux

    How to Use the Linux Shred Command for Secure File Deletion

    Deleting a file from your computer's hard drive doesn't actually erase the data, leaving it open to recovery by unauthorized individuals. The Linux `shred` command provides a simple and effective solution to securely delete files from your computer's hard drive. In this article, we'll explore how to use the `shred` command in Linux and provide practical examples to help you get started.

  • # linux

    How to Use the Linux Netcat Command for Network Communication and Testing

    The Linux 'nc' command, also known as Netcat, is a versatile networking tool that can be used for a variety of tasks such as network communication, port scanning, file transfer, and network testing. It provides a simple and effective way to connect and interact with other networked devices. In this article, we'll explore how to use the 'nc' command in Linux and provide practical examples to help you get started.