Skip to main content

Qbittorrent

·
Docker downloads downloader Linux torrent web-ui self-hosted Docker Compose
Table of Contents

🦁 My qBittorrent Setup
#

This qBittorrent setup runs in a Docker container and is used to manage downloads via the qBittorrent web UI. It includes configurations for environment variables, volume mounts, and networking.


⚙️ My Configuration Details
#

🌍 Environment Variables
#

VariableDescription
PUID=0User ID for permission management (root user)
PGID=0Group ID for permission management (root group)
TZ=Europe/LondonTimezone configuration
WEBUI_PORT=8443Port for the qBittorrent web UI

📂 Volume Mounts
#

VolumeDescription
~/qbittorrent/config:/configMounts qBittorrent configuration data
~/media/downloads:/downloadsMounts media/downloads directory for torrents

🔗 Networking
#

Port MappingFunction
8080:8080qBittorrent web UI interface
6881:6881qBittorrent default port for torrents
6881:6881/udpqBittorrent UDP port for torrent traffic

📜 My Docker Compose Configuration
#

services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest # qBittorrent latest image
    container_name: qbittorrent # Container name for identification
    environment:
      - PUID=0 # Set user ID (root user)
      - PGID=0 # Set group ID (root group)
      - TZ=Europe/London # Set timezone
      - WEBUI_PORT=8443 # Set port for the web UI
    volumes:
      - ~/qbittorrent/config:/config # Mount the configuration directory
      - ~/media/downloads:/downloads # Mount the downloads directory
    ports:
      - "8080:8080" # Expose port 8080 for the qBittorrent web UI
      - "6881:6881" # Expose port 6881 for torrent traffic
      - "6881:6881/udp" # Expose port 6881/udp for torrent traffic
    restart: unless-stopped # Restart the container unless stopped manually

🔐 Using Docker Secrets for Environment Variables
#

You can set any environment variable from a file by using a special prepend FILE__.

For example:

FILE__MYVAR=/run/secrets/mysecretvariable