Docker-compose nordvpn, qbittorrent, radarr, sonarr, jellyfin, jellyseerr

Hi,

I’m new to docker-compose and i try to create a Ubuntu media server with all the applications in the title (nordvpn, qbittorrent, radarr, sonarr, jellyfin, jellyseerr). The problem that i’m having is that i want all of my containers using the nordvpn ubuntu containers for privacy, but i also want to be able to go on my container with localhost. I’m not able to do both at the same time. here’s my docker-compose.yml file. I tried to publish ports on the containers and use network_mode:service:nordvpn at the same time but it’s not possible.

Thanks for your help


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
    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:/downloads
    network_mode: service:nordvpn
    ports:
      - "127.0.0.1:8080:8080"
      - "6881:6881"
      - "6881:6881/udp"
    restart: unless-stopped
  jackett:
    image: linuxserver/jackett
    container_name: jackett_test
    environment:
      - TZ=America/New_York
    volumes:
      - /media/dockerdata/prowlarr:/config
    restart: unless-stopped
    network_mode: service:nordvpn
    depends_on:
      - nordvpn
      - qbittorrent
  sonarr:
    image: linuxserver/sonarr:latest
    container_name: sonarr_test
    environment:
      - PUID=1002
      - PGID=1004
      - TZ=America/New_York
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /media/dockerdata/sonarr/config:/config
      - /media/jellyfin/shows:/tv
      - /media/jellyfin/downloads:/downloads
    restart: unless-stopped
    network_mode: service:nordvpn
    depends_on:
      - nordvpn
      - qbittorrent
  radarr:
    image: linuxserver/radarr:latest
    container_name: radarr_test
    environment:
      - PUID=1001
      - PGID=1004
      - TZ=America/New_York
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /media/dockerdata/radarr3/config:/config
      - /media/jellyfin/movies:/movies
      - /media/jellyfin/downloads:/downloads
    restart: unless-stopped
    network_mode: service:nordvpn
    depends_on:
      - nordvpn
      - qbittorrent
1 Like

Hi,
You must add on enviorement:

  • NETWORK=192.168.1.0/24 # So it can be accessed within the local network

Source: Docker

Thank you for share your comopose.

I am not sure how much sense it makes to suggest something related to a specific image, even though that image is not mentioned in the post. Furthermore, it does not address the issue with publishing ports.

This topic should give an idea where the port needs to be published: