Download Clients

Now I will add the download clients deluge (for torrents) and sabnzbd (for nzb) to the VPN stack, moving all of the ports to the gluetun container and adding network_mode: container:gluetun the newly added containers.

services:

  ### VPN SERVICE ###

  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    ports:
      - 8888:8888/tcp
      - 8388:8388
      - 8112:8112 #deluge webui
      - 6881:6881 #deluge inbound torrent traffic
      - 9080:9080 #sabnzb
    volumes:
      - /var/lib/gluetun:/gluetun
    environment:
      - VPN_SERVICE_PROVIDER=mullvad
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=provided by mullvad
      - WIREGUARD_ADDRESSES=provided by mullvad
      - SERVER_COUNTRIES=USA
      - TZ=America/New_York
      - UPDATER_PERIOD=24h
      - UNBLOCK=usenetserver.com
      - FIREWALL_OUTBOUND_SUBNETS=192.168.0.0/24
    devices:
      - /dev/net/tun:/dev/net/tun
    restart: unless-stopped

### DOWNLOAD CLIENTS ###

  deluge:
    image: lscr.io/linuxserver/deluge:latest
    container_name: deluge
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      - DELUGE_LOGLEVEL=error
    volumes:
      - /mnt/torrents:/torrents
      - /var/lib/deluge:/config
    network_mode: container:gluetun
    restart: unless-stopped

  sabnzbd:
    image: lscr.io/linuxserver/sabnzbd:latest
    container_name: sabnzbd
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
    volumes:
      - /mnt/torrents:/torrents
      - /var/lib/sabnzbd:/config
    network_mode: container:gluetun
    restart: unless-stopped
networks: {}