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, as well as OpenVPN to ensure a secure and private connection to the Internet, including use of iptables to prevent IP leakage when the tunnel is down. Privoxy is also included to allow unfiltered access to index sites, to use Privoxy please point your application at http://<host ip>:8118.
Latest stable rTorrent release from Arch Linux.
Latest stable ruTorrent release from Arch Linux AUR.
Latest GitHub commit to master branch for Flood.
Latest stable OpenVPN release from Arch Linux repo.
Latest stable Privoxy release from Arch Linux repo.
docker run -d \ --cap-add=NET_ADMIN \ -p 9080:9080 \ -p 9443:9443 \ -p 8118:8118 \ -p 3000:3000 \ --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 ENABLE_FLOOD=<yes|no|both> \ -e LAN_NETWORK=<lan ipv4 network>/<cidr notation> \ -e NAME_SERVERS=<name server ip(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)
Access Flood (web ui)
Note:- Requires user to enable Flood via container env var (ENABLE_FLOOD).
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.
docker run -d \ --cap-add=NET_ADMIN \ -p 9080:9080 \ -p 9443:9443 \ -p 8118:8118 \ -p 3000:3000 \ --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 STRICT_PORT_FORWARD=yes \ -e ENABLE_PRIVOXY=yes \ -e ENABLE_FLOOD=yes \ -e LAN_NETWORK=192.168.1.0/24 \ -e NAME_SERVERS=22.214.171.124,126.96.36.199 \ -e DEBUG=false \ -e PHP_TZ=UTC \ -e UMASK=000 \ -e PUID=0 \ -e PGID=0 \ binhex/arch-rtorrentvpn
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 rtorrentvpn docker to create the folder structure
- Stop rtorrentvpn docker and copy the saved ovpn file to the /config/openvpn/ folder on the host
- Start rtorrentvpn docker
- 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 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 example config
port_range = 49400-49400 port_random = no
docker run -d \ --cap-add=NET_ADMIN \ -p 9080:9080 \ -p 9443:9443 \ -p 8118:8118 \ -p 3000:3000 \ --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 ENABLE_PRIVOXY=yes \ -e ENABLE_FLOOD=yes \ -e LAN_NETWORK=192.168.1.0/24 \ -e NAME_SERVERS=188.8.131.52,184.108.40.206 \ -e DEBUG=false \ -e PHP_TZ=UTC \ -e UMASK=000 \ -e PUID=0 \ -e PGID=0 \ binhex/arch-rtorrentvpn
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:-
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>
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
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
Hey there, sorry for bothering you more but one thing i noticed today when i restarted the server was that rtorrent seems to have lsot all the torrnets over a restart, is there anyway to prevent this from happening?
Also, I have seen that the "Trackers" tab isn't present for me, so i guess I will just have to install the plugin that adds them, until then I will use my own labels.
Anyway thanks for your awesome work.
I will give you a donation if I can get this to work
Hi there, first of all i wanna thank you for an awesome package. Seems to have been the missing NET_ADMIN flag.
ONe thing i am wondering of since i am ujsing PIA is that an IP like 10.107.1.6, is that even a correct IP?, from what I could find it sais something like that.
Again thanks allot for this awesome solution.
Also, I couldn't find how to change password for the webinterface, is that possible somewhere?
And lastly, I am not sure if I have done something wrong but there is a plugin called trackerlabels, that weren't present in this build, it didn't show up for me.
I run Docker under linuxmint which has an NFS mount from the storage server. All seems to work now though except for these few smal thigns.
Again, thanks allot. I am looking forward to using your containers in the future. I run my storage on FreeNAS currently.
if your getting operation not permitted then the chances are your missing this flag:- --cap-add=NET_ADMIN, see the examples above, this allows the container to create the vpn adapter required to establish the tunnel
the other possibility is that the user/group your running the container as does not have permissions to the storage area, double check the PUID and PGID values are correct and that the user does have rwx perms.
Hey there binhex, your work is awesome!
I wonder though, I have a host system that I run Docker on but I have the storage on a Unix server that I would like the client to access, for some reason it gives "operation not permitted" when i try to start the docker.
Do you maybe know how i can solve this?