Jump to content
Paul_Ber

[Support] paulpoco - DelugeVPN-Flexget

51 posts in this topic Last Reply

Recommended Posts

Deluge-Flexget-icon-small.pngDeluge-Flexget-banner.jpg

 

Overview: Support for Docker image arch-delugevpn in the paulpoco repo.

Application: Deluge - http://deluge-torrent.org/

Application: Flexget - http://flexget.com/

Docker Hub: https://hub.docker.com/r/paulpoco/arch-delugevpn/

GitHub: https://github.com/paulpoco/arch-delugevpn

 

Dev version up to date added June 30, 2018.  Download a new OVPN file from your provider:

Docker Hub: https://hub.docker.com/r/paulpoco/arch-delugevpn-dev:dev/

GitHub: https://github.com/paulpoco/arch-delugevpn:dev/

Template Repository:  https://github.com/paulpoco/docker-templates

 

If you think my Docker helped you, buy a beer.

Bitcoin donation address:  1LA867GKG2VGxZS2iAtGab1WPFDJ3XnPtU

image.png.d258d98bfcca4130c6e67bdcbb86ee08.png

 

LTC donation address:  LTszTqvw5EQJBkNxpvJo4EiTYybMaNJgq3

image.png.c08782675c468731e7f54e2dbae8694a.png

 

ETH  donation address:  0x164b177Cfb7497c2dd270ED327bcE64A79C9c965

image.png.c4f55851ad5892eae06dcaf32e459d93.png

 

I forked Binhex's DelugeVPN because I use Flexget in my setup.  Flexget wants to see Deluge installed so it was best to have both in the same container.  Flexget starts daemonized and runs hourly.  The Flexget webui works but you need to try and manually get the flexget webui password by logging into the Docker.

 

I did my best not to mess with Binhex's great Docker parts for OpenVPN and Deluge and Privoxy.  I just inserted the Flexget installation in the right places to have it fully functioning after each reinstall or settings change and if the container get downloaded again.

 

For the setup other than Flexget it would be best to understand how to use Hexbin's DelugeVPN Docker first and getting that working first.  https://lime-technology.com/forum/index.php?topic=45812.0

 

Description Flexget with webui daemon

 

FlexGet is a multipurpose automation tool for content like torrents, nzbs, podcasts, comics, series, movies, etc. It can use different kinds of sources like RSS-feeds, html pages, csv files, search engines and there are even plugins for sites that do not provide any kind of useful feeds. There are numerous plugins that allow utilizing FlexGet in interesting ways and more are being added continuously. FlexGet is extremely useful in conjunction with applications which have watch directory support or provide interface for external utilities like FlexGet.

 

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. Latest stable Flexget release from Python.

 

Description DelugeVPN

 

Deluge is a full-featured BitTorrent client for Linux, OS X, Unix and Windows. It uses libtorrent in its back-end 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.

 

The following is exactly as is from Binhex's Readme file:

 

Usage

 

docker run -d \
    --cap-add=NET_ADMIN \
    -p 8112:8112 \
    -p 8118:8118 \
    --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_REMOTE=<vpn remote gateway> \
    -e VPN_PORT=<vpn remote port> \
    -e VPN_PROTOCOL=<vpn remote protocol> \
    -e VPN_PROV=<pia|airvpn|custom> \
    -e ENABLE_PRIVOXY=<yes|no> \
    -e LAN_NETWORK=<lan ipv4 network>/<cidr notation> \
    -e DEBUG=<true|false> \
    -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/#signup) 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 \
    --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_REMOTE=nl.privateinternetaccess.com \
    -e VPN_PORT=1194 \
    -e VPN_PROTOCOL=udp \
    -e VPN_PROV=pia \
    -e ENABLE_PRIVOXY=yes \
    -e LAN_NETWORK=192.168.1.0/24 \
    -e DEBUG=false \
    -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/

 

Please select Linux and then choose the country you want to connect to

Save the ovpn file to somewhere safe

Start the delugevpn docker to create the folder structure

Stop delugevpn docker and copy the saved ovpn file to the /config/openvpn/ folder on the host

Start delugevpn docker

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 \
    --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 DEBUG=false \
    -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>

 

 

image.png

Edited by Paul_Ber

Share this post


Link to post

Deluge Notes:

    - For Deluge Clients to connect over the LAN you need to check allow remote connections.

 

Flexget Notes:

    - Flexget-webui is very beta and unfinished per the Devs at http://flexget.com/wiki/Web-UI

    - Flexget-Webui now works on LAN network.

    - Set FLEXGET_WEBUI_PASSWORD in the section below PGID.

    - FLEXGET_WEBUI_PASSWORD has to be at least 8 characters.  If left blank it delfaults to flexpass.

    - ContainerDir of /home/nobody/.flexget has to not be changed, it is hard coded in the setup.

    - Change password with Docker Tab and delugevpn-flexget settings or manually:

docker exec -it delugevpn-flexget /bin/bash

flexget web passwd <some_password>  #from inside container

http://<host ip>:3539

 

 

I just did an update so now the latest version is Sept 17, 2016.

http://flexget.com/UpgradeActions

Share this post


Link to post

Just a few things that need to be done for a working setup:

 

Edit the auth file otherwise Deluge Clients will not be able to connect

a6993f7fac49422d81a9998360256e20.png

 

Change default file locations for when you manually add torrents otherwise your Docker will fill up

e8bc64e7afc84ad1a7d0b3e3bff1a200.png

 

For only non-PIA VPN - on incoming ports uncheck 'Use Random Ports' and fill in the port you picked with your VPN provider

741624745ccc406a9957d799819d6a8e.png

 

Check 'Allow remote connections' otherwise Deluge Clients will not be able to connect

506c3b034f29413090a9273cd47456cb.png

 

 

 

Share this post


Link to post

Woot! I'd been struggling with this same issue and had given up, just using two different containers and the blackhole method to get from Flextget to DelugeVPN. I'll take this for a spin. Thanks for doing this!

Share this post


Link to post

nice work paul_ber!, couple of points you might want to look into:-

 

1. changing the incoming port is only necessary if the vpn provider is NOT PIA, as i automagically set this for the user :-), you might want to note that in your instructions.

 

2. you might want to consider looking into AUR (arch user repository), this will vastly simplify the install of FlexGet for you, basically all the hard work is done by arch users and you simply then chmod/chown it for the correct user the docker container runs as, and then start it via supervisord, take a look here for examples of how im using this for another container i maintain (couchpotato):-

 

https://raw.githubusercontent.com/binhex/arch-couchpotato/master/setup/root/aur.sh

 

search result from AUR showing the stable and bleeding edge versions of flexcget on aur:-

https://aur.archlinux.org/packages/?O=0&SeB=nd&K=flexget&outdated=&SB=n&SO=a&PP=50&do_Search=Go

 

so you could simply take this above script, change the name to flexget in there, and include it as part of the docker build, just makes things easier, but of course its completely up to you :-).

 

edit - i must be going blind, i cant see where you define the install of flexget :-). spotted it, i see your installing it using python pip.

Share this post


Link to post

Binhex thanks.

 

Yes the incoming port was because I wasn't using PIA, I'll edit that later.

 

What do you think of the way I set the the Flexget-webui password?  It was a pain to have to enter the container and set it.

 

Sent from my XT1563 using Tapatalk

 

 

Share this post


Link to post

Binhex thanks.

 

Yes the incoming port was because I wasn't using PIA, I'll edit that later.

 

What do you think of the way I set the the Flexget-webui password?  It was a pain to have to enter the container and set it.

 

Sent from my XT1563 using Tapatalk

 

if you cant set the password via command line then the password could be done in a couple of ways:-

 

1. create an env var (expose via unraid xml) and allow the user to define it that way, then on init it sets the password:-

flexget web passwd <env var password>

 

2. find out what file the above command is modifying and sym link the file outside of the container, this then allows the user to edit, save, and restart for the change to take effect.

 

 

Share this post


Link to post

April 28, 2016

pip2 install --upgrade pip

pacman pkg-config gcc  #needed to update the security

pip2 install --upgrade --force-reinstall requests[security] #this stops insecure warnings in flexget

yes|pacman -Rs gcc  #remove gcc and dependencies as only needed for set above and saves lots of space

 

Flexget at version 2.0.7

pip2 at version 8.1.1

 

May 7, 2016    Re-built to upgrade Flexget from 2.0.7 to 2.0.14

                                  http://flexget.com/wiki/Plugins/tvmaze_lookup?version=7

                                  TV Maze Lookup

                                  This plugin looks up more information from tvmaze.com about any entries that FlexGet has identified as

                                  series. tvmaze_lookup will populate several more entry fields that can be used in other plugins

Share this post


Link to post

Binhex thanks.

 

Yes the incoming port was because I wasn't using PIA, I'll edit that later.

 

What do you think of the way I set the the Flexget-webui password?  It was a pain to have to enter the container and set it.

 

Sent from my XT1563 using Tapatalk

 

if you cant set the password via command line then the password could be done in a couple of ways:-

 

1. create an env var (expose via unraid xml) and allow the user to define it that way, then on init it sets the password:-

flexget web passwd <env var password>

 

2. find out what file the above command is modifying and sym link the file outside of the container, this then allows the user to edit, save, and restart for the change to take effect.

 

I am doing number 1 that you listed, an environmental variable for the Flexget Webui password.  I should also test that the password is at least 8 characters but I'll leave it to the user to use at least 8 characters.

 

# if FLEXGET_WEBUI_PASSWORD not specified then use default FLEXGET_WEBUI_PASSWORD = flexpass 
if [[ -z "${FLEXGET_WEBUI_PASSWORD}" ]]; then
FLEXGET_WEBUI_PASSWORD="flexpass"
echo "Using default Flexget-webui password of flexpass"
else
echo "Using userdefined Flexget-webui password of " "${FLEXGET_WEBUI_PASSWORD}"
fi

# run flexget set webui password and run daemon
/usr/bin/flexget web passwd "${FLEXGET_WEBUI_PASSWORD}"
/usr/bin/flexget -c /home/nobody/.flexget/config.yml daemon start

 

 

Share this post


Link to post

Looks good to me, the only other thing you might want to do is strip white space from start and end of env var to stop users tripping up on this.

 

Sent from my SM-G900F using Tapatalk

 

 

Share this post


Link to post

This is perfect although I used binhex's container without issue but wanted the Flex Get.  However, when running this container with the exact same variables for PIA that I had before, the web UI for deluge comes up for a few minutes but then becomes unreachable.  Also, in his container, the network interface etc is shown but everything is blank in the preferences.  I realize the thread talks about configuring the auth file, but with what username:password?  Any?  Doesn't seem to help as I cannot commit changes to the preferences table and within a couple of minutes the UI is unreachable as if it connects to VPN but did not take the -e LAN_NETWORK variable for whatever reason.  Container is up and running.  Also, there is no passing of the port 3589, should there be?  Otherwise it is unreachable.  I am going to destroy and re-build with changing the ports but for whatever reason I must be missing a step.  Thanks!

Share this post


Link to post

Actually, a bit of an update.  I rebuilt the container and the deluge piece is now working as expected.  Needed to delete the existing container config file although not sure if that was a culprit or just a wonky build the first time.  I cannot get to the Flexget piece with or without passing 3539 to the container or not.  When I attempt to set the password it gives the below:

 

 

Share this post


Link to post

So once configuring the initial config.yml file for Flexget, I assume we restart etc. Issue is, when I do that, I get the above issue with the Deluge piece stopping and becoming inaccessible.  If I delete the config file from the container path, rebuild the container, it seems to correct that behavior but then I have lost the flexget config as well.  Tried to look other places for submitting the issues, but I am afraid this older thread is the only place I could find.  Thanks for any help.

Share this post


Link to post

So, I'd been running for some time without issues. I went ahead and allowed an update (no, I don't know why...) and now I can't get a connection.

 

Log file is showing me:

 

2016-10-08 16:03:30,788 DEBG 'start-script' stdout output:
Sat Oct  8 16:03:30 2016 VERIFY ERROR: depth=1, error=self signed certificate in certificate chain: C=US, ST=OH, L=Columbus, O=Private Internet Access, CN=Private Internet Access CA, emailAddress=secure@privateinternetaccess.com
Sat Oct  8 16:03:30 2016 OpenSSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Sat Oct  8 16:03:30 2016 TLS_ERROR: BIO read tls_read_plaintext error
Sat Oct  8 16:03:30 2016 TLS Error: TLS object -> incoming plaintext read error
Sat Oct  8 16:03:30 2016 TLS Error: TLS handshake failed

 

Any suggestions what I've got going on here?

Share this post


Link to post

Hi Paul,

 

Is there any way you could also make a docker that just has flexget without deluge?

 

Rix removed his docked template and suggested that you might be able to create one without the deluge component.

 

Thanks!

 

 

Sent from my iPhone using Tapatalk

Share this post


Link to post

Hi Paul,

 

Is there any way you could also make a docker that just has flexget without deluge?

 

Rix removed his docked template and suggested that you might be able to create one without the deluge component.

 

Thanks!

 

 

Sent from my iPhone using Tapatalk

 

+1

 

A vanilla flexget would be great.

Share this post


Link to post

Hi Paul,

 

Is there any way you could also make a docker that just has flexget without deluge?

 

Rix removed his docked template and suggested that you might be able to create one without the deluge component.

 

Thanks!

 

 

Sent from my iPhone using Tapatalk

 

+1

 

A vanilla flexget would be great.

 

I'll think about the Flexget by itself.

 

I am not too active with my Docker Container, I just got it in sync with the changes Binhex has made over the last few months with newest Flexget.  I update Flexget mostly from inside the container.

 

Share this post


Link to post
I update Flexget mostly from inside the container.

Could you lay out how you do that, please? Thanks!

Share this post


Link to post

I update Flexget mostly from inside the container.

Could you lay out how you do that, please? Thanks!

ssh into unRAID:

docker exec -it delugevpn-flexget /bin/bash

 

Once inside the container:

pip2 install --upgrade flexget

 

Sent from my XT1563 using Tapatalk

 

 

Share this post


Link to post

Once inside the container:

pip2 install --upgrade flexget

Easy enough. Thanks!

Share this post


Link to post

Hi Paul,

 

Is there any way you could also make a docker that just has flexget without deluge?

 

Rix removed his docked template and suggested that you might be able to create one without the deluge component.

 

Thanks!

 

 

Sent from my iPhone using Tapatalk

 

+1

 

A vanilla flexget would be great.

 

There are already two other Flexget alone apps int the apps tab.

 

I am trying it but still hacking at it.

 

I got a vanilla version working and it is showing up under apps tab and beta, arch-flexget.  I working out a dummy config.yml file but it is not copying during install, but if you stop the container and copy your own it seems to work.

 

I am sure there is a more efficient way than I have gone for a Vanilla stand alone arch-flexget.

 

Share this post


Link to post

Hi Paul

 

Is it possible to add the variable NAME_SERVERS as used in binhex-delugevpn? I user BT as my ISP and I have added the router (192.168.1.254) as the primary DNS server under binhex-delugevpn and this allows the VPN to connect. Using the standard Google DNS is not allowed and the lookup fails. I can connect the the DelugeVPN-Flexget VPN if I specify the IP address of the VPN server, but leaving it this way is not ideal.

 

I have tried adding the variable manually, but this seems to prevent the VPN initialising and the Deluge UI does not come up.

 

Many thanks.

Share this post


Link to post

Hi Paul

 

Is it possible to add the variable NAME_SERVERS as used in binhex-delugevpn? I user BT as my ISP and I have added the router (192.168.1.254) as the primary DNS server under binhex-delugevpn and this allows the VPN to connect. Using the standard Google DNS is not allowed and the lookup fails. I can connect the the DelugeVPN-Flexget VPN if I specify the IP address of the VPN server, but leaving it this way is not ideal.

 

I have tried adding the variable manually, but this seems to prevent the VPN initialising and the Deluge UI does not come up.

 

Many thanks.

 

Hmm my ISP router is 192.168.1.254 and it connects fine.  So basically BT doesn't allow picking your own DNS?

 

How does the variable NAME_SERVERS work?  Do you have the VPN incoming port setup in deluge?

 

 

Share this post


Link to post

I finally got the container updated and build to have a new version ready today.

 

I notice on first run, it takes a bit for some flexget stuff to get going, then the deluge-webui kicks in.  I thought it was an error in my programming, but I probably could figure out get deluge running first.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now