Skip to main content

qBittorentVPN (hotio)

version: "3.3"
services:
  qbittorrentvpn:
    image: trigus42/qbittorrentvpn
    container_name: qbittorrentvpn
    privileged: true   
    environment:
      ## Not needed when using Wireguard
      # - VPN_USERNAME=myvpnusername
      # - VPN_PASSWORD=myvpnpassword
      - PUID=998 #optional
      - PGID=100 #optional
      ## This environment variable doesn't exist
      # - WEBUI_PORT_ENV=8991 #optional
      ## This neither
      # - INCOMING_PORT_ENV=8999 #optional
      - VPN_ENABLED=yes
      - LAN_NETWORK=192.168.0.0/24 # Or 192.168.1.0/24 depending on network
      - NAME_SERVERS=1.1.1.1,1.0.0.1
    ports:
      ## As you mentioned you need to set WebUI\HostHeaderValidation=false in the qBittorrent.conf but then this is perfectly fine
      - 8991:8080
      ## You probably don't want to be directly connectable (circumventing the VPN)
      ## If you want to be connectable, you have to use a VPN that allows port forwarding (you don't have to connectable for most things, except if you use private trackers)
      ## This didn't do much anyway cause you didn't allow the ports in the firewall using ADDITIONAL_PORTS
      # - 8999:8999
      # - 8999:8999/udp
    volumes:
      - /srv/path/Files/QBittorentVPN/config:/config
      - /srv/path/Files/QBittorentVPN/downloads:/downloads
      - /srv/path/Files/QBittorentVPN/skins:/skins
    restart: unless-stopped

Optionnal : set WebUI\HostHeaderValidation=false in the qBittorrent.conf

Default creditentials
admin
adminadmin

If Web UI Stuck on "Unacceptable file type, only regular file is allowed", go to:
"/home/qbittorrent/.config/qBittorrent" and edit the config file: "WebUI\AlternativeUIEnabled=true" to "WebUI\AlternativeUIEnabled=false"

Alternative WebUI :
https://github.com/bill-ahmed/qbit-matUI/releases
https://github.com/WDaan/VueTorrent/releases

MIGHT NOT WORK WITH SOME BROWSERS ! If so, try a different one.

Variable Function Example Default
VPN_ENABLED Enable VPN (yes/no)? VPN_ENABLED=yes yes
VPN_TYPE WireGuard or OpenVPN (wireguard/openvpn)? VPN_TYPE=openvpn wireguard
VPN_USERNAME If username and password provided, configures all ovpn files automatically VPN_USERNAME=ad8f64c02a2de
VPN_PASSWORD If username and password provided, configures all ovpn files automatically VPN_PASSWORD=ac98df79ed7fb
LAN_NETWORK Comma delimited local Network's with CIDR notation LAN_NETWORK=192.168.0.0/24,10.10.0.0/24
SET_FWMARK Make web interface reachable for devices in networks not specified in LAN_NETWORK yes no
ENABLE_SSL Let the container handle SSL (yes/no) ENABLE_SSL=yes no
NAME_SERVERS Comma delimited name servers NAME_SERVERS=1.1.1.1,1.0.0.1 1.1.1.1,1.0.0.1
PUID UID applied to /config files and /downloads PUID=99 1000
PGID GID applied to /config files and /downloads PGID=100 1000
UMASK Set file mode creation mask UMASK=002 002
HEALTH_CHECK_HOST This is the host or IP that the healthcheck script will use to check an active connection HEALTH_CHECK_HOST=8.8.8.8 1.1.1.1
HEALTH_CHECK_INTERVAL This is the time in seconds that the container waits to see if the VPN still works HEALTH_CHECK_INTERVAL=5 5
INSTALL_PYTHON3 Set this to yes to let the container install Python3 INSTALL_PYTHON3=yes no
ADDITIONAL_PORTS Adding a comma delimited list of ports will allow these ports via the iptables script ADDITIONAL_PORTS=1234,8112
DEBUG Print information useful for debugging in log yes no