Gluetun with Proton VPN with qBittorrent with Docker #2686
Replies: 16 comments 61 replies
|
Here's a docker-compose.yml that's 90% of the way there. Look to update all the variables ( For Gluetun will write the port you receive from protonvpn to a file and the In qbittorrent, make sure you check |
|
hello i keep having issues with proton vpn and glueton working and i belive from the logs that the vpn conencts but then it can't ping 1.1.1.1 so it then trys again here are the 2 docker.yml files i gave tried |
|
I've rewritten SnoringDragon/gluetun-qbittorrent-port-manager in Python. The goal was to make the integration between Gluetun and qBittorrent a bit more robust and configurable. Key improvements:
You can find the repository here: jopiermeier/gluetun-qbittorrent-port-manager I'd be happy on some feedback! |
|
Seems my issue was because the below in FIREWALL_OUTBOUND_SUBNETS=192.168.0.0/16,172.16.0.0/12 10.0.0.0/8 All is well in the world now :) |
|
For anyone else seeking an easy way to do this, here's how I did it with v3.40.0+ This env variable adds a command that runs once port forwarding starts and was added in v3.40.0. The command used updates the forward port that qBittorrent uses automatically with no need for any extra containers or anything else. I also made sure to add the qBittorrent web ui port to the ports in gluetun |
|
Hi, I've been having an issue where port-manager can read the output from gluetun and it says it is brought over to qbittorrent but nothing acctually changed in qbittorrent. Here is my stack |
|
newbie to Servarr stack here, trying to deploy bitmagnet first and current I dont own any VPN service subscriptions. ProtonVPN seems great, but you guys have been talking about port forwarding feature to make it work with torrent. Is this a paid feature? |
|
I've tried most solutions but cause i'm new in docker e supernewbie in coding, i cant' figure it out i setted the yaml services: gluetun: qbittorrent: i created the folders /volume1/docker/gluetun /volume1/docker/gluetun-tmp and /volume1/docker/gluetun/gluetun-scripts in /volume1/docker/gluetun/gluetun-scripts i created update_qb_port.sh #!/bin/sh ==============================================update_qb_port.shAggiorna la porta di qBittorrent con quellainoltrata da ProtonVPN tramite Gluetun==============================================Configurazione qBittorrentQB_USER="user" # utente WebUI qBittorrent PORT_FILE="/volume1/docker/gluetun-tmp/forwarded_port" Attendi che il file esistai=0 QB_PORT=$(cat "$PORT_FILE" | tr -d '[:space:]') if [ -z "$QB_PORT" ] || [ "$QB_PORT" = "0" ]; then echo "Porta forwarded: $QB_PORT" COOKIE=$(curl -s -i -X POST "$QB_HOST/api/v2/auth/login" if [ -z "$COOKIE" ]; then curl -s -X POST "$QB_HOST/api/v2/app/setPreferences" echo "qBittorrent aggiornato alla porta $QB_PORT" iall'avvio in /volume1/docker/gluetun-tmp/forwarded_port is correctly created and show the right forwarded port that u see on gluetun logs automatic change still do not work |
|
Is port forwarding for seeding working smoothly for qBitTorrent yet? I’m looking into using it on some containers that are primarily seeding so I won’t bother if port forwarding doesn’t work. Reading these comments it seems like it could be a challenge? |
|
Works fine. Just use a recent version and the buildin port update command. |
|
Really? Could you post your compose? I had to use a composer to start ciclyng control e port forwarding changingIl 12 mar 2026 06:05, NeyNey ***@***.***> ha scritto:
Works fine. Just use a recent version and the buildin port update command.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
|
You just need
Not sure if it requires no password for localhost set in QB |
|
for anyone that landed here looking for answers like me: I was having the same issue after switching to ProtonVPN I got tired of all the workarounds that never worked and wrote a script to just sync the damn thing and restart the services when it can't. I will leave a link here, it's simple and doesn't do anything it shouldn't but as with any code on the internet, make sure to read it before you run ;) https://github.com/brunoorsolon/gluetun-qbt-watchdog PS.: My personal setup is Gluetun + ProtonVPN (WireGuard) + qbittorrent. I can say it works for this specific case but can't really confirm it will fix any other combinations. Feel free to experiment and fork it if you need to solve a slightly different problem or send a PR if it can be integrated with the current one. I hope it helps someone out there. |
|
Been working with no issues for two years. But recently it just stopped updating my port on QB. When restarting gluetun it seems to work, until the port changes and it goes back to not working again. The logs below, is this a ProtonVPN issue? Shit is driving me insane. |
|
I’ve been digging into this exact behavior while running qBittorrent + SAB behind Gluetun, and I think a lot of the “restart timing / connectivity” issues people are seeing are actually the same underlying problem. With The catch is that Docker does not automatically rebind containers to that new namespace. So what you end up with is:
Manually restarting the dependent containers works because it forces them to attach to the new namespace. After hitting this a few times, I stopped treating it as a startup ordering problem and started treating it as a lifecycle mismatch between containers. I ended up building a small event-driven controller that watches for the Gluetun container lifecycle events and automatically recreates dependent containers when the namespace changes, so they reattach cleanly without manual intervention. It effectively turns this into a deterministic “rebind” step instead of relying on restarts or timing. Curious if others have approached it differently or found a cleaner way to handle namespace recreation in Docker. I ended up open sourcing the controller here if useful: https://github.com/darkiris4/vpn-rebind |
|
Since the last time I had to fix this and created the small port sync service, I never had any other problems. My advice for anyone dealing with this is trying to make your setup as simple as possible. Maybe add a service like the one I created or @darkiris4 is suggesting as a fallback but honestly even my port sync thing is no longer ""needed"" for the most part, once I reset everything and started from scratch with a simpler setup, the port mismatching is rarely happening (once a month, at most). |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello, total beginner here.
I'm trying to set up ProtonVPN, Gluetun, and qBittorrent with a properly forwarded port, but I can't figure it out. Since Proton assigns a random port, is there a compose file or guide that explains how to set this up?
I found some guides, but they seem outdated, and I'm not sure how to adapt them to the latest setup.
Also, as a side question—do Prowlarr, Sonarr, and Radarr need to run through Gluetun as well, or do they just communicate with qBittorrent? I'm a bit confused about how this works.
Any help would be greatly appreciated!
All reactions