A qBittorrent client that routes all traffic through a VPN, ensuring privacy and security.
3.2K
A Dockerized qBittorrent client that routes all traffic through a VPN, ensuring privacy and security. This project provides an out-of-the-box solution for running qBittorrent with OpenVPN, including automatic port forwarding (if supported by your VPN provider) and a kill switch to prevent IP leaks.
natpmpc to request and maintain an open port (if supported by your VPN provider).compose.yml file.docker compose up
compose.yml according to your setup:
/home/qbittorrent/Downloads: Where downloaded files will be stored./root/vpn-config: This folder must contain:
.ovpn configuration file for your VPN..txt file with your VPN credentials (username on the first line, password on the second).natpmpc then the received port is shown in the container logs:
docker logs <container_name>
adminadminadmin
⚠️ Important: Change the password after your first login.natpmpc Errorsnatpmpc requires the VPN tunnel interface gateway to work. Due to routing table conflicts, the gateway cannot be automatically detected. If the heuristic fails, manually override it by setting the VPN_GATEWAY environment variable in your compose.yml:
environment:
VPN_GATEWAY: <your_vpn_gateway_ip>
This works only if you VPN provider allows port forwarding through natpmpc requests. If you want to disable this routine just define in your compose.yml this variable DISABLE_NATPMPC.
⚠️ Important: You won't be able to seed your torrents!
The container enforces the following firewall rules by default:
| Rule | Policy |
|---|---|
Traffic through tun0 | ALLOW |
UDP traffic to <VPN_ADDRESS> port 1194 | ALLOW |
Replies from <VPN_ADDRESS> port 1194 | ALLOW |
Incoming TCP traffic to port 8080 | ALLOW |
Replies from port 8080 | ALLOW |
DNS requests to 1.1.1.1 port 53 | ALLOW |
Replies from 1.1.1.1 port 53 | ALLOW |
| All other traffic | DROP |
Note: The qBittorrent WebUI can only be hosted on port 8080.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the Unlicense License.
Content type
Image
Digest
sha256:7ce0b16f9…
Size
99.4 MB
Last updated
2 months ago
docker pull mattev02/qbittorrent-over-openvpn