Created
January 4, 2026 04:36
-
-
Save benjaminshafii/a4d8e4a77970785069cd0e156f67f6c9 to your computer and use it in GitHub Desktop.
docker-compose.example.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| gluetun: | |
| image: qmcgaw/gluetun:latest | |
| container_name: gluetun | |
| cap_add: | |
| - NET_ADMIN | |
| devices: | |
| - /dev/net/tun | |
| environment: | |
| - VPN_SERVICE_PROVIDER=protonvpn | |
| - VPN_TYPE=wireguard | |
| - OPENVPN_USER=your_openvpn_username | |
| - OPENVPN_PASSWORD=your_openvpn_password | |
| - WIREGUARD_PRIVATE_KEY=your_wireguard_private_key | |
| - SERVER_COUNTRIES=United States | |
| - VPN_PORT_FORWARDING=on | |
| - VPN_PORT_FORWARDING_PROVIDER=protonvpn | |
| - VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'wget -O- --retry-connrefused --post-data \"json={\\\"listen_port\\\":{{PORTS}}}\" http://127.0.0.1:8080/api/v2/app/setPreferences 2>&1' | |
| - WIREGUARD_MTU=1320 | |
| - WIREGUARD_PERSISTENT_KEEPALIVE=25 | |
| - HEALTH_VPN_DURATION_INITIAL=30s | |
| - HEALTH_VPN_DURATION=10s | |
| - BLOCK_MALICIOUS=off | |
| - DOT_PROVIDERS=quad9 | |
| - TZ=America/New_York | |
| - PUID=1000 | |
| - PGID=1000 | |
| sysctls: | |
| - net.ipv4.conf.all.src_valid_mark=1 | |
| volumes: | |
| - /DATA/gluetun:/gluetun | |
| - /tmp/gluetun:/tmp/gluetun | |
| ports: | |
| - "8080:8080" # qBittorrent Web UI (through gluetun) | |
| - "9091:9091" # whatever else you were exposing | |
| restart: unless-stopped | |
| healthcheck: | |
| test: ["CMD-SHELL", "test -f /tmp/gluetun/forwarded_port"] | |
| interval: 60s | |
| timeout: 10s | |
| retries: 3 | |
| qbittorrent: | |
| image: hotio/qbittorrent | |
| network_mode: "service:gluetun" | |
| environment: | |
| - PUID=1000 | |
| - PGID=1000 | |
| - TZ=America/New_York | |
| - UMASK=002 | |
| volumes: | |
| - /path/to/downloads:/downloads | |
| - /path/to/downloads2:/downloads2 | |
| - /path/to/config:/config | |
| restart: unless-stopped | |
| depends_on: | |
| - gluetun |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment