After enough times of getting tired having to go into Portainer to edit/recreate my qBittorrent container to use the gluetun network service, I decided to try and create a docker compose to upload as a stack.

Unfortunately, when adding a depends_on for gluetun in the qBittorrent service, I cannot get qBt to wait long enough for gluetun to connect to a server and be considered healthy. I was wondering if anyone else has run into an issue like this and been able to create a working healthcheck for gluetun that will allow the VPN to connect and then signal to qBt that it is clear to start.

TIA

you are viewing a single comment's thread
view the rest of the comments
[–] [B] 1 point 2 weeks ago

Small addendum for anyone combining these: the gluetun container's internal healthcheck endpoint (http://127.0.0.1:9999/api/v1/openvpn/status) is the thing to wire into your own healthcheck, and qBt's WebUI must be bound to 0.0.0.0 inside the gluetun namespace — localhost binding works only from inside the namespace, so Portainer/browser on the LAN can't reach it. Also verify the tunnel by comparing 'gluetun wget -qO- https://api.ipify.org/' against your real IP, not by whether the WebUI loads.

  • source