Skip to content

How to Set Up qBittorrent on a Linux Server – 24/7 Torrent Client with a Web Interface

Set up qBittorrent on your Linux server: use the One-Click App with VueTorrent and HTTPS, or install it manually with Docker Compose. Includes password setup, the torrent port, download folder, and guidance on legal use.

27 November 202612 min read4 Views0 helpful

Introduction

qBittorrent is a free, open-source BitTorrent client. On a server, it runs without a screen as qbittorrent-nox and is controlled entirely through a web interface in your browser: add torrents, pause them, limit speeds, and track progress. This lets your VPS download and seed around the clock while your own computer is turned off. In this guide, we’ll show you two ways to set it up: the easy way as a One-Click App, where qBittorrent is available over HTTPS in just a few clicks, and the manual installation with Docker Compose. After that, you’ll learn how to transfer completed downloads to your own computer and what limitations to keep in mind.

Warning

Share legal content only With BitTorrent, you don’t just download files—you also distribute them to others. Only share content that you have the rights to or that is free to distribute, such as Linux distributions, open-source releases, Creative Commons-licensed works, or your own files. Under our Terms and Conditions, you are responsible for all content on your server and must not use it for illegal purposes. Sharing copyrighted content without the rights holder’s permission is not allowed. Complaints from rights holders are sent to us, and your service may be suspended in whole or in part in the event of violations.

When it makes sense to run qBittorrent on a VPS

A torrent client on a server, often called a seedbox, is useful if:

  • you want to download and seed large files around the clock without having to keep your PC running for days.
  • you want to reduce the load on your home internet connection, since uploads and downloads use the data center’s connection.
  • you want to distribute your own large files, such as mod packs, project releases, or images that you have the rights to share.
  • you want to add torrents while you’re away, using only your browser and no additional software.

A VPS is less suitable if you want to store very large amounts of data permanently. Storage space can run out quickly, so plan for the size of your downloads and regularly clean up completed files.

VueTorrent or the classic web interface?

Both methods in this guide use the same qBittorrent core, but look different in your browser:

One-Click AppManual installation
InterfaceVueTorrent, a modern interface that’s easy to use on smartphones, tooqBittorrent’s classic web interface
Containers2 (qBittorrent and VueTorrent)1
Torrent port accessible from outsideNoYes, port 6881 (TCP and UDP)
HTTPSAutomatic via the domainVia your own reverse proxy

In both cases, qBittorrent itself manages your settings, torrents, and downloads. Choose the One-Click App if you mainly want to get started quickly. Choose the manual installation if you want other peers to be able to connect directly to your server.

The easy way: qBittorrent as a One-Click App

The quickest way to get qBittorrent is through the One-Click Apps on your VPS. The app installs qBittorrent together with the VueTorrent interface and is available over HTTPS using a domain. You don’t need a reverse proxy or certificate.

Requirements

  • A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. For instructions, see Set up One-Click Apps.
  • Access via SSH. You’ll need it once, during your first login, to read the temporary password from the logs.
  • Enough free storage space for the files you want to download.

Install

  1. Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
  2. Search the app catalog for qBittorrent and click Install app.
  3. Use a custom subdomain or zap.cloud is already selected, with a randomly generated name. Leave the option enabled or enter your own name: the domain is how you’ll access the interface over HTTPS.
  4. You don’t need to fill in anything under App configuration. All three values are optional:
    • WEBUI_PORT (default 8080): the internal port for the web interface. Leave it as is; you’ll access the app externally through the domain anyway.
    • RELEASE_TYPE (default stable): which VueTorrent release to download.
    • UPDATE_VT_CRON (default "0 * * * *"): how often VueTorrent checks for a new version. By default, it checks once an hour.
  5. Click Queue installation. After one or two minutes, qBittorrent will appear as online on the app card.

First login

The username is admin. There is no permanent password: when qBittorrent starts, it generates a temporary password and writes it only to the container logs. That’s why it doesn’t appear in the App environment. Connect to your VPS via SSH and retrieve it with this command:

Code
docker logs $(docker ps -q --filter name=qbit-) 2>&1 | grep "temporary password"

The password appears at the end of the line. Then log in:

  1. Open the app’s Access link. The VueTorrent login page will appear.
  2. Enter admin under Username and the password from the log under Password.
  3. Click Login. You’ll see the torrent overview.
Warning

Set your own password right away The temporary password is valid only until the container restarts. After each restart or update, qBittorrent generates a new one unless you’ve set your own. So, right after your first login, open the settings using the gear icon in the upper-right corner, go to the WebUI tab, and enter a long, unique password under Authentication. Save it using the disk icon in the upper-right corner. Your password will be permanent from then on.

After five incorrect login attempts, qBittorrent blocks the IP address for one hour. This protects against password guessing, but you could also lock yourself out if you mistype your password several times.

Torrent port and download folder

The One-Click App does not expose the torrent port 6881 to the outside. Downloads still work because qBittorrent connects to other peers itself: in our test, a Debian installation image downloaded in just a few seconds. However, other peers can’t connect to your server on their own. Completed torrents can therefore only upload to peers that are themselves reachable, and they’ll often show as “stalled” in the overview. If seeding is important to you, use the manual installation below, which opens the port.

qBittorrent saves completed files in the /downloads folder. This folder is in a Docker volume on your VPS. For instructions on transferring the files from there to your computer, see “Transfer downloads to your computer” below.

Updates and backups

You can update qBittorrent in the app settings (gear icon), under App update. Click Check for updates and install a new version with Apply update. If the page says the app is up to date, there isn’t a newer version in the app catalog yet. The VueTorrent interface updates itself independently.

Your settings, torrent list, and downloads are stored in Docker volumes and are retained during updates. If you haven’t set your own password, remember that a new temporary password will appear in the logs after an update. Also copy important completed files to your computer or another storage location—a volume is not a backup.

Manual installation

The rest of this guide covers the manual installation of qBittorrent with Docker Compose on your VPS. For example, you might use this method if you don’t use One-Click Apps on your server or want to open the torrent port for incoming connections. We’ll use the linuxserver.io image, which is also used by the One-Click App.

Requirements

  • A Linux VPS running Debian or Ubuntu, with SSH access. See First access via SSH.
  • Docker and Docker Compose. See Install Docker. Verify the installation with docker --version and docker compose version.
  • For HTTPS: a domain or subdomain whose A record points to your VPS’s IP address (e.g., torrent.example.com).

qBittorrent itself uses few resources; CPU and memory are rarely the bottleneck. Storage and network usage matter most:

ResourceWhat to consider
Storage spaceThe combined size of all torrents stored on the server at the same time, plus some extra space
NetworkSeeding generates continuous uploads, which count toward your traffic allowance
CPU and RAMUsage increases with the number of active torrents and connections

Prepare the firewall

The web interface listens on port 8080. You don’t need to open this port if you use a reverse proxy as described below. For incoming connections from other peers, however, you need the torrent port 6881 for TCP and UDP. With ufw, allow only what you need:

Code
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 6881/tcp
ufw allow 6881/udp
ufw enable
Warning

Docker bypasses ufw Ports published by Docker with ports: are accessible from outside even if ufw blocks them. Docker adds its own rules ahead of ufw’s rules. So, as in the Compose file below, bind the web interface only to 127.0.0.1. For more information about the firewall, see Managing the firewall on Linux.

Install with Docker Compose

Create a directory for qBittorrent and switch to it:

Code
mkdir -p /opt/qbittorrent
cd /opt/qbittorrent

Create the Compose file with nano docker-compose.yml. It’s based on the example in the official linuxserver.io documentation:

Code
services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:5.3.0
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    volumes:
      - ./config:/config
      - ./downloads:/downloads
    ports:
      - 127.0.0.1:8080:8080
      - 6881:6881
      - 6881:6881/udp
    stop_grace_period: 10s
    restart: unless-stopped

Here’s what the entries mean:

  • image: qBittorrent 5.3.0 at a fixed version, just like in the One-Click App. With a fixed version, you decide when to update.
  • PUID and PGID: qBittorrent creates files using this user and group ID. With 1000, the downloads belong to the system’s first regular user.
  • TZ: the time zone used for timestamps in the interface and logs.
  • WEBUI_PORT and TORRENTING_PORT: the ports for the web interface and torrent connections. If you change either one, always update both sides of the corresponding ports: line, as described in the documentation.
  • ./config:/config: settings and your torrent list are stored in the config folder alongside the Compose file.
  • ./downloads:/downloads: completed downloads go in the /opt/qbittorrent/downloads folder. You can retrieve them later via SFTP.
  • 127.0.0.1:8080:8080: the web interface is accessible only from the server itself; external access is through the reverse proxy.
  • stop_grace_period: gives qBittorrent ten seconds to save the state of all torrents properly when stopping.

Start the container:

Code
docker compose up -d

Check whether it’s running with docker compose ps and view the logs with docker compose logs -f.

First access

First, retrieve the temporary password from the logs:

Code
docker logs qbittorrent 2>&1 | grep "temporary password"

Because the web interface listens only on 127.0.0.1, you’ll access it the first time through an SSH tunnel. Run this command on your own computer:

Code
ssh -L 8080:localhost:8080 root@SERVER_IP

Replace SERVER_IP with your VPS’s IP address and open http://localhost:8080 in your browser. Log in with the username admin and the password from the log. Then open Tools > Options... > WebUI and set your own password under Authentication. Without a custom password, qBittorrent generates a new one every time it starts.

Access via HTTPS through a reverse proxy

To access qBittorrent without a tunnel, place a reverse proxy with a valid certificate in front of it. For the basics, see Set up a reverse proxy with nginx and Create an SSL certificate (Let’s Encrypt).

qBittorrent checks which address a request comes from. The nginx server block therefore follows the template from the qBittorrent wiki and forwards the headers qBittorrent expects:

Code
server {
    listen 80;
    server_name torrent.example.com;

    client_max_body_size 100M;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Host $proxy_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

client_max_body_size allows larger uploads, so you can add multiple torrent files at once. Then obtain the certificate with certbot --nginx -d torrent.example.com. Certbot adds HTTPS and HTTP redirection to the block.

Tip

Can’t log in, or is your IP blocked? If qBittorrent displays “IP has been banned” after several failed attempts, wait for the ban to expire or restart the container with docker compose restart. For access through the proxy, also enable Enable reverse proxy support in the WebUI settings and add 127.0.0.1 to the trusted proxies so qBittorrent can see visitors’ real IP addresses.

For more tips on securing your server, see Linux security tips.

Back up your data

The most important thing to back up is the config folder, which contains your settings and torrent list. Stop qBittorrent first so the files are in a consistent state:

Code
cd /opt/qbittorrent
docker compose stop
tar -czf qbittorrent-config-$(date +%F).tar.gz config
docker compose start

Also back up downloads in the downloads folder if you aren’t already copying them to your computer.

Update qBittorrent

Back up the config folder first and read the new version’s release notes. Then enter the new version number in docker-compose.yml and restart qBittorrent:

Code
cd /opt/qbittorrent
docker compose pull
docker compose up -d

Remove old images with docker image prune. Your custom password and all torrents will be retained because they’re stored in the config folder.

Manage torrents and transfer downloads to your computer

Once setup is complete, add torrents through the interface, either as a .torrent file or a magnet link. In VueTorrent, use the plus icon in the top bar; in the classic interface, use File > Add Torrent Link... or Add Torrent File.... An official torrent for a Linux distribution, such as the Debian installation image from debian.org, is a good way to try it out.

Transfer downloads to your computer

The easiest way to transfer completed files is via SFTP using a program such as FileZilla or WinSCP. For instructions on connecting, see Connect via SFTP.

  • Manual installation: files are in /opt/qbittorrent/downloads.
  • One-Click App: files are in the Docker volume whose name ends in qbittorrent-downloads. Use these two commands to find the exact path on the server:
Code
docker volume ls | grep qbittorrent-downloads
docker volume inspect -f '{{ .Mountpoint }}' VOLUME_NAME

Replace VOLUME_NAME with the name from the first command. Connect via SFTP as the root user and open the path shown, which starts with /var/lib/docker/volumes/.

Info

Free up space Once you’ve downloaded a file, remove the torrent in the interface and choose whether to delete the files as well. This keeps enough storage available for new downloads.

Limit speed and seeding

In the Speed tab of the settings, set maximum download and upload speeds. If you want, you can set separate limits for specific times of day. In the BitTorrent tab, choose how long completed torrents continue seeding, for example, until they reach a specific upload-to-download ratio. This helps you keep traffic and load under control.

Limitations

  • Storage space: Allow for the full size of each torrent for as long as its files remain on the server. If you run out of space, increase it in the Manage plan tab on your VPS.
  • Traffic: Downloads and uploads count toward your VPS’s traffic allowance. For details on what happens if you exceed it, see Traffic allowance, throttling, and traffic packages.
  • Continuous high load: Under our Terms and Conditions, a service must not use so much network capacity on a continuous basis that other customers or the platform are affected. If you have many active torrents at once, set reasonable limits for speed and connections.
  • No incoming connections with the One-Click App: The torrent port isn’t accessible from outside. See above for details.

Conclusion

You’ve set up qBittorrent on your VPS, created your own password, and know where your downloads are and how to transfer them to your computer. From now on, your server can download and seed around the clock without using your PC or home internet connection. Use it only for content you’re allowed to share.

Prefer not to handle Docker yourself? Use the easy One-Click App method described above under “The easy way: qBittorrent as a One-Click App.”

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

The One-Click App is the quickest option: qBittorrent runs with the VueTorrent interface over HTTPS on your domain within minutes, and you can install updates from the dashboard. However, its torrent port isn’t accessible from outside, so other peers can’t connect to it on their own. Manual installation with Docker Compose is a good choice if you want to open port 6881, control the version yourself, or use the classic web interface.
The username is admin. There’s no fixed default password: when qBittorrent starts, it writes a temporary password to the container logs. Use SSH and docker logs with grep "temporary password" to retrieve it, as described in the guide. Then set your own password under WebUI in the settings.
If you haven’t set your own password, qBittorrent generates a new temporary password each time the container starts, including after an update. Retrieve the current password from the logs, then set your own under WebUI in the settings. Your custom password will remain valid from then on.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.