Skip to main content VPN and Qbittorrent containers : r/docker
r/docker icon
Go to docker
•

VPN and Qbittorrent containers

Hi everyone,

I'm trying to create a docker-compose file with 2 containers, one is a ubuntu container with the Nordvpn VPN on it and the other is a Qbittorrent container. My goal is to use the Qbittorrent container with the VPNcontainer for privacy, but i have a problem. When i activate the VPN on the Nordvpn container, i cannot access the Qbittorrent container with the localhost:8080 url. I tried different methods, but nothing worked for me. I am seeking for help from the community. Any idea will be very appreciated. Here's my docker-compose file.

version: "2"

services:

nordvpn:

image: ubuntu

container_name: nordvpn_test

cap_add:

- NET_ADMIN

devices:

- "/dev/net/tun:/dev/net/tun"

privileged: true

tty: true

ports:

# QBT UI Port

- "0.0.0.0:8080:8080/tcp"

# Bittorrent port

- 6881:6881

- 6881:6881/udp

command: /bin/bash

restart: unless-stopped

qbittorrent:

image: linuxserver/qbittorrent

container_name: qbittorrent_test

environment:

- PUID=1003

- PGID=1004

#- TZ=America/New_York

#- UMASK_SET=022

#- WEBUI_PORT=8080

volumes:

- /media/dockerdata/qbt/config:/config

- /media/jellyfin/downloads

- /media/jellyfin/movies

- /media/jellyfin/shows

network_mode: service:nordvpn

restart: unless-stopped

Easily automate change orders and workflows to deliver construction projects on budget with the new Intuit Enterprise Suite.
Clickable image which will reveal the video player: Easily automate change orders and workflows to deliver construction projects on budget with the new Intuit Enterprise Suite.
Sort by:
Best
Open comment sort options
• • Edited

add

ports: []

to the qbitorrernt service and see if that works.

Also try changing

# QBT UI Port  
- "0.0.0.0:8080:8080/tcp"

to

- "8080:8080"

Also, gluetun container supports NordVPN and works well, if you want a VPN container already setup.

I second this. I recently discovered Gluetun and it's great. Their documentation and guides on their git is better than great.

thanks for your advice! Gluetun worked immediately. Here's my docker-compose file for someone whith the same problem.

version: "3"

services:

gluetun:

image: qmcgaw/gluetun

container_name: gluetun

cap_add:

- NET_ADMIN

environment:

- VPN_SERVICE_PROVIDER=nordvpn

- OPENVPN_USER=user

- OPENVPN_PASSWORD=password

- SERVER_REGIONS=Netherlands

ports:

- 8080:8080/tcp

- 9117:9117/tcp

- 7878:7878/tcp

network_mode: bridge

qbittorrent:

image: linuxserver/qbittorrent

container_name: qbittorrent

network_mode: service:gluetun

restart: unless-stopped

radarr:

image: lscr.io/linuxserver/radarr:latest

container_name: radarr

network_mode: service:gluetun

restart: unless-stopped

jackett:

image: lscr.io/linuxserver/jackett:latest

container_name: jackett

network_mode: service:gluetun

restart: unless-stopped

More replies
More replies

I went with the qbittorrentvpn container.