Created
October 16, 2024 16:52
-
-
Save minicoz/e746b981ff90f1fc328e48c52e1f4541 to your computer and use it in GitHub Desktop.
Gluetun qbitorrent automatic port setting ProtonVPN
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
# Docker compose (or Portainer stack) to run a ProtonVPN gluetun qbitorrent with self updating port web ui client. | |
version: "3" | |
services: | |
gluetun: | |
image: qmcgaw/gluetun | |
hostname: gluetunvpn | |
container_name: gluetun | |
cap_add: | |
- NET_ADMIN | |
devices: | |
- /dev/net/tun:/dev/net/tun | |
ports: | |
- 8181:8181 # qbitorrent | |
volumes: | |
- /home/Configs/gluetun:/gluetun # Saves at A | |
environment: | |
- VPN_SERVICE_PROVIDER=protonvpn | |
- VPN_TYPE=wireguard | |
- WIREGUARD_PRIVATE_KEY= | |
- SERVER_HOSTNAMES= | |
- VPN_PORT_FORWARDING=on | |
- DOT_PROVIDERS=quad9 | |
- UPDATER_PERIOD=24h | |
- VPN_PORT_FORWARDING_STATUS_FILE=/gluetun/forwarded_port # A. THIS IS IMPORTANT to record the port! | |
restart: unless-stopped | |
qbittorrentvpn: | |
image: lscr.io/linuxserver/qbittorrent:4.6.7 | |
container_name: qbittorrent | |
environment: | |
- PUID=1000 | |
- PGID=1000 | |
- UMASK=022 | |
- WEBUI_PORT=8181 | |
volumes: | |
- /home/Configs/qBittorrent:/config | |
- /home/Downloads/Torrents:/downloads | |
restart: unless-stopped | |
network_mode: "service:gluetun" | |
depends_on: | |
gluetun: | |
condition: service_started | |
# This service periodically read the forwarded_port file and updates qbitorrents port | |
portsetter: | |
image: charlocharlie/qbittorrent-port-forward-file | |
container_name: qbitportforward | |
restart: unless-stopped | |
environment: | |
- QBT_USERNAME= | |
- QBT_PASSWORD= | |
- QBT_ADDR=http://localhost:8181 | |
- PORT_FILE=/gluetun/forwarded_port # This should match A | |
volumes: | |
- /home/Configs/gluetun:/gluetun # This should match A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment