Skip to content

Setup qBitTorrent

Overview

The Qbittorrent project aims to provide an open-source software alternative to µTorrent. qBittorrent is based on the Qt toolkit and libtorrent-rasterbar library.

Important Docker Files

.env file

.env
NAME=qbittorrent
SUB=torrent
ID=1000
APPDATA=
DOMAIN=
PORT=8080
TZ=America/New_York
VPN_PROVIDER=
VPN_TYPE=
PRIVATE_KEY=
PRESHARED_KEY=
WG_ADDR
COUNTRY=
CITY=
DOWNLOADS=

docker-compose.yml file

docker-compose.yml
services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent
    container_name: ${NAME}
    restart: unless-stopped
    environment:
      PUID: ${ID}
      PGID: ${ID}
      TZ: ${TZ}
    volumes:
      - ${APPDATA}/${NAME}/config:/config
      - ${APPDATA}/${NAME}/downloads:/downloads
      - ${DOWNLOADS}:/completed
    network_mode: "service:gluetun"
    depends_on:
      - gluetun
    labels:
      com.centurylinklabs.watchtower.enable: true
  gluetun:
      image: qmcgaw/gluetun
      container_name: gluetun
      restart: unless-stopped
      cap_add:
        - NET_ADMIN
      environment:
        VPN_SERVICE_PROVIDER: ${VPN_PROVIDER}
        VPN_TYPE: ${VPN_TYPE}
        WIREGUARD_PRIVATE_KEY: ${PRIVATE_KEY}
        WIREGUARD_ADDRESSES: ${WG_ADDR}
        SERVER_CITIES: ${CITY} # Comma Seperated List
        DOT: on
        DOT_PROVIDERS: cloudflare
        DNS_ADDRESS: 194.242.2.2
        HTTP_CONTROL_SERVER_LOG: off
      networks:
        - main
      labels:
        swag: enable
        swag_address: gluetun
        swag_port: ${PORT}
        swag_proto: http
        swag_url: ${SUB}.${DOMAIN}
        com.centurylinklabs.watchtower.enable: true
networks:
  main:
    external: true

Start the Container

Start the Container
docker compose up -d

Changelog

2025-03-08

  • Added NFS Mounts to the docker-compose.yml file.
  • Updated Variables and added them to .env-sample file.
  • Upadated Network to follow new schema.
  • Removed DNS from docker-compose file, as it is no longer needed.
    • Previously fixed DNS issue occuring on servers with using the flag of tailscale up --accept-dns=false to no not overwrite DNS servers on the server.