A few more details for anyone hitting this same combo:
-
When qbt runs inside the gluetun network namespace, its WebUI is only reachable through gluetun - publish the port on the gluetun container and make sure the WebUI binds 0.0.0.0 (WebUI\Address in qbt.conf), otherwise the probe always fails while the app is fine.
-
Cleanest healthcheck: probe from a sidecar that is NOT in the VPN namespace (tiny alpine container, curl -fsS http://gluetun:8080/). Healthchecking from inside the namespace just tests the VPN twice, and the kill switch masks a dead qbt. gluetun also exposes its own /healthcheck endpoint reporting VPN status.
-
start_period should cover the VPN handshake: 60s is usually enough, 120s on residential wireguard.
-
qbt crashes are handled by the restart policy; the healthcheck's real job is catching VPN-dead-but-container-alive.
all 6 comments