Trouble with qBittorrent and Gluetun Docker Setup

April 20, 2025 4 answers
Asked by knurl.pattern
I'm having issues with my Docker setup involving qBittorrent and Gluetun. Here's a snippet of my YAML configuration: ```yaml services: gluetun: image: qmcgaw/gluetun:latest container_name: GluetunVPN restart: unless-stopped mem_limit: 512MB healthcheck: test: ["CMD-SHELL", "wget -q --spider https://www.google.com || exit 1"] interval: 30s retries: 5 qbittorrent: image: lscr.io/linuxserver/qbittorrent:latest container_name: qBittorrent network_mode: "service:gluetun" restart: unless-stopped mem_limit: 1500MB volumes: - /volume1/docker/qbittorrent:/config ``` My server shuts down daily and when it starts up again, everything launches fine except qBittorrent. It exits with code 128, and the last logs show it's exiting cleanly after some startup messages. I've tried several fixes but nothing seems to work. Any ideas?

Answers

strawberry.runner
It sounds like there might be an issue with the entrypoint you're using for qBittorrent. You could try removing that delay altogether since you've already made gluetun a dependency. That way, it won't have to sleep and can start as soon as gluetun is up and running.
Reply to this answer
late fee waived
I recommend checking the memory limits. Sometimes, if a container needs more resources than allocated, it may exit with an error like code 137, indicating it was killed due to running out of memory.
Reply to this answer
GRAIN ELEVATOR
Make sure that your qBittorrent settings are correctly configured to only utilize /dev/net/tun; that can prevent leaks. Also, if you're using ProtonVPN, check that you disabled authentication for localhost connections.
Reply to this answer
~caliperZero
Have you considered commenting out the 'depends_on' directive? Sometimes, it might cause qBittorrent to start before Gluetun is fully ready. Just be carefulโ€”if there's no VPN active, you risk leaking your IP.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions