Giter Club home page Giter Club logo

arch-rtorrentvpn's Introduction

NOTICE

This image is now deprecated and will no longer be maintained - 14/02/2023

Application

rTorrent-ps
ruTorrent
autodl-irssi
Privoxy
OpenVPN
WireGuard

Description

rTorrent is a quick and efficient BitTorrent client that uses, and is in development alongside, the libTorrent (not to be confused with libtorrent-rasterbar) library. It is written in C++ and uses the ncurses programming library, which means it uses a text user interface. When combined with a terminal multiplexer (e.g. GNU Screen or Tmux) and Secure Shell, it becomes a convenient remote BitTorrent client, this Docker image includes the popular ruTorrent web frontend to rTorrent for ease of use.

This Docker includes OpenVPN and WireGuard 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 rTorrent-ps release from Arch Linux AUR.
Latest stable ruTorrent release from Arch Linux AUR.
Latest stable Privoxy release from Arch Linux repo.
Latest stable OpenVPN release from Arch Linux repo.
Latest stable WireGuard release from Arch Linux repo.

!!! IMPORTANT !!!

As from 15th of January 2020, if the web ui and/or rpc2 password have not been defined (defined via environment variables) then the password(s) will be randomised and no longer set to 'rutorrent'.

Please see link below to the rtorrentvpn FAQ, Q3. and Q4. for more details:- https://github.com/binhex/documentation/blob/master/docker/faq/rtorrentvpn.md

Usage

docker run -d \
    --cap-add=NET_ADMIN \
    -p 9080:9080 \
    -p 9443:9443 \
    -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_PROV=<pia|airvpn|custom> \
    -e VPN_CLIENT=<openvpn|wireguard> \
    -e VPN_OPTIONS=<additional openvpn cli options> \
    -e STRICT_PORT_FORWARD=<yes|no> \
    -e ENABLE_PRIVOXY=<yes|no> \
    -e ENABLE_AUTODL_IRSSI=<yes|no> \
    -e ENABLE_RPC2=<yes|no> \
    -e ENABLE_RPC2_AUTH=<yes|no> \
    -e ENABLE_WEBUI_AUTH=<yes|no> \
    -e RPC2_USER=<rpc2 username> \
    -e RPC2_PASS=<rpc2 password> \
    -e WEBUI_USER=<webui username> \
    -e WEBUI_PASS=<webui password> \
    -e LAN_NETWORK=<lan ipv4 network>/<cidr notation> \
    -e NAME_SERVERS=<name server ip(s)> \
    -e VPN_INPUT_PORTS=<port number(s)> \
    -e VPN_OUTPUT_PORTS=<port number(s)> \
    -e DEBUG=<true|false> \
    -e PHP_TZ=<php timezone> \
    -e UMASK=<umask for created files> \
    -e PUID=<uid for user> \
    -e PGID=<gid for user> \
    binhex/arch-rtorrentvpn

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

Access ruTorrent (web ui)

http://<host ip>:9080/

or

https://<host ip>:9443/

Username:- Value of 'WEBUI_USER'
Password:- Value of 'WEBUI_PASS'

Access Privoxy

http://<host ip>:8118

PIA example

docker run -d \
    --cap-add=NET_ADMIN \
    -p 9080:9080 \
    -p 9443:9443 \
    -p 8118:8118 \
    --name=rtorrentvpn \
    -v /root/docker/data:/data \
    -v /root/docker/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 VPN_CLIENT=openvpn \
    -e STRICT_PORT_FORWARD=yes \
    -e ENABLE_PRIVOXY=yes \
    -e ENABLE_AUTODL_IRSSI=yes \
    -e ENABLE_RPC2=yes \
    -e ENABLE_RPC2_AUTH=yes \
    -e ENABLE_WEBUI_AUTH=yes \
    -e RPC2_USER=admin \
    -e RPC2_PASS=NzRhMjE4NjUzZDYw \
    -e WEBUI_USER=admin \
    -e WEBUI_PASS=NzRhMjE4NjUzZDYw \
    -e LAN_NETWORK=192.168.1.0/24 \
    -e NAME_SERVERS=84.200.69.80,37.235.1.174,1.1.1.1,37.235.1.177,84.200.70.40,1.0.0.1 \
    -e VPN_INPUT_PORTS=1234 \
    -e VPN_OUTPUT_PORTS=5678 \
    -e DEBUG=false \
    -e PHP_TZ=UTC \
    -e UMASK=000 \
    -e PUID=0 \
    -e PGID=0 \
    binhex/arch-rtorrentvpn

  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 rtorrentvpn docker to create the folder structure
  4. Stop rtorrentvpn docker and copy the saved ovpn file to the /config/openvpn/ folder on the host
  5. Start rtorrentvpn docker
  6. Check supervisor.log to make sure you are connected to the tunnel

AirVPN users will also need to create a port forward by using the following link https://airvpn.org/ports/ and clicking Add. This port will need to be specified in the rTorrent-ps configuration file located at /config/rtorrent/config/rtorrent.rc with the option port_range = <start incoming port>-<end incoming port> and port_random = no.

rTorrent-ps example config

port_range = 49400-49400
port_random = no

  AirVPN example

docker run -d \
    --cap-add=NET_ADMIN \
    -p 9080:9080 \
    -p 9443:9443 \
    -p 8118:8118 \
    --name=rtorrentvpn \
    -v /root/docker/data:/data \
    -v /root/docker/config:/config \
    -v /etc/localtime:/etc/localtime:ro \
    -e VPN_ENABLED=yes \
    -e VPN_PROV=airvpn \
    -e VPN_CLIENT=openvpn \
    -e ENABLE_PRIVOXY=yes \
    -e ENABLE_AUTODL_IRSSI=yes \
    -e ENABLE_RPC2=yes \
    -e ENABLE_RPC2_AUTH=yes \
    -e ENABLE_WEBUI_AUTH=yes \
    -e RPC2_USER=admin \
    -e RPC2_PASS=NzRhMjE4NjUzZDYw \
    -e WEBUI_USER=admin \
    -e WEBUI_PASS=NzRhMjE4NjUzZDYw \
    -e LAN_NETWORK=192.168.1.0/24 \
    -e NAME_SERVERS=84.200.69.80,37.235.1.174,1.1.1.1,37.235.1.177,84.200.70.40,1.0.0.1 \
    -e VPN_INPUT_PORTS=1234 \
    -e VPN_OUTPUT_PORTS=5678 \
    -e DEBUG=false \
    -e PHP_TZ=UTC \
    -e UMASK=000 \
    -e PUID=0 \
    -e PGID=0 \
    binhex/arch-rtorrentvpn

 

IMPORTANT
Please note 'VPN_INPUT_PORTS' is NOT to define the incoming port for the VPN, this environment variable is used to define port(s) you want to allow in to the VPN network when network binding multiple containers together, configuring this incorrectly with the VPN provider assigned incoming port COULD result in IP leakage, you have been warned!.

OpenVPN
Please note this Docker image does not include the required OpenVPN configuration file and certificates. These will typically be downloaded from your VPN providers website (look for OpenVPN configuration files), and generally are zipped.

PIA users - The URL to download the OpenVPN configuration files and certs is:-

https://www.privateinternetaccess.com/openvpn/openvpn.zip

