Deluge VPN

A short ‘How to’ about setting up Deluge using openVPN in docker.

Purpose: this is a tutorial on setting up arch-delugevpn container by binhex

Docker Compose

For this tutorial we are assuming that you have docker and docker compose installed, my current set up is running docker desktop on a windows 11 host machine. I am following in TRaSH Guide’s recommentations for file naming structure.

version: "3.2"
services:
  deluge-openvpn:
      image: binhex/arch-delugevpn
      container_name: delugevpn
      cap_add:
        - NET_ADMIN
      devices:
        - /dev/net/tun
      environment:
        - VPN_ENABLED=yes
        - VPN_USER=<username here> #<--------Dont forget to replace this.
        - VPN_PASS=<password here> #<--------and this.
        - VPN_PROV=vprvpn
        - LAN_NETWORK=192.168.8.0/24 #<-----you can change this to match your network range.
        #- NAME_SERVERS=1.1.1.1,1.0.0.1
        - DELUGE_DAEMON_LOG_LEVEL=info
        - DELUGE_WEB_LOG_LEVEL=info
        - PUID=1000
        - PGID=1000
        - TZ=America/Chicago
        - DELUGE_LOGLEVEL=error # optional
      ports:
        - 8112:8112
        - 8118:8118
        - 58846:58846
      volumes:
        - /docker/appdata/deluge:/config
        - "D:/data/torrents:/data/torrents"

Start containers

Navigate to the location of your docker file ending in .yml and run the below commands.

docker compose -f file-name.yml up

Please be aware that this first run will fail because the container does not have the correct openvpn files, this is expected.

Download OpenVPN files

You will need to download the appropriate OpenVPN files from your VPN provider, for my example i am using VprVPN.

Place ovpn files in container config.

In windows 11 docker desktop will create the config files in this directory, you will have a name that corresponds to your container.

\\wsl.localhost\docker-desktop\tmp\docker-desktop-root\docker\appdata 

For example we will use:

\\wsl.localhost\docker-desktop\tmp\docker-desktop-root\docker\appdata\deluge\openvpn 

I extracted and placed my ovpn file there then restarted the container.

If successfull you will be able to access your deluge instance at http://192.168.8.227:8112/ or the IP of your host machine.

Thanks.


Last modified April 28, 2025: Update Deluge VPN.md (fa87adf)