Skip to content

Deluge with OpenVPN in Docker on a Synology NAS

FAQs

Q: How can I be sure the VPN connection is working?

Grab the magnet on the Check My Torrent IP site after a few seconds the site will show the IP address of the connection it finds. This will be of the VPN provider not your home IP.

Q: Why can’t I start the Deluge container via the DSM GUI?

A: Due to the way in which this container works the DSM GUI is unable to start the container again if you stop it. In order to start it correctly you will just need to SSH back into your Diskstation and re-run the docker compose—up command.

Q: I am using Mullvad and having issues connecting!

A: Mullvad has a slightly different VPN config compared to some. In order for you to have a successful connection you (may)need to make the following additional edits to the vpn.conf file. We have found through troubleshooting on Discord that the edits you need do vary though!

VariableValue
up /etc/openvpn/update-resolv-confup /vpn/update-resolv-conf
down /etc/openvpn/update-resolv-confdown /vpn/update-resolv-conf
tun-ipv6#tun-ipv6
Three additional variables to add after the #tun-ipv6pull-filter ignore “dhcp-option DNS6”
pull-filter ignore “tun-ipv6”
pull-filter ignore “ifconfig-ipv6”

In addition to the above you may need to add the following to your .yml if you receive an error ‘RTNETLINK answers permission denied’ it will go into the vpn section.

sysctls:
  - net.ipv6.conf.all.disable_ipv6=0

Q: How can I add additional services to the VPN container?

A: See the example docker compose file below. Note the amendment to the ‘network mode’ to make the Prowlarr container use the VPN and the addition of its port numbers to the VPN container section.

version: "3.8"
services:
  vpn:
    container_name: vpn
    image: dperson/openvpn-client:latest
    cap_add:
      - net_admin # gives docker admin rights to amend network settings
    devices:
      - /dev/net/tun #points to the tun device created by the syno VPN package
    volumes:
      - /volume1/docker/vpn:/vpn #The location of our config files
    security_opt:
      - label:disable
    environment:
      OPENVPN_OPTS: '--mute-replay-warnings'
      DNS: --9.9.9.9 #this will override your default DNS and avoids connection issues you can change this value if you wish
    ports: #the port below allow the WebUI of any application connecting through the VPN to remain accessible locally
      - 8112:8112 # port for deluge - Add a line for each application you want to use the VPN
      - 9696:9696 # port for prowlarr
    command: '-f "" -r "192.168.0.0/24"' # amend this in line with your local network settings
    restart: unless-stopped
      
  linuxserver-deluge:
    image: ghcr.io/linuxserver/deluge
    container_name: deluge
    network_mode: service:vpn # tells the container to use the VPN network
    environment:
      - PUID=YOURPUID
      - PGID=YOURPGID
      - TZ=YOURTIMEZONE
      - DELUGE_LOGLEVEL=error #optional
    volumes:
      - /volume1/docker/deluge:/config
      - /volume1/data/torrents:/data/torrents
    depends_on: #tells the container that the VPN container will need to be running for it to work
      - vpn

  linuxserver-prowlarr:
    image: linuxserver/prowlarr:develop
    container_name: prowlarr
    environment:
      - PUID=YOURPUID
      - PGID=YOURPGID
      - TZ=YOURTIMEZONE
    volumes:
      - /volume1/docker/prowlarr:/config
    network_mode: service:vpn # run on the vpn network
    depends_on:
      - vpn
    restart: unless-stopped

More will be added as questions come up



Throw me some bits or buy me a coffee?

If you have found my site useful please consider pinging me a tip as it helps cover the cost of running the site, you can even buy me a coffee 🙂

Buy Me A Coffee
Doge / Ethereum / Bitcoin

Pages: 1 2

Published inDockerDownload ToolsSynology

54 Comments

  1. Louis Louis

    Thank you very much for all your hard work. I appreciate your efforts to make all these guides.
    I just finally installed deluge with vpn. It s working ok. However, checking the log through Portainer, there are few warnings that I would like you to take a look and see if there is anything I can do about them. Thank you in advance.
    Here the logs:
    /usr/lib/python3.10/site-packages/pkg_resources/init.py:1235: UserWarning: Extraction path is writable by group/others and vulnerable to attack when used with get_resource_filename (/config/plugins/.python-eggs). Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).

    • Dr_Frankenstein Dr_Frankenstein

      Hey no problem glad they are helping – That is a pretty standard warning, it’s saying that other users have access to the same folders. Essentially your normal admin user has access as well as the dockerlimited user. On a standard Linux install the configs are stored in the users /home directory which only that user has access too, so it’s throwing the warning as it doesn’t know its in Docker. Nothing to be concerned about.

    • Louis Didier Louis Didier

      Thank you very much again for taking time to address and clarify the logs. That makes sense now. Cheers!

  2. Hi Dr. I’m new to all this and your guide is very helpful. Really saving my bacon! I’ve got deluge set up but nothing is downloading. My Tracker status says ‘Error: Host not found (non-authoritative), try again later” any ideas?

    • Dr_Frankenstein Dr_Frankenstein

      Hey Fred, I am going to assume that the VPN container is connected. Double check the logs to be sure as this sounds like a DNS issue and the Deluge container is actually being blocked as it should be when no VPN is connecting. Might be worth reaching out to be via Discord or the Contact me page. Top left of this site under my logo.

  3. Mike Mike

    Wonderful guide! I seem to be running into the same issue as Stevvy above – my VPN container is on a constant “restarting” loop. In looking at the logs, it seems perhaps this line item is the culprit:

    ip6tables v1.8.4 (legacy): can’t initialize ip6tables table `nat’: Table does not exist (do you need to insmod?)

    Thanks for any assistance you can offer!

    • Dr_Frankenstein Dr_Frankenstein

      Hey, that warning is actually normal can you reach out on Discord or ping me an email via the contact form.. Top left under the site logo. I can take a look at the full log and give you a fix.

  4. digzi digzi

    Is there a way to have multiple LAN’s under the “command:” part? The LAN on my WiFi, and wired networks are different.

    • Dr_Frankenstein Dr_Frankenstein

      Hey, yes I believe you can change the line to…

      command: ‘-f “” -r “192.168.0.0/24″‘ -r 192.168.254.0/24 -f # route local network traffic

      Replace the IPs with your own.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

drfrankenstein.co.uk – writing Synology Docker Guides since 2016 – Join My Discord!