Once you have downloaded the zip (normally a zip as they contain multiple ovpn files) then extract it to /config/openvpn/ folder (if that folder doesn't exist then start and stop the docker container to force the creation of the folder).

If there are multiple ovpn files then please delete the ones you don't want to use (normally filename follows location of the endpoint) leaving just a single ovpn file and the certificates referenced in the ovpn file (certificates will normally have a crt and/or pem extension).

WireGuard
If you wish to use WireGuard (defined via 'VPN_CLIENT' env var value ) then due to the enhanced security and kernel integration WireGuard will require the container to be defined with privileged permissions and sysctl support, so please ensure you change the following docker options:-

from

    --cap-add=NET_ADMIN \

to

    --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
    --privileged=true \

PIA users - The WireGuard configuration file will be auto generated and will be stored in /config/wireguard/wg0.conf AFTER the first run, if you wish to change the endpoint you are connecting to then change the Endpoint line in the config file (default is Netherlands).

Other users - Please download your WireGuard configuration file from your VPN provider, start and stop the container to generate the folder /config/wireguard/ and then place your WireGuard configuration file in there.

Notes
Due to Google and OpenDNS supporting EDNS Client Subnet it is recommended NOT to use either of these NS providers. The list of default NS providers in the above example(s) is as follows:-

84.200.x.x = DNS Watch 37.235.x.x = FreeDNS 1.x.x.x = Cloudflare

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>

If you want to create an additional user account for ruTorrent webui then please execute the following on the host:-

docker exec -it <container name> /home/nobody/createuser.sh <username to create> <password for the user>

If you want to delete a user account (or change the password for an account) then please execute the following on the host:-

docker exec -it <container name> /home/nobody/deluser.sh <username to delete>

If you do not define the PHP timezone you may see issues with the ruTorrent Scheduler plugin, please make sure you set the PHP timezone by specifying this using the environment variable PHP_TZ. Valid timezone values can be found here, http://php.net/manual/en/timezones.php


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

PayPal donation

Documentation | Support forum

arch-rtorrentvpn's People

Contributors

binhex avatar enoch85 avatar flatmapthatshit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arch-rtorrentvpn's Issues

Permission Denied.

Do I need to change the permissions of /var/lib/nginx?

Which user should have rights to this folder?

2017-06-04 13:14:59,408 DEBG 'rutorrent-script' stderr output:
2017/06/04 13:14:59 [crit] 2981#2981: *9 open() "/var/lib/nginx/fastcgi/1/00/0000000001" failed (13: Permission denied) while reading upstream, client: 10.25.10.149, server: localhost, request: "GET /php/getplugins.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "10.25.10.7:9080", referrer: "http://10.25.10.7:9080/"

UI sometimes doesnt show any torrents, (0 [error,getplugins])

Quite often i get the following error while opening the web interface Sometimes it works, but not often

[11.03.2018 15:58:19] WebUI started.
[11.03.2018 15:58:34] Bad response from server: (0 [error,getplugins]) 

This appears in the docker logs when this happens:

2018-03-11 15:58:33,832 DEBG 'rutorrent-script' stderr output:,
2018/03/11 15:58:33 [crit] 1441#1441: *26916 open() "/var/lib/nginx/fastcgi/9/00/0000000009" failed (13: Permission denied) while reading upstream, client: 10.27.2.0, server: localhost, request: "GET /php/getplugins.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "download:9080", referrer: "http://download:9080/"

otehr times when i refresh i get
[03/11/2018 16:03:04] Bad response from server: (0 [error,list]) {"t":
with a list fo all my torrents after it and the docker logs show
2018/03/11 16:05:05 [crit] 1442#1442: *26955 mkdir() "/var/lib/nginx/fastcgi/2/01" failed (13: Permission denied) while reading upstream, client: 10.27.2.0, server: localhost, request: "POST /plugins/httprpc/action.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "download:9080", referrer: "http://download:9080/"

after refreshing a few times, the docker goes back to waiting for rtorrent to start, as it seems to have crashed, based on my upload stats
image

#build 0.9.6-3-165. Container seems to get stuck on "OpenVpn started"

In the latest build 0.9.6-3-165 the container seems to be stuck on "starting openvpn".
I downgraded to build 0.9.6-3-162 and everything now works again.

docker-compose.yml

torrentVPN:
    image: binhex/arch-rtorrentvpn
    container_name: torrentVPN
    restart: always
    cap_add:
      - net_admin
    devices:
      - "/dev/net/tun"
    ports:
      - 9080:9080
      - 3000:3000
    volumes:
      - /mnt/nas/Mediaserver/data:/data
      - /home/audun/docker/torrentVPN:/config
      - /etc/localtime:/etc/localtime:ro
      - /home/audun/docker/vpn/:/vpn
    environment:
      - VPN_ENABLED=yes
      - VPN_USER=....
      - VPN_PASS=...
      - VPN_PROV=custom
      - ENABLE_AUTODL_IRSSI=yes
      - VPN_OPTIONS="--config /vpn/config.ovpn"
      - ENABLE_FLOOD=false
      - LAN_NETWORK=192.168.1.0/24
      #- NAME_SERVERS=8.8.8.8
      - DEBUG=false
      - PUID=1000
      - PGID=1000

container logs

Created by...,
___.   .__       .__                   ,
\_ |__ |__| ____ |  |__   ____ ___  ___,
 | __ \|  |/    \|  |  \_/ __ \\  \/  /,
 | \_\ \  |   |  \   Y  \  ___/ >    < ,
 |___  /__|___|  /___|  /\___  >__/\_ \,
     \/        \/     \/     \/      \/,
   https://hub.docker.com/u/binhex/,
,
2018-03-05 18:06:06.669646 [info] System information Linux eb5513ee1f71 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 GNU/Linux,
2018-03-05 18:06:06.698857 [info] PUID defined as '1000',
2018-03-05 18:06:07.129194 [info] PGID defined as '1000',
2018-03-05 18:06:07.396831 [warn] UMASK not defined (via -e UMASK), defaulting to '000',
2018-03-05 18:06:07.448023 [info] Permissions already set for volume mappings,
2018-03-05 18:06:07.482741 [info] VPN_ENABLED defined as 'yes',
2018-03-05 18:06:07.523750 [info] OpenVPN config file (ovpn extension) is located at /config/openvpn/65-Sweden.ovpn,
dos2unix: converting file /config/openvpn/config.ovpn to Unix format...,
2018-03-05 18:06:07.555938 [info] VPN remote line defined as '#######',
2018-03-05 18:06:07.586850 [info] VPN_REMOTE defined as '#######',
2018-03-05 18:06:07.616144 [info] VPN_PORT defined as '####',
2018-03-05 18:06:07.644931 [info] VPN_PROTOCOL defined as 'udp',
2018-03-05 18:06:07.674170 [info] VPN_DEVICE_TYPE defined as 'tun0',
2018-03-05 18:06:07.708747 [info] VPN_PROV defined as 'custom',
2018-03-05 18:06:07.745539 [info] LAN_NETWORK defined as '192.168.1.0/24',
2018-03-05 18:06:07.776427 [warn] NAME_SERVERS not defined (via -e NAME_SERVERS), defaulting to Google and FreeDNS name servers,
2018-03-05 18:06:07.809591 [info] VPN_USER defined as '####',
2018-03-05 18:06:07.841022 [info] VPN_PASS defined as '#####',
2018-03-05 18:06:07.872059 [info] VPN_OPTIONS defined as '"--config /vpn/####.ovpn"',
2018-03-05 18:06:07.904501 [warn] ENABLE_PRIVOXY not defined (via -e ENABLE_PRIVOXY), defaulting to 'no',
2018-03-05 18:06:07.940047 [info] ENABLE_FLOOD defined as 'false',
2018-03-05 18:06:07.973678 [info] ENABLE_AUTODL_IRSSI defined as 'yes',
chsh: Shell not changed.,
Changing shell for nobody.,
2018-03-05 18:13:46.883139 [info] Starting Supervisor...,
2018-03-05 18:13:47,029 CRIT Set uid to user 0,
2018-03-05 18:13:47,029 INFO Included extra file "/etc/supervisor/conf.d/rtorrent.conf" during parsing,
2018-03-05 18:13:47,032 INFO supervisord started with pid 7,
2018-03-05 18:13:48,036 INFO spawned: 'start-script' with pid 136,
2018-03-05 18:13:48,038 INFO spawned: 'rutorrent-script' with pid 137,
2018-03-05 18:13:48,040 INFO spawned: 'flood-script' with pid 138,
2018-03-05 18:13:48,041 INFO spawned: 'irssi-script' with pid 139,
2018-03-05 18:13:48,042 INFO spawned: 'rtorrent-script' with pid 140,
2018-03-05 18:13:48,044 INFO spawned: 'privoxy-script' with pid 141,
2018-03-05 18:13:48,044 INFO reaped unknown pid 8,
2018-03-05 18:13:48,049 DEBG 'start-script' stdout output:,
[info] VPN is enabled, beginning configuration of VPN,
,
2018-03-05 18:13:48,049 INFO success: start-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,049 INFO success: rutorrent-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,049 INFO success: flood-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,049 INFO success: irssi-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,050 INFO success: rtorrent-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,050 INFO success: privoxy-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,053 DEBG 'flood-script' stdout output:,
[info] Flood not enabled, skipping starting Flood Web UI,
,
2018-03-05 18:13:48,053 DEBG fd 17 closed, stopped monitoring <POutputDispatcher at 139701821681744 for <Subprocess at 139701821684984 with name flood-script in state RUNNING> (stdout)>,
2018-03-05 18:13:48,053 DEBG fd 21 closed, stopped monitoring <POutputDispatcher at 139701821644096 for <Subprocess at 139701821684984 with name flood-script in state RUNNING> (stderr)>,
2018-03-05 18:13:48,054 INFO exited: flood-script (exit status 0; expected),
2018-03-05 18:13:48,054 DEBG received SIGCLD indicating a child quit,
2018-03-05 18:13:48,055 DEBG 'rtorrent-script' stdout output:,
[info] rTorrent config file already exists, skipping copy,
,
2018-03-05 18:13:48,057 DEBG 'rtorrent-script' stdout output:,
[info] VPN is enabled, checking VPN tunnel local ip is valid,
,
2018-03-05 18:13:48,064 DEBG 'privoxy-script' stdout output:,
[info] Privoxy set to disabled,
,
2018-03-05 18:13:48,065 DEBG fd 32 closed, stopped monitoring <POutputDispatcher at 139701821761152 for <Subprocess at 139701821684408 with name privoxy-script in state RUNNING> (stdout)>,
2018-03-05 18:13:48,065 DEBG fd 36 closed, stopped monitoring <POutputDispatcher at 139701821761584 for <Subprocess at 139701821684408 with name privoxy-script in state RUNNING> (stderr)>,
2018-03-05 18:13:48,065 INFO exited: privoxy-script (exit status 0; expected),
2018-03-05 18:13:48,065 DEBG received SIGCLD indicating a child quit,
2018-03-05 18:13:48,191 DEBG 'start-script' stdout output:,
[info] Default route for container is 172.18.0.1,
,
2018-03-05 18:13:48,195 DEBG 'start-script' stdout output:,
[info] Adding 8.8.8.8 to /etc/resolv.conf,
,
2018-03-05 18:13:48,198 DEBG 'start-script' stdout output:,
[info] Adding 37.235.1.174 to /etc/resolv.conf,
,
2018-03-05 18:13:48,200 DEBG 'start-script' stdout output:,
[info] Adding 8.8.4.4 to /etc/resolv.conf,
,
2018-03-05 18:13:48,204 DEBG 'start-script' stdout output:,
[info] Adding 37.235.1.177 to /etc/resolv.conf,
,
2018-03-05 18:13:48,251 DEBG 'start-script' stdout output:,
[info] Attempting to load tun kernel module...,
,
2018-03-05 18:13:48,252 DEBG 'start-script' stderr output:,
modprobe: FATAL: Module tun not found in directory /lib/modules/4.4.0-116-generic,
,
2018-03-05 18:13:48,252 DEBG 'start-script' stdout output:,
[warn] Unable to load tun kernel module using modprobe, trying insmod...,
,
2018-03-05 18:13:48,253 DEBG 'start-script' stderr output:,
insmod: ERROR: could not load module /lib/modules/tun.ko: No such file or directory,
,
2018-03-05 18:13:48,253 DEBG 'start-script' stdout output:,
[warn] Unable to load tun kernel module, assuming its dynamically loaded,
,
2018-03-05 18:13:48,262 DEBG 'start-script' stdout output:,
[info] Attempting to load iptable_mangle module...,
,
2018-03-05 18:13:48,263 DEBG 'start-script' stderr output:,
modprobe: FATAL: Module iptable_mangle not found in directory /lib/modules/4.4.0-116-generic,
,
2018-03-05 18:13:48,264 DEBG 'start-script' stdout output:,
[warn] Unable to load iptable_mangle module using modprobe, trying insmod...,
,
2018-03-05 18:13:48,264 DEBG 'start-script' stderr output:,
insmod: ERROR: could not load module /lib/modules/iptable_mangle.ko: No such file or directory,
,
2018-03-05 18:13:48,265 DEBG 'start-script' stdout output:,
[warn] Unable to load iptable_mangle module, you will not be able to connect to the applications Web UI or Privoxy outside of your LAN,
[info] unRAID/Ubuntu users: Please attempt to load the module by executing the following on your host: '/sbin/modprobe iptable_mangle',
[info] Synology users: Please attempt to load the module by executing the following on your host: 'insmod /lib/modules/iptable_mangle.ko',
,
2018-03-05 18:13:48,268 DEBG 'start-script' stdout output:,
[info] Adding 192.168.1.0/24 as route via docker eth0,
,
2018-03-05 18:13:48,270 DEBG 'start-script' stdout output:,
[info] ip route defined as follows...,
--------------------,
,
2018-03-05 18:13:48,270 DEBG 'start-script' stdout output:,
default via 172.18.0.1 dev eth0 ,
172.18.0.0/16 dev eth0 proto kernel scope link src 172.18.0.6 ,
,
2018-03-05 18:13:48,271 DEBG 'start-script' stdout output:,
192.168.1.0/24 via 172.18.0.1 dev eth0 ,
--------------------,
,
2018-03-05 18:13:48,297 DEBG 'start-script' stdout output:,
[info] Docker network defined as    172.18.0.0/16,
,
2018-03-05 18:13:48,357 DEBG 'start-script' stdout output:,
[info] iptables defined as follows...,
--------------------,
,
2018-03-05 18:13:48,359 DEBG 'start-script' stdout output:,
-P INPUT DROP,
-P FORWARD ACCEPT,
-P OUTPUT DROP,
-A INPUT -i tun0 -j ACCEPT,
-A INPUT -s 172.18.0.0/16 -d 172.18.0.0/16 -j ACCEPT,
-A INPUT -i eth0 -p udp -m udp --sport 8292 -j ACCEPT,
-A INPUT -i eth0 -p tcp -m tcp --dport 9080 -j ACCEPT,
-A INPUT -i eth0 -p tcp -m tcp --sport 9080 -j ACCEPT,
-A INPUT -i eth0 -p tcp -m tcp --dport 9443 -j ACCEPT,
-A INPUT -i eth0 -p tcp -m tcp --sport 9443 -j ACCEPT,
-A INPUT -s 192.168.1.0/24 -i eth0 -p tcp -m tcp --dport 5000 -j ACCEPT,
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT,
-A INPUT -i lo -j ACCEPT,
-A OUTPUT -o tun0 -j ACCEPT,
-A OUTPUT -s 172.18.0.0/16 -d 172.18.0.0/16 -j ACCEPT,
-A OUTPUT -o eth0 -p udp -m udp --dport 8292 -j ACCEPT,
-A OUTPUT -o eth0 -p tcp -m tcp --dport 9080 -j ACCEPT,
-A OUTPUT -o eth0 -p tcp -m tcp --sport 9080 -j ACCEPT,
-A OUTPUT -o eth0 -p tcp -m tcp --dport 9443 -j ACCEPT,
-A OUTPUT -o eth0 -p tcp -m tcp --sport 9443 -j ACCEPT,
-A OUTPUT -d 192.168.1.0/24 -o eth0 -p tcp -m tcp --sport 5000 -j ACCEPT,
-A OUTPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT,
-A OUTPUT -o lo -j ACCEPT,
,
2018-03-05 18:13:48,360 DEBG 'start-script' stdout output:,
--------------------,
,
2018-03-05 18:13:48,360 DEBG 'start-script' stdout output:,
[info] Starting OpenVPN...,
,
2018-03-05 18:13:48,365 DEBG 'start-script' stdout output:,
Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: auth-user-pass (2.4.4),
Use --help for more information.,
,
2018-03-05 18:13:48,366 DEBG 'start-script' stdout output:,
[info] OpenVPN started,
,

File permissions on startup

Great container! It is saving me a ton of work.

I have one problem though: the rtorrent startup script can't read vpn_external_ip.txt or vpn_incoming_port.txt so rtorrent won't start until I change permissions on those files. Am I doing something wrong?

Closed Web Browser and All RSS Feeds and Settings Disappeared

I spent yesterday setting up RSS feeds and filters for them in ruTorrent. I also set up a couple of the accounts in the system and what not. Today, I was having an issue with the GUI not being responsive, so I closed Chrome and opened it back up. I lost all my logins, feeds, filters, etc. I did not restart the container itself.

Is this the correct behavior? How do I save this information for future use if it is correct?

If this is not correct behavior, what kind of information can I help out with?

I don't want to have to re-add logins and RSS feeds each time I close Chrome. Thanks for the help!

Run on VPS/Dedicated Server

Hi,

I was able to get this up and running, but as others have said if it is hosted on a VPS or Dedicated Server you don't get a WAN. The only work around I have found so far is to tunnel into the VPS/Dedicated Server(With putty on windows)

I have yet to figure out a way to enable me to remotely access the rtorrent web ui without tunneling, if you have any advice or have done it that would be great!

docker container not using full space.

Just created a new VM and everything works fine and dandy however I have a 1.5TB volume and the container is only using 50GB of it.

Can anyone help me out? I'm by no means a docker expert just learning as I go.

Sleep causing rtorrent to crash

Hey,

Not sure how this is happening all of a sudden for me. It seems that sleep at the end of rtorrent.sh is causing rtorrent to crash. This issue started today.

Monitored with htop. When 10min sleep is issued as a process, rtorrent will crash 3 seconds after. Standard debug output is returned, no output of a crash happening.

Removed sleep command and rtorrent started to work normally again. Do you perhaps have the same issue?

Had to add --device=/dev/net/tun to run command

After the most recent update, I had to add --device=/dev/net/tun to my docker run command which already has --cap-add=NET_ADMIN.

Log:

Jan 17 21:57:33 apollo docker[22767]: Wed Jan 17 21:57:33 2018 ROUTE_GATEWAY 172.17.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:11:00:02
Jan 17 21:57:33 apollo docker[22767]: Wed Jan 17 21:57:33 2018 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
Jan 17 21:57:33 apollo docker[22767]: Wed Jan 17 21:57:33 2018 Exiting due to fatal error

Run command:

docker run --rm \
                              --name=rtorrent-vpn \
                              --cap-add=NET_ADMIN \
                              --device=/dev/net/tun \
                              -p 9080:9080 \
                              -p 9443:9443 \
                              -v /data/torrents:/data \
                              -v /data/torrents/.rtorrent:/config \
                              -v /etc/localtime:/etc/localtime:ro \
                              -e VPN_ENABLED=yes \
                              -e VPN_REMOTE=america.vpn.airdns.org \
                              -e VPN_PORT=443 \
                              -e VPN_PROTOCOL=udp \
                              -e VPN_DEVICE_TYPE=tun \
                              -e VPN_PROV=airvpn \
                              -e ENABLE_PRIVOXY=no \
                              -e ENABLE_FLOOD=no \
                              -e LAN_NETWORK=10.0.1.0/24 \
                              -e NAME_SERVERS=8.8.8.8,8.8.4.4 \
                              -e DEBUG=true \
                              -e PHP_TZ=America/Los_Angeles \
                              -e UMASK=002 \
                              -e PUID=1007 \
                              -e PGID=100 \
                              binhex/arch-rtorrentvpn

Fix hint was found at kylemanna/docker-openvpn#39

Extract rar files not working

Does ruTorrent need rar/unrar binaries to extract? When I exec into the container, it doesn't seem to have any binaries for extraction like unrar/rar or 7zr. Could this be why my rar'd torrents fail to extract despite seemingly being correctly setup to do so?

Commit Issues

Hi Binhex. First of all, this container is absolutely fantastic. I've been using it flawlessly for months 👍

For some reason, 0f7e25a broke my running instance of the container. I pulled the latest and ran docker-compose up -d, but I still don't see the container. When I browse to the container on 9080, I saw Privoxy or it wouldn't respond at all. What logs can I share to help you troubleshoot?

Thanks!

apparmor denying access to /etc/nginx/nginx.conf

I've just deployed your this image to a synology nas, but while it boots up, the rutorrent.sh script fires up nginx and it dies with a permission denied (13) error.

It appears that apparmor, within the container, is denying the access. I cannot run "disable apparmor.service) as the disable command is not on the container.

[1242139.690053] type=1400 audit(1488231847.226:3): apparmor="DENIED" operation="open" parent=26952 profile="/usr/bin/nginx" name="/config/nginx/c
onfig/nginx.conf" pid=27598 comm="nginx" requested_mask="r" denied_mask="r" fsuid=1024 ouid=1024
[1242240.428781] type=1400 audit(1488231948.050:4): apparmor="DENIED" operation="open" parent=28787 profile="/usr/bin/nginx" name="/config/nginx/c
onfig/nginx.conf" pid=32224 comm="nginx" requested_mask="r" denied_mask="r" fsuid=1024 ouid=1024
[1242315.634472] type=1400 audit(1488232023.319:5): apparmor="DENIED" operation="open" parent=28787 profile="/usr/bin/nginx" name="/config/nginx/c
onfig/nginx.conf" pid=3151 comm="nginx" requested_mask="r" denied_mask="r" fsuid=1024 ouid=1024
[1242422.621930] type=1400 audit(1488232130.397:6): apparmor="DENIED" operation="open" parent=28478 profile="/usr/bin/nginx" name="/config/nginx/c
onfig/nginx.conf" pid=8027 comm="nginx" requested_mask="r" denied_mask="r" fsuid=0 ouid=1024

Any ideas on how I can disable apparmor or possibly create a profile to allow access to the /data/nginx/config/nginx.conf file?

Cannot access WebUI over LAN

I have been using the Deluge version of this container for a few months now without major incident. I recently started using the rtorrent container with the same settings (overlapping ports disabled and not exposed) and I can only access the WebUI from the machine hosting Docker, not any other machine on my local network.

iptable_mangle is enabled on the host but I was never able to get it to work correctly on your Deluge container. I am no iptables expert, but I am familiar with firewalls in general. I am not using UFW or anything other firewall on the docker host, there are only Docker generated rules listed with iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy DROP)
target     prot opt source               destination
DOCKER-USER  all  --  anywhere             anywhere
DOCKER-ISOLATION  all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ES                                          TABLISHED
DOCKER     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain DOCKER (1 references)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             172.17.0.2           tcp dpt:9000
ACCEPT     tcp  --  anywhere             172.17.0.3           tcp dpt:http
ACCEPT     tcp  --  anywhere             172.17.0.4           tcp dpt:58946
ACCEPT     tcp  --  anywhere             172.17.0.4           tcp dpt:58846
ACCEPT     tcp  --  anywhere             172.17.0.4           tcp dpt:8118
ACCEPT     tcp  --  anywhere             172.17.0.4           tcp dpt:8112
ACCEPT     tcp  --  anywhere             172.17.0.5           tcp dpt:http-alt
ACCEPT     tcp  --  anywhere             172.17.0.6           tcp dpt:9443
ACCEPT     tcp  --  anywhere             172.17.0.6           tcp dpt:9080
ACCEPT     tcp  --  anywhere             172.17.0.6           tcp dpt:3000

Chain DOCKER-ISOLATION (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere

Chain DOCKER-USER (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere
docker run -d \
    --cap-add=NET_ADMIN \
    -p 9080:9080 \
    -p 9443:9443 \
    -p 3000:3000 \
    --name=rtorrentvpn \
    -v /mnt/videos/:/data \
    -v /apps/docker/rtorrent/config:/config \
    -v /etc/localtime:/etc/localtime:ro \
    -e VPN_ENABLED=yes \
    -e VPN_USER=uuuuuuuu \
    -e VPN_PASS=ppppppppp \
    -e VPN_PROV=pia \
    -e STRICT_PORT_FORWARD=yes \
    -e ENABLE_PRIVOXY=no \
    -e ENABLE_FLOOD=both \
    -e ENABLE_AUTODL_IRSSI=no \
    -e LAN_NETWORK=192.168.1.1/24 \
    -e NAME_SERVERS=8.8.8.8 \
    -e DEBUG=true \
    -e PHP_TZ=America/New_York \
    -e UMASK=000 \
    -e PUID=1000 \
    -e PGID=1000 \
	--restart always \
    binhex/arch-rtorrentvpn

Ratio resetting

I am noticing that every few days I am seeing my ratio settings reset to default. Any reasoning this may be happening? I haven't noticed anything else so far, but will keep a look out. All my paths are bound.

Fatal error with Synology

I received the following error after the VPN is authenticated.
I have VPN set to yes with pia and the OpenVPN file. I am also getting missing crt errors. In the end there is no web access.

2017-12-30 06:14:42,960 DEBG 'start-script' stdout output:
[info] Starting OpenVPN...

2017-12-30 06:14:42,965 DEBG 'start-script' stdout output:
Sat Dec 30 06:14:42 2017 WARNING: file 'credentials.conf' is group or others accessible
Sat Dec 30 06:14:42 2017 OpenVPN 2.4.4 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 26 2017
Sat Dec 30 06:14:42 2017 library versions: OpenSSL 1.1.0f  25 May 2017, LZO 2.10

2017-12-30 06:14:42,966 DEBG 'start-script' stdout output:
[info] OpenVPN started

2017-12-30 06:14:43,251 DEBG 'start-script' stdout output:
Sat Dec 30 06:14:43 2017 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Sat Dec 30 06:14:43 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]104.156.240.199:1198
Sat Dec 30 06:14:43 2017 UDP link local: (not bound)
Sat Dec 30 06:14:43 2017 UDP link remote: [AF_INET]104.156.240.199:1198

2017-12-30 06:14:43,349 DEBG 'start-script' stdout output:
Sat Dec 30 06:14:43 2017 [6f690dd9320c801d0bac5f756fda40b9] Peer Connection Initiated with [AF_INET]104.156.240.199:1198

2017-12-30 06:14:49,439 DEBG 'start-script' stdout output:
Sat Dec 30 06:14:49 2017 auth-token received, disabling auth-nocache for the authentication token

2017-12-30 06:14:49,442 DEBG 'start-script' stdout output:
Sat Dec 30 06:14:49 2017 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)
Sat Dec 30 06:14:49 2017 Exiting due to fatal error

Wrong External address

As stated in the support forum:

I've been using it for 3 days and I was wondering why there was almost no upload going on even with all the proper settings.
The issue was in the reported IP to tracker.

The IP reported is the internal ip of the VPN connection and not the real ip that the outside see.
The TUN0 adress is 10.4.55.159.

I can see it's also what the log show:
2017-02-04 19:57:37,316 DEBG 'rtorrent-script' stdout output:
[info] rTorrent listening interface IP 0.0.0.0 and VPN provider IP 10.4.55.159 different, marking for reconfigure
[info] Attempting to start rTorrent...
[info] Removing any rtorrent session lock files left over from the previous run...

But nobody will ever be able to acces that adress, except maybe people on the same VPN server.
The real IP of the server is 109.202.107.10.

As soon as I updated in ruTorrent the reported IP to be the real IP, upload starting going as they were before when rTorrent wasn't in a docker container but with a manual package install and a manual VPN connection.

Possible fix to get real external ip:
current_remote_ip=$(curl --connect-timeout "10" -s https://ipinfo.io/ip)

Bunch of PHP warnngs

Any help would be greatly appreciated.

Thanks!

2017-03-15 12:11:40 stdout 2017/03/15 12:11:40 [error] 1432#1432: *2751 FastCGI sent in stderr: "PHP message: PHP Warning: fopen(/usr/share/webapps/rutorrent/share/settings/cpu.dat.tmp): failed to open stream: Permission denied in /usr/share/webapps/rutorrent/php/cache.php on line 40" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "GET /plugins/cpuload/action.php?=1489578500803 HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "10.25.10.10:9080", referrer: "http://10.25.10.10:9080/"
2017-03-15 12:11:40 stdout 2017-03-15 12:11:40,544 DEBG 'rutorrent-script' stderr output:
2017-03-15 12:11:40 stdout
2017-03-15 12:11:40 stdout PHP message: PHP Warning: opendir(/usr/share/webapps/rutorrent/share/settings/httprpc): failed to open dir: No such file or directory in /usr/share/webapps/rutorrent/plugins/httprpc/rpccache.php on line 76" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "POST /plugins/httprpc/action.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "10.25.10.10:9080", referrer: "http://10.25.10.10:9080/"
2017-03-15 12:11:40 stdout 2017/03/15 12:11:40 [error] 1432#1432: *2751 FastCGI sent in stderr: "PHP message: PHP Warning: file_put_contents(/usr/share/webapps/rutorrent/share/settings/httprpc/481cf745): failed to open stream: No such file or directory in /usr/share/webapps/rutorrent/plugins/httprpc/rpccache.php on line 51
2017-03-15 12:11:40 stdout 2017-03-15 12:11:40,495 DEBG 'rutorrent-script' stderr output:
2017-03-15 12:11:37 stdout
2017-03-15 12:11:37 stdout 2017/03/15 12:11:37 [error] 1432#1432: *2751 FastCGI sent in stderr: "PHP message: PHP Warning: fopen(/usr/share/webapps/rutorrent/share/settings/cpu.dat.tmp): failed to open stream: Permission denied in /usr/share/webapps/rutorrent/php/cache.php on line 40" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "GET /plugins/cpuload/action.php?
=1489578500801 HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "10.25.10.10:9080", referrer: "http://10.25.10.10:9080/"
2017-03-15 12:11:37 stdout 2017-03-15 12:11:37,381 DEBG 'rutorrent-script' stderr output:
2017-03-15 12:11:37 stdout
2017-03-15 12:11:37 stdout PHP message: PHP Warning: opendir(/usr/share/webapps/rutorrent/share/settings/httprpc): failed to open dir: No such file or directory in /usr/share/webapps/rutorrent/plugins/httprpc/rpccache.php on line 76" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "POST /plugins/httprpc/action.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "10.25.10.10:9080", referrer: "http://10.25.10.10:9080/"
2017-03-15 12:11:37 stdout 2017/03/15 12:11:37 [error] 1432#1432: *2751 FastCGI sent in stderr: "PHP message: PHP Warning: file_put_contents(/usr/share/webapps/rutorrent/share/settings/httprpc/9d613402): failed to open stream: No such file or directory in /usr/share/webapps/rutorrent/plugins/httprpc/rpccache.php on line 51
2017-03-15 12:11:37 stdout 2017-03-15 12:11:37,335 DEBG 'rutorrent-script' stderr output:
2017-03-15 12:11:34 stdout
2017-03-15 12:11:34 stdout 2017/03/15 12:11:34 [error] 1432#1432: *2751 FastCGI sent in stderr: "PHP message: PHP Warning: fopen(/usr/share/webapps/rutorrent/share/settings/cpu.dat.tmp): failed to open stream: Permission denied in /usr/share/webapps/rutorrent/php/cache.php on line 40" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "GET /plugins/cpuload/action.php?=1489578500800 HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "10.25.10.10:9080", referrer: "http://10.25.10.10:9080/"
2017-03-15 12:11:34 stdout 2017-03-15 12:11:34,217 DEBG 'rutorrent-script' stderr output:
2017-03-15 12:11:34 stdout
2017-03-15 12:11:34 stdout PHP message: PHP Warning: opendir(/usr/share/webapps/rutorrent/share/settings/httprpc): failed to open dir: No such file or directory in /usr/share/webapps/rutorrent/plugins/httprpc/rpccache.php on line 76" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "POST /plugins/httprpc/action.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "10.25.10.10:9080", referrer: "http://10.25.10.10:9080/"
2017-03-15 12:11:34 stdout 2017/03/15 12:11:34 [error] 1432#1432: *2751 FastCGI sent in stderr: "PHP message: PHP Warning: file_put_contents(/usr/share/webapps/rutorrent/share/settings/httprpc/4cf4e150): failed to open stream: No such file or directory in /usr/share/webapps/rutorrent/plugins/httprpc/rpccache.php on line 51
2017-03-15 12:11:34 stdout 2017-03-15 12:11:34,168 DEBG 'rutorrent-script' stderr output:
2017-03-15 12:11:31 stdout
2017-03-15 12:11:31 stdout 2017/03/15 12:11:31 [error] 1432#1432: *2751 FastCGI sent in stderr: "PHP message: PHP Warning: fopen(/usr/share/webapps/rutorrent/share/settings/cpu.dat.tmp): failed to open stream: Permission denied in /usr/share/webapps/rutorrent/php/cache.php on line 40" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "GET /plugins/cpuload/action.php?
=1489578500799 HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "10.25.10.10:9080", referrer: "http://10.25.10.10:9080/"
2017-03-15 12:11:31 stdout 2017-03-15 12:11:31,049 DEBG 'rutorrent-script' stderr output:
2017-03-15 12:11:31 stdout
2017-03-15 12:11:31 stdout PHP message: PHP Warning: opendir(/usr/share/webapps/rutorrent/share/settings/httprpc): failed to open dir: No such file or directory in /usr/share/webapps/rutorrent/plugins/httprpc/rpccache.php on line 76" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "POST /plugins/httprpc/action.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "10.25.10.10:9080", referrer: "http://10.25.10.10:9080/"
2017-03-15 12:11:31 stdout 2017/03/15 12:11:30 [error] 1432#1432: *2751 FastCGI sent in stderr: "PHP message: PHP Warning: file_put_contents(/usr/share/webapps/rutorrent/share/settings/httprpc/cc6c7824): failed to open stream: No such file or directory in /usr/share/webapps/rutorrent/plugins/httprpc/rpccache.php on line 51
2017-03-15 12:11:30 stdout 2017-03-15 12:11:30,996 DEBG 'rutorrent-script' stderr output:

Lose ssh capabilities after container install.

Hi,

After I install the container I lose the capability to ssh into the VM/Dedicated machine.
I have tried on both local and remote servers.

Is there anything I can do to stop this from happening?

Waiting for rTorrent process to start.

Just created a new container.

[info] Removing any rtorrent session lock files left over from the previous run...

2017-05-24 12:40:04,004 DEBG 'rtorrent-script' stdout output:
[info] Attempting to start rTorrent...

2017-05-24 12:40:04,005 DEBG 'rtorrent-script' stdout output:
Script started, file is /home/nobody/typescript

2017-05-24 12:40:04,024 DEBG 'rtorrent-script' stdout output:
Script done, file is /home/nobody/typescript

2017-05-24 12:40:04,029 DEBG 'rtorrent-script' stdout output:
[debug] Waiting for rTorrent process to start...

2017-05-24 12:40:05,031 DEBG 'rtorrent-script' stdout output:
[debug] Waiting for rTorrent process to start...

2017-05-24 12:40:06,035 DEBG 'rtorrent-script' stdout output:
[debug] Waiting for rTorrent process to start...

2017-05-24 12:40:07,041 DEBG 'rtorrent-script' stdout output:
[debug] Waiting for rTorrent process to start...

2017-05-24 12:40:08,049 DEBG 'rtorrent-script' stdout output:
[debug] Waiting for rTorrent process to start...

2017-05-24 12:40:09,054 DEBG 'rtorrent-script' stdout output:
[debug] Waiting for rTorrent process to start...

2017-05-24 12:40:10,058 DEBG 'rtorrent-script' stdout output:
[debug] Waiting for rTorrent process to start...

2017-05-24 12:40:11,062 DEBG 'rtorrent-script' stdout output:
[debug] Waiting for rTorrent process to start...

Below is my config.

docker run -d
--privileged
--cap-add=NET_ADMIN
-p 9080:9080
-p 9443:9443
-p 8118:8118
-p 3000:3000
--name=rtorrentvpn
-v /opt/rtorrent/data:/data:z
-v /opt/rtorrent/config:/config:z
-v /etc/localtime:/etc/localtime:ro
-e VPN_ENABLED=yes
-e VPN_REMOTE=america.vpn.airdns.org
-e VPN_PORT=443
-e VPN_PROTOCOL=udp
-e VPN_DEVICE_TYPE=tun
-e VPN_PROV=airvpn
-e ENABLE_PRIVOXY=yes
-e ENABLE_FLOOD=both
-e LAN_NETWORK=10.25.10.0/24
-e NAME_SERVERS=8.8.8.8,8.8.4.4
-e DEBUG=true
-e PHP_TZ=America/New_York
-e UMASK=000
-e PUID=0
-e PGID=0
binhex/arch-rtorrentvpn

Cannot open tun/tap

Setting up Docker on a Cent OS VM and seeing this error in the supervisor.log

2017 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19) Wed May 24 10:10:02 2017 Exiting due to fatal error

Any help would be greatly appreciated.

Below is the command I ran to get the container started:
docker run -d
--cap-add=NET_ADMIN
-p 9080:9080
-p 9443:9443
-p 8118:8118
-p 3000:3000
--name=rtorrentvpn
-v /opt/rtorrent/data:/data:z
-v /opt/rtorrent/config:/config:z
-v /etc/localtime:/etc/localtime:ro
-e VPN_ENABLED=yes
-e VPN_REMOTE=america.vpn.airdns.org
-e VPN_PORT=443
-e VPN_PROTOCOL=udp
-e VPN_DEVICE_TYPE=tun
-e VPN_PROV=airvpn
-e ENABLE_PRIVOXY=yes
-e ENABLE_FLOOD=both
-e LAN_NETWORK=10.25.10.0/24
-e NAME_SERVERS=8.8.8.8,8.8.4.4
-e DEBUG=true
-e PHP_TZ=America/New_York
-e UMASK=000
-e PUID=1000
-e PGID=1000
binhex/arch-rtorrentvpn

Downloads completion directory won't change

Hey,

Is there a way to change the default directory for when downloads finish? Currently once a download is finished it gets moved to /data/completed instead of the custom directory that I have set. I do have Autotools enabled, but has not made any difference. So I'm guessing that there is a hidden config setting for this that I have yet to find. I took away the comment mark of system.method.set_key and changed the directory, yet the downloads still stick to the default /data/completed. ruTorrent also states
Save As: /data/Completed/XXX in the general tab.

Running this container on remote server (not on same LAN network)

This container seems to be more designed to be use at home on the same local LAN (in Unraid) where your server (running UNRAID) resides. However, I'm using it on remote server running Ubuntu. It works great but the issues I'm running into is remote access to the rutorrent webui. In order to access the webui I have to add my IP address that's assigned by my ISP to the LAN_NETWORK environmental variable. But when my IP address changes or if I'm at a different location, I need to update this variable. I believe your IPTABLES rules works well to prevent leakage and to prevent access to port 5000 (rtorrent scgi_port) except by the local network. But I need access to the webui from outside the LAN network as well. Is there a way to separate the LAN_NETWORK variable for port 5000 and web port 9080/9443/3000 which are already password protected by nginx?

How to enable rpc?

What would be needed to enable xmlrpc? (for example, to access via couchpotato)

thanks for the great docker image - i got it running via docker-compose real easily!

rtorrent/rutorrent/flood stops responding | connect() failed (111: Connection refused) while connecting to upstream

after a bit of time, rtorrent stops responding as well as the flood ui stops working. in the docker logs it shows
2018/04/18 02:00:11 [error] 792#792: *1944 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: localhost, request: "POST /RPC2 HTTP/1.1", upstream: "scgi://127.0.0.1:5000", host: "localhost:9080"

sonarr and radarr show it as a bad gateway, when responding it functions just fine.
my docker compose is as follows

version: '3.4'
services:

    rtorrent:
        image: binhex/arch-rtorrentvpn
        cap_add:
            - net_admin
        ports:
            - 9080:9080
            - 9443:9443
            - 8118:8118
            - 3000:3000
        network_mode: bridge
        environment:
            VPN_ENABLED: 'yes'
            VPN_USER: 'redacted'
            VPN_PASS: 'redacted'
            VPN_PROV: 'pia'
            STRICT_PORT_FORWARD: 'no'
            ENABLE_PRIVOXY: 'no'
            ENABLE_FLOOD: 'both'
            ENABLE_AUTODL_IRSSI: 'no'
            LAN_NETWORK: '10.14.31.0/24'
            NAME_SERVERS: '209.222.18.222,37.235.1.174,8.8.8.8,209.222.18.218,37.235.1.177,8.8.4.4'
            DEBUG: 'false'
            PHP_TZ: 'America/New_York'
            UMASK: 777
            PUID: 0
            PGID: 0
            COMPOSE_HTTP_TIMEOUT: 120
            DOCKER_CLIENT_TIMEOUT: 120
        volumes:
            - redacted:redacted
            - redacted:/data
            - /rtorrent/config:/config
            - /etc/localtime:/etc/localtime:ro
        restart: always

restarting the container sometimes temporarily mediates the issue

PHP Errors in logs

Related: Novik/ruTorrent#1300

2018-02-28 18:23:46,314 DEBG 'rutorrent-script' stderr output:
2018/02/28 18:23:46 [error] 1207#1207: *231 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 39 in /usr/share/webapps/rutorrent/plugins/trafic/stat.php on line 169

PHP message: PHP Notice: Undefined offset: 39 in /usr/share/webapps/rutorrent/plugins/trafic/stat.php on line 171
PHP message: PHP Notice: A non well formed numeric value encountered in /usr/share/webapps/rutorrent/plugins/trafic/stat.php on line 168
PHP message: PHP Notice: A non well formed numeric value encountered in /usr/share/webapps/rutorrent/plugins/trafic/stat.php on line 170" while reading response header from upstream, client: 10.1.1.9, server: localhost, request: "POST /plugins/trafic/action.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "foo.example.com:9080", referrer: "http://foo.example.com:9080/"

2018-02-28 18:31:36,941 DEBG 'rutorrent-script' stderr output:
2018/02/28 18:31:36 [error] 1207#1207: *1627 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 10.1.1.9, server: localhost, request: "GET /rutorrent/plugins/rpc/rpc.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "foo.example.com:9080"

Bad response from server: (0[error,tasklist])

Been getting this error. After reloading my webpage a bunch of times "sometimes" it goes away. I've read online that we might have to increase the memory in Apache? Anyone else have this issue?

This is in the rutorrent webui.

Flood wont reverse proxy.

The changes for baseuri in config.js doesnt catch propperly. Adding /flood just gets me the loading screen.
image
Using a simple config like

    location /flood {
		add_header X-Frame-Options SAMEORIGIN;
        proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://10.0.0.11:3002;
        }

yields the same as on LAN.

Permissions problem preventing startup

I haven't been able to get the container working so far, it seems to have some issues with permissions of a file in the logs.

2018-02-27 08:51:13,195 DEBG 'rtorrent-script' stdout output: error connecting to /tmp/tmux-1004/default (Permission denied)

2018-02-27 08:52:12,546 DEBG 'rtorrent-script' stderr output: /home/nobody/getvpnextip.sh: line 9: /home/nobody/vpn_external_ip.txt: Permission denied

These are the relevant file permissions:

--------w- 1 root root 15 Feb 27 08:51 vpn_external_ip.txt

/tmp/tmux-1004/default doesn't seem to exist at all, the directory /tmp/tmux-1004 does though.

Scheduler in rutorrent keeps turning off

Up until a recent update i was able to have the scheduler in rutorrent interface work just fine but recently if i close out of the web window the scheduler can become ignored because i repopen and notice it downloading at full speed.

webui error.

Seeing this in the log when I access rtorrent through the webui. I just pulled a new image and built a new container. I don't see any errors in the supervisor.log Not showing the values of my downloads/seeds/uploads. Running docker on CentOS7 which is fully up to date.

[08.07.2017 10:49:17] WebUI started.
[08.07.2017 10:49:18] JS error: [http://10.25.10.7:9080/js/webui.js : 1923] Uncaught TypeError: Cannot read property 'radarr' of undefined

image

Running Force Recheck from ruTorrent causes rTorrent to die and get restarted

I'm trying to find useful logs to see what is happening, but I'm not sure where to look.

The supervisord.log from a restart, but not very useful.

2018-05-11 11:12:31,810 DEBG 'rtorrent-script' stdout output:
[info] rTorrent not running

2018-05-11 11:12:31,811 DEBG 'rtorrent-script' stdout output:
[debug] External IP address from tunnel is '184.75.221.115'
[info] Removing any rTorrent session lock files left over from the previous run...

2018-05-11 11:12:31,815 DEBG 'rtorrent-script' stdout output:
[info] Attempting to start rTorrent...

GeoIP fix

Hey,

The following package needs to installed in the initial docker set up:

php-geoip

And then php.ini needs to be edited with the following extension added (line 898):

extension=geoip.so

rTorrent process SCGI not accessible inside container

Hi there,

My host pulled the latest image overnight and recreated my container but checking this morning ruTorrent is unable to access rTorrent. I also recreated the container by hand just to ensure it’s nothing silly. I’ve had a look inside the container and can see a rTorrent process but I get this in my container logs;

2017-11-07 07:07:55,989 DEBG 'rtorrent-script' stdout output:
Script started, file is /home/nobody/typescript

2017-11-07 07:07:56,002 DEBG 'rtorrent-script' stdout output:
duplicate session: rt

2017-11-07 07:07:56,013 DEBG 'rtorrent-script' stdout output:
Script done, file is /home/nobody/typescript

2017-11-07 07:07:59,490 DEBG 'rutorrent-script' stderr output:
2017/11/07 07:07:59 [error] 1189#1189: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "POST /RPC2 HTTP/1.1", upstream: "scgi://127.0.0.1:5000", host: "<snip>:9443"


2017-11-07 07:08:25,327 DEBG 'rtorrent-script' stdout output:
[warn] Wait for rTorrent process to start aborted

2017-11-07 07:08:55,480 DEBG 'rtorrent-script' stdout output:
[info] rTorrent not running

2017-11-07 07:08:55,482 DEBG 'rtorrent-script' stdout output:
[info] Removing any rtorrent session lock files left over from the previous run...

2017-11-07 07:08:55,495 DEBG 'rtorrent-script' stdout output:
[info] Attempting to start rTorrent...

I’ll take a look again a little later and will post with anything else I notice.

Thanks

chown and chmod are kind of overkill on launch

#chown -R "${PUID}":"${PGID}" /etc/webapps /usr/share/webapps /usr/share/nginx/html /etc/nginx /etc/php /run/php-fpm /var/lib/nginx /var/log/nginx /etc/privoxy /home/nobody /etc/webapps/flood /usr/share/autodl-irssi
#chmod -R 775 /etc/webapps /usr/share/webapps /usr/share/nginx/html /etc/nginx /etc/php /run/php-fpm /var/lib/nginx /var/log/nginx /etc/privoxy /home/nobody /etc/webapps/flood /usr/share/autodl-irssi

go here to see what i mean.

most of these directories only need read only access anyways. it delays startup quite some minutes and creates unnecessary overlay attributes in docker for the running container.

anyways.. i love this image. thanks for creating this.

Port Issues

Hey,

i tried to run this behind a Firewall, and i allowed the following ports on ALL protocols:
1190 - 1200

But when openvpn starts, it seems not to connect to the PIA Server.

Are there any ports besides the web interface ports (i dont allow the 9*** ports as i have a nginx reverse setup) i need to allow just for the VPN to work?

Thanks

Pausing state.

When Sonarr/Radarr sent a DL request the file sits in the pausing state and doesn't actually download

Running on a freshly imaged CentOS 7 vm.

docker run -d
--privileged
--cap-add=NET_ADMIN
-p 9080:9080
-p 9443:9443
-p 8118:8118
-p 3000:3000
--name=rtorrentvpn
-v /home/rtorrent/data:/data:z
-v /home/rtorrent/config:/config:z
-v /etc/localtime:/etc/localtime:ro
-e VPN_ENABLED=yes
-e VPN_REMOTE=america.vpn.airdns.org
-e VPN_PORT=443
-e VPN_PROTOCOL=udp
-e VPN_DEVICE_TYPE=tun
-e VPN_PROV=airvpn
-e ENABLE_PRIVOXY=yes
-e ENABLE_FLOOD=both
-e LAN_NETWORK=10.25.10.0/24
-e NAME_SERVERS=8.8.8.8,8.8.4.4
-e DEBUG=true
-e PHP_TZ=America/New_York
-e UMASK=000
-e PUID=0
-e PGID=0
binhex/arch-rtorrentvpn.

rTorrent becomes defunct

I am running this container on an Arch Linux system. After about 24 hours, rtorrent stops working inside the container. When I perform a ps aux | grep torrent it shows: [rtorrent main] <defunct>. I am unable to stop or restart the docker container and unable to kill the process. My only solution so far is to completely delete the docker container (which doesn't remove the defunct process) and recreate it. Please advise how I can resolve this issue, or if there is a better way to recover from it. Thank you!

Make an arch-qbittorrentvpn?

I hate suggesting this here, but I don't see any other reasonable way of sending a suggestion. I've read that qbittorrent is pretty good, but haven't tried it. Is your framework portable enough that creating a vpn version wouldn't be a big undertaking? Or maybe you've already tried qbittorrent and it isn't great?

I'm still hoping for a torrent daemon as good as nzbget or sabnzbd. :/

ENABLE_FLOOD = both - inconsistent pausing

When I set this flag:
I can start and pause torrents fine from ruTorrent.
I can see in Flood the results of the above actions.
If I start the torrent from Flood, it works and reflected in ruTorrent.
If I try to pause a torrent from Flood, it is quickly restarted in both clients.

Error: No OpenVPN config file located in /config/openvpn/

Fresh download/install of this, running on unraid with PIA as the provider.

2017-09-17 11:42:51.236088 [crit] No OpenVPN config file located in /config/openvpn/ (ovpn extension), please download from your VPN provider and then restart this container, exiting...

Setup instructions seem to imply there shouldn't be anything that needs doing aside from configuring PIA user/pass?

rtorrent daemon wont start

Getting this from console:
2017-10-18 19:47:23,026 DEBG 'rtorrent-script' stdout output:
[warn] Wait for rTorrent process to start aborted

2017/10/18 19:47:30 [error] 1042#1042: *3 connect() failed (111: Connection refu
sed) while connecting to upstream, client: 172.17.0.1, server: localhost, reques
t: "POST /RPC2 HTTP/1.1", upstream: "scgi://127.0.0.1:5000", host: "x.x.x.x:9443"

Anywhere I can see more detailed log?

Startup permission denied

Trying to start this on clean docker host.
My /data is mounted through smb.
I am getting this in supervisor when starting:
chown: changing ownership of '/data/Incomplete': Permission denied

It cant obviously not change permission on a share. But it has the right permissions to overwrite/delete data.

What can I do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.