Public | Automated Build

Last pushed: 5 hours ago
Short Description
Arch Linux base running Deluge, OpenVPN and Privoxy
Full Description

Application

Deluge website
OpenVPN website
Privoxy website

Description

Deluge is a full-featured ​BitTorrent client for Linux, OS X, Unix and Windows. It uses ​libtorrent in its backend and features multiple user-interfaces including: GTK+, web and console. It has been designed using the client server model with a daemon process that handles all the bittorrent activity. The Deluge daemon is able to run on headless machines with the user-interfaces being able to connect remotely from any platform. This Docker includes OpenVPN to ensure a secure and private connection to the Internet, including use of iptables to prevent IP leakage when the tunnel is down. It also includes Privoxy to allow unfiltered access to index sites, to use Privoxy please point your application at http://<host ip>:8118.

Build notes

Latest stable Deluge release from Arch Linux repo.
Latest stable OpenVPN release from Arch Linux repo.
Latest stable Privoxy release from Arch Linux repo.

Usage

docker run -d \
    --cap-add=NET_ADMIN \
    -p 8112:8112 \
    -p 8118:8118 \
    -p 58846:58846 \
    -p 58946:58946 \
    --name=<container name> \
    -v <path for data files>:/data \
    -v <path for config files>:/config \
    -v /etc/localtime:/etc/localtime:ro \
    -e VPN_ENABLED=<yes|no> \
    -e VPN_USER=<vpn username> \
    -e VPN_PASS=<vpn password> \
    -e VPN_PROV=<pia|airvpn|custom> \
    -e VPN_OPTIONS=<additional openvpn cli options> \
    -e STRICT_PORT_FORWARD=<yes|no> \
    -e ENABLE_PRIVOXY=<yes|no> \
    -e LAN_NETWORK=<lan ipv4 network>/<cidr notation> \
    -e NAME_SERVERS=<name server ip(s)> \
    -e DEBUG=<true|false> \
    -e UMASK=<umask for created files> \
    -e PUID=<UID for user> \
    -e PGID=<GID for user> \
    binhex/arch-delugevpn

Please replace all user variables in the above command defined by <> with the correct values.

Access Deluge

http://<host ip>:8112

Access Privoxy

http://<host ip>:8118

PIA provider

