services:
  qbittorrent:
    container_name: qbittorrent
    image: ghcr.io/hotio/qbittorrent
    ports:
      - "8000:8080"
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK=002
      - TZ=Etc/UTC
      - WEBUI_PORTS=8080/tcp,8080/udp
      - VPN_ENABLED=true
      - VPN_CONF=wg0
      - VPN_PROVIDER=pia
      - VPN_LAN_NETWORK=192.168.4.0/24
      - VPN_LAN_LEAK_ENABLED=false
      - VPN_EXPOSE_PORTS_ON_LAN
      - VPN_AUTO_PORT_FORWARD=true
      - VPN_AUTO_PORT_FORWARD_TO_PORTS=
      - VPN_KEEP_LOCAL_DNS=false
      - VPN_FIREWALL_TYPE=auto
      - VPN_HEALTHCHECK_ENABLED=true
      - VPN_PIA_USER=p0363376
      - VPN_PIA_PASS=cq89D59uVf
      - VPN_PIA_PREFERRED_REGION
      - VPN_PIA_DIP_TOKEN=no
      - VPN_PIA_PORT_FORWARD_PERSIST=false
      - PRIVOXY_ENABLED=false
      - UNBOUND_ENABLED=false
    volumes:
      - /root/data/qbt/config:/config
      - /root/data/qbt/data:/data
    cap_add:
      - NET_ADMIN
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv6.conf.all.disable_ipv6=1
    restart: always