Skip to content

Security model

What runs with which privileges, and what each layer protects against.

Who runs what

ProcessUserLinux capabilitiesNotes
tini, the entrypoint and its supervisorrootthe container’s, including NET_ADMINBuilds the firewall and routes, writes DNS, starts and stops everything else
OpenVPN and wireguard-govpn (873)CAP_NET_ADMIN only, as an ambient capability, with no_new_privsRead a private copy of the configuration under /run/qbtvpn
qBittorrentPUID:PGID, 99:100 by defaultnone, with an empty bounding set and no_new_privsBound to the tunnel interface
Privoxy, when enabledprivoxy (874)none, with an empty bounding set and no_new_privsIts own connections are confined to the tunnel by an owner rule

The ids 873 and 874 are fixed in the image, and PUID/PGID may not take them, so the firewall’s owner rules can never match the wrong process.

What each layer guards against

ThreatGuard
Torrent traffic leaving outside the VPN when it drops, restarts or misbehavesThe kill switch: DROP policies loaded before the VPN starts, never opened again, verified after each load
DNS revealing what you downloadDNS only through the tunnel; Docker’s resolver blocked; the VPN servers resolved once, before the final rules, so reconnects need no DNS
IPv6 bypassing an IPv4-only tunnelIPv6 leaves only through the tunnel, and is removed altogether when ip6tables does not work
qBittorrent reaching the internet another wayBesides the firewall, qBittorrent is bound to the tunnel interface, and its user is refused even the VPN servers’ addresses
A local proxy becoming a way around the VPNPrivoxy’s new connections may only enter the tunnel, so it cannot reach the LAN, the Docker networks or the WebUI on loopback
Someone else using the WebUIIt is reachable only from LAN_NETWORK and the container’s networks; a password is required, set from WEBUI_PASSWORD or a temporary one in the log; CSRF protection is on for new installs
Peers reaching the containerThe tunnel accepts inbound connections only on qBittorrent’s listen port
Secrets in docker inspect_FILE variants read passwords from Docker secrets; OpenVPN’s credentials go to a file only the vpn user can read
A compromised OpenVPNIt runs as its own user with one capability and cannot gain more

What it does not guard against

  • The VPN provider itself, which sees your traffic leave the tunnel.
  • Trackers and peers, which see the VPN’s address and what you share.
  • Anything given VPN_ENABLED=no, which runs qBittorrent with no VPN and no firewall.
  • Other containers joined with network_mode: service:: they share the firewall and the tunnel, but run with whatever privileges you give them.

The image itself

Every release is compiled from source that is checked before the build uses it: the qBittorrent tarball against its maintainer’s OpenPGP signature, both tarballs against GitHub’s SHA-256 digests. Published images carry build provenance and an SBOM, and an attestation that GitHub signs. The workflows pin every action by commit. See How the image stays current.