Join us on Discord! We now have an official Discord server for OpenFLIXR: , these forums will continue to operate as normal.

Deluge and VPN in Docker Container (Private Internet Access VPN)

edited December 2017 in Docker
This is to setup Deluge torrent client, OpenVPN using Private Internet Access for use on
OpenFLIXR 2.0

This may be adapted to other providers as well if needed.

I Will be using binhex/arch-delugevpn

Deluge has the best compatibility with multiple private torrent providers /trackers i use, so
I went with deluge over transmission or qbittorrent (nether are allowed on most private
torrent trackers that require seeding ratios to be counted.

Docker is pre-installed in OpenFLIXR, no need to install it first.

Review and configure settings for your VPN info from the "VPN_Deluge_Setup_Script" 

docker run -d \
    --cap-add=NET_ADMIN \
    -p 8112:8112 \
    -p 8118:8118 \
    -p 58846:58846 \
    -p 58946:58946 \
    --name=delugevpn \
 --restart always \
    -v /apps/docker/deluge/data:/data \
    -v /apps/docker/deluge/config:/config \
 -v /mnt:/mnt \
    -v /etc/localtime:/etc/localtime:ro \
    -e VPN_ENABLED=yes \
    -e VPN_USER=PIAUsername \
    -e VPN_PASS=PIAPassword \
    -e VPN_PROV=pia \
 -e \
    -e ENABLE_PRIVOXY=yes \
    -e LAN_NETWORK= \
    -e NAME_SERVERS=,,,,, \
    -e DEBUG=false \
    -e UMASK=000 \
    -e PUID=1000 \
    -e PGID=1000 \

Change Username, Password, Remote Server Location, LAN IP range as needed.
execute docker install script by copying the script text from "VPN_Deluge_Setup_Script" 
after you edit the areas you need to change.

Run the whole script / text in an SSH session for openflixr.

Download PIA OpenVPN file from Private Internet Access.
The file is available from the client support area of their website, from
Advanced OpenVPN and SSL Usage Guides, at the bottom of the section, 
OpenVPN Configuration Files (Recommended Default) is what I used.
Extract the .zip and select your file of choice. I went with netherlands, it was easy and works
just fine for torrenting in the USA. I tried US_West, but was unable to get that working.

Place in /apps/docker/deluge/config/openvpn/

Place filename.ovpn file in that directory. In my case, Netherlands.ovpn was used. I was unable
to get US-West.ovpn and configuration working.
Place crl.rsa.2048.pem and ca.rsa.2048.crt in that directory as well. Both are part of the .zip
you should have downloaded.

I then used portainer and ran the docker container that was downloaded and setup.

From any web browser, enter http(s)://IPAddressofOpenFLIXR/portainer
I went to containers, and checked the box for delugevpn and started the container. The container
should have already been running; i also took the time to check the log file for any errors.

In deluge webui, http://IPAddressofOpenFLIXR:8112 (default initial password is "deluge").
I configured basic settings for deluge directories.
in preferences, in the Downloads settings for torrent directory defaults
I changed "Download to" to /mnt/downloads/incomplete
I changed "Move completed to:" /mnt/downloads/torrentcomplete 
I changed "Autoadd .torrent files from:" /mnt/downloads/torrentwatch

I also fully rebooted openflixr to test that the docker container starts, and everything comes up.

That concludes core configuration for Deluge with PIA VPN.


Install a desktop deluge client, YaRSS2 plugin, and connect to openflixr docker Deluge VPN server.
Download and install Deluge on your desktop platform. 
I used webmin http(s)://IPAddressofOpenFLIXR/webmin and went to "Other" > "File Manager" > 
/apps/docker/deluge/config/ and downloaded the "auth" file. With that, i got the username and
password that deluge was using (The docker version) for when we need to enter that into the
desktop deluge client.
On the desktop deluge client, i went to preferences > Interface > "Classic Mode" - uncheck the box.
I restarted the desktop deluge client. I went to "Connection Manager" > Add button to add new
I entered the IP address of my OpenFLIXR VM, and used the info from the auth file,
Username:Password but did not need the permission level 10 part. Saved the connection, and connected
to the remote client.
From the deluge desktop client, i installed YaRSS2 (Python 2.7 version) 1.4.3 (search google for it).
with the remote connection, i setup some RSS feeds for deluge, wich work by passing the settings to
the docker deluge server. Now you can close the deluge desktop client, and your RSS feeds will 
continue working.

Additional info:
I did not use Privoxy, so I did not get that working. Feel free to add something in this thread
if you do get that working, and what you did so that I, and others can do the same.



  • Thanks trying to get PIA and deluge working but newbie and not sure

    what is VPN_Deluge_Setup_Script?

  • I'm using ExpressVPN which is working great for me never got any issue about it. ExpressVPN is the best VPN that keeps your identity anonymous and also don't compromise your internet. I would recommend you giving it a try and in case of you get any inconvenience, you will have the 30-day money back guarantee. If still, you are confused about VPN than here you get the guide to best VPN service. It would help you choose which VPN you have to pick.
  • I got this working with your instructions: had to remove the indent spaces from the setup script if that helps other users.

    Privoxy just worked perfectly in Radarr and Sonarr.

    However, the /mnt/downloads/incomplete was not accessible because /mnt/ was owned by root:root so, I changed the Download to folder to /data/downloads/incomplete and it immediately started working and downloading as /data/ is configured to be permissioned to nobody:home with standard configuration and deluge couldn't write to /mnt/ as root (I think?).

    The problem is now that once the file has downloaded Sonarr fails the move of the completed file (which can happily seed) because: Import failed, path does not exist or is not accessible by Sonarr: /data/downloads/torrentcomplete.

    I think this is because Sonarr can't see the container's /data/ folder.

    Should I change the owner of /mnt/ to not be root - eg openflixr, nobody? How do I do that? There are instructions for a Transmission container but the ssh commands doesn't work in the Portainer command line... I really am a noob and spent a lot of time googling all this at each failed log entry... and I'm so close...

    Or should I just map /apps/docker/deluge/data to a mount that Sonarr can see through webmin? How would I do that?

    I don't understand how m1e1w1 got this working without running into the root:root ownership of /mnt/ in the first place as our settings would have been identical out of the binhex container?

    Can someone please help?

Sign In or Register to comment.