Skip to main content
  1. Posts/

Qbittorrent

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 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