PIA users will need to supply VPN_USER and VPN_PASS, optionally define VPN_REMOTE (list of gateways https://www.privateinternetaccess.com/pages/client-support) if you wish to use another remote gateway other than the Netherlands.

PIA example

docker run -d \
    --cap-add=NET_ADMIN \
    -p 8112:8112 \
    -p 8118:8118 \
    -p 58846:58846 \
    -p 58946:58946 \
    --name=delugevpn \
    -v /apps/docker/deluge/data:/data \
    -v /apps/docker/deluge/config:/config \
    -v /etc/localtime:/etc/localtime:ro \
    -e VPN_ENABLED=yes \
    -e VPN_USER=myusername \
    -e VPN_PASS=mypassword \
    -e VPN_PROV=pia \
    -e STRICT_PORT_FORWARD=yes \
    -e ENABLE_PRIVOXY=yes \
    -e LAN_NETWORK=192.168.1.0/24 \
    -e NAME_SERVERS=8.8.8.8,8.8.4.4 \
    -e DEBUG=false \
    -e UMASK=000 \
    -e PUID=0 \
    -e PGID=0 \
    binhex/arch-delugevpn

AirVPN provider

AirVPN users will need to generate a unique OpenVPN configuration file by using the following link https://airvpn.org/generator/

  1. Please select Linux and then choose the country you want to connect to
  2. Save the ovpn file to somewhere safe
  3. Start the delugevpn docker to create the folder structure
  4. Stop delugevpn docker and copy the saved ovpn file to the /config/openvpn/ folder on the host
  5. Start delugevpn docker
  6. Check supervisor.log to make sure you are connected to the tunnel

AirVPN example

docker run -d \
    --cap-add=NET_ADMIN \
    -p 8112:8112 \
    -p 8118:8118 \
    -p 58846:58846 \
    -p 58946:58946 \
    --name=delugevpn \
    -v /apps/docker/deluge/data:/data \
    -v /apps/docker/deluge/config:/config \
    -v /etc/localtime:/etc/localtime:ro \
    -e VPN_ENABLED=yes \
    -e VPN_PROV=airvpn \
    -e ENABLE_PRIVOXY=yes \
    -e LAN_NETWORK=192.168.1.0/24 \
    -e NAME_SERVERS=8.8.8.8,8.8.4.4 \
    -e DEBUG=false \
    -e UMASK=000 \
    -e PUID=0 \
    -e PGID=0 \
    binhex/arch-delugevpn

Notes

Default password for the webui is "deluge"

User ID (PUID) and Group ID (PGID) can be found by issuing the following command for the user you want to run the container as:-

id <username>

The STRICT_PORT_FORWARD environment variable is used to define whether to force connection only to endpoints that support port forwarding when connecting to PIA (does not affect other providers).


If you appreciate my work, then please consider buying me a beer :D

Support forum

Docker Pull Command
Owner
binhex
Source Repository

Comments (17)
frosen
17 days ago

Hello! Could you clarify what the best method is to start this using your "Usage" script? Right now I saved it as a .sh file, open up quickstart terminal (on Win7), then run the script. Can you do something once the container loads the first time so those settings save? I feel like I'm missing something here...

mikegg
5 months ago

Regarding the comment on Synology users below - I would add that I had to reboot the box to get it to work. Simply running the script wasn't working for me.

frozenpizza
5 months ago

Synology users, please take note of my post on the support forum

prabhakar97
8 months ago

This is awesome! Tested it for hide.me and it worked perfectly through the air vpn way. Had to pass two extra fields -e VPN_USER=<username> -e VPN_PASS=<password>

victoere
9 months ago

Thanks, that simply explanation solved it. I sent some beer money your way.

binhex
9 months ago

you need to save incomplete and completed data to your volume mapping as defined via the -v flag. so for instance if you specify -v /tmp/data:/data then you tell deluge to save to /data and your files will magically appear on the host in /tmp/data/.

victoere
10 months ago

Container seems to work good but I cannot find where it downloads the files. I specified my download location in the preferences and the file path in the details tab shows the file path but when I go to that location the file is empty? I'll gladly buy you a beer if you can shed a little light on where these files might be located.

xenorites
a year ago

Could you add an option for the deluge daemon to be available, and expose corresponding ports in the container?

Thanks a ton for this image!

binhex
a year ago

you have not defined the VPN_PROV as detailed in your log:-

[crit] VPN provider not defined, please specify via env variable VPN_PROV

you need to define the env var with pia, airvpn or custom, depending on your vpn provider, see the examples above

raven123
a year ago

Hi there, awesome work

I have tried getting this to run inside Docker but have yet to be successfull in getting it wor run.

2016-06-18 13:42:07,767 INFO success: start-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2016-06-18 13:42:07,767 INFO success: webui-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2016-06-18 13:42:07,767 INFO success: deluge-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2016-06-18 13:42:07,768 INFO success: privoxy-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2016-06-18 13:42:07,780 DEBG 'start-script' stdout output:
[info] VPN is enabled, beginning configuration of VPN

2016-06-18 13:42:07,781 DEBG 'deluge-script' stdout output:
[info] VPN is enabled, checking VPN tunnel local ip is valid

2016-06-18 13:42:07,800 DEBG 'start-script' stdout output:
[crit] VPN provider not defined, please specify via env variable VPN_PROV

2016-06-18 13:42:07,800 DEBG fd 8 closed, stopped monitoring <POutputDispatcher at 140049975463376 for <Subprocess at 140049975462800 with name start-script in state RUNNING> (stderr)>
2016-06-18 13:42:07,800 DEBG fd 6 closed, stopped monitoring <POutputDispatcher at 140049975463016 for <Subprocess at 140049975462800 with name start-script in state RUNNING> (stdout)>
2016-06-18 13:42:07,801 INFO exited: start-script (exit status 1; not expected)
2016-06-18 13:42:07,801 DEBG received SIGCLD indicating a child quit

Any idea what's wrong here?
I am very new to Docker, thanks in advance :)