I'm using qbittorrent and a seperate openvpn container. I have qbittorrent depending on vpn for network.
Here's my compose script.
Take this, change 'oeckusername' and 'oeckpw' to your username and password.
Add your download directories.
Stick your Oeck .ovpn file in /openvpn/ on your server.
Replace any environment variables I have below with either your own, or just replace with your own values.
Run it.
qbittorrent will run on port 8888.
Then go to your Oeck port forward configuration, enable one of them and forward it to port 6881.
Done
Good luck, took me a while to get this working - hope it saves you some time.
YAML:
vpn:
container_name: vpn
image: dperson/openvpn-client
cap_add:
- net_admin
environment:
- TZ=${TZ}
read_only: true
tmpfs:
- /run
- /tmp
restart: unless-stopped
security_opt:
- label:disable
stdin_open: true
tty: true
volumes:
- /dev/net:/dev/net:z
- /openvpn:/vpn
# You will need to change this, read https://github.com/dperson/openvpn-client
# -r is your CIDR network (I specify two to allow my other docker containers in)
# -f should be set to your VPN port, all other ports get firewalled
# -p is for port forwarding, so your torrent port forwards work.
command: '-r 192.168.1.0/24 -r 172.18.0.0/16 -f 1196 -p 6881 -a oeckusername;oeckpw'
# Since all the containers using the VPN share the same network interface
# Ports forwarded here reach the deluge container
ports:
- 8888:8888
- 6881:6881
- 6881:6881/udp
sysctls:
- net.ipv6.conf.all.disable_ipv6=0 # Remove this if you don't want IPv6
qbittorrent:
image: "linuxserver/qbittorrent"
container_name: "qbittorrent"
depends_on:
- vpn
network_mode: "service:vpn"
volumes:
- /path/to/my/downloads:/downloads
restart: always
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- UMASK=002
- WEBUI_PORT=8888