Skip to content
PhysK edited this page Jan 22, 2020 · 1 revision

rTorrent (with FloodUI) OpenVPN integrated

Docker container for rTorrent + FloodUI with integrated OpenVPN client.

It is based on the latest CentOS docker image:

What does this image?

The container connects at startup during the boot process to the OpenVPN service of your choice. After the OpenVPN client connected successfully, the rTorrent and FloodUI service will startup.

FloodUI

Install instructions

Important

Login: Torrent:Torrent Connect: 127.0.0.1:5000

In case it doesn't auto connect....

OpenVPN configuration

Prepare an OpenVPN configuration of your choice. Usually, VPN providers will give you .ovpn files, with configuration for a server. Edit them to add the following code before the <> tags:

auth-user-pass /config/vpn/vpn.auth

up /usr/bin/up.sh
down /usr/bin/down.sh
log-append /config/vpn/openvpn.log
script-security 2

You can put your VPN credentials in the vpn.auth file, and should be good to go!

An automated login by username/password is also possible with the "user-pass-auth" parameter in the client.conf

Should no configuration be present at the first run, an example config will be deployed at the mounted /config folder which can be edited.

The OpenVPN service will be verified every 60s. If it's not running anymore it will restart the connection.

Deploy the docker container

To get the docker up and running execute fhe following command:

In the PTS UI for Community Apps select "rflood-openvpn"

If not done already, deploy or modify the OpenVPN client.conf at /opt/appdata/rflood-openvpn/vpn

docker restart rtorrent-flood-openvpn

Verify OpenVPN status

In "/opt/appdata/rflood-openvpn/my-external-ip.txt" the current external ip address can be found. The file will be updated every 60s.

Sonarr Support

You can use Sonarr with this client as well. Configure your Sonarr with the following params:

Name: rflood-openvpn
Enable: Yes
Host: rflood-openvpn
Port: 80
Username & Password: empty

Configuration files

Several configuration files will be deployed to the mounted /config folder:

Folder Description
flood/* flood default db / user file
rtorrent/* rtorrent.rc, session data, *.torrent files, etc.
vpn/* vpn default config / user config

FloodUI default settings

The default login for FloodUI is Torrent : Torrent

Please change the username : password in the settings.

The configured socket is scgi_port = 0.0.0.0:5000

rTorrent default settings

Listening port for incoming peer traffic

network.port_range.set = 50000-50000
network.port_random.set = no

Check the hash after the end of the download

check_hash = yes

Enable DHT (for torrents without trackers)

dht = auto
dht_port = 6881
peer_exchange = yes

Authorize UDP trackers

use_udp_trackers = yes

Peer settings

throttle.max_uploads.set = 100
throttle.max_uploads.global.set = 250
throttle.min_peers.normal.set = 20
throttle.max_peers.normal.set = 60
throttle.min_peers.seed.set = 30
throttle.max_peers.seed.set = 80
trackers.numwant.set = 80

Encryption

protocol.encryption.set = allow_incoming,try_outgoing,enable_retry

Limits for file handle resources

network.http.max_open.set = 50
network.max_open_files.set = 600
network.max_open_sockets.set = 300

Memory resource usage

pieces.memory.max.set = 1800M
network.xmlrpc.size_limit.set = 12M

Basic operational settings

session.path.set = (cat, (cfg.session))
directory.default.set = (cat, (cfg.download))
log.execute = (cat, (cfg.logs), "execute.log")
log.xmlrpc = (cat, (cfg.logs), "xmlrpc.log")
execute.nothrow = sh, -c, (cat, "echo >",\
    (session.path), "rtorrent.pid", " ",(system.pid))

Other operational settings

encoding.add = utf8
system.umask.set = 0027
system.cwd.set = (directory.default)
network.http.dns_cache_timeout.set = 25
schedule2 = monitor_diskspace, 15, 60, ((close_low_diskspace, 1000M))
method.insert = system.startup_time, value|const, (system.time)
method.insert = d.data_path, simple,\
    "if=(d.is_multi_file),\
        (cat, (d.directory), /),\
        (cat, (d.directory), /, (d.name))"
method.insert = d.session_file, simple, "cat=(session.path), (d.hash), .torrent"

Watch directories

## Add torrent
schedule2 = watch_load, 11, 10, ((load.verbose, (cat, (cfg.watch), "load/*.torrent")))
## Add & download straight away
schedule2 = watch_start, 10, 10, ((load.start_verbose, (cat, (cfg.watch), "start/*.torrent")))

Move on finished

method.set_key = event.download.finished,move_complete,"d.stop=;d.set_directory=/output/complete/;execute=mv,-f,$d.base_path=,/output/complete/;d.start="

Socket specs

scgi_port = 0.0.0.0:5000

Ratio trigger

method.set = group.seeding.ratio.command, "d.close="

Logging

print = (cat, "Logging to ", (cfg.logfile))
log.open_file = "log", (cfg.logfile)
log.add_output = "info", "log"

Enjoy!

Useful Starter Links

  1. Introduction
  2. G-Suite Signup
  3. Recommended NewsHosts
  4. Change Log

Prior Planning 101

  1. Recommended Pre-Reading
  2. Server - Storage Planning
  3. Usenet or BitTorrent
  4. PTS Editions
  5. PTS Folder Structure
  6. PTS-Repos
  7. Common Issues

Deploy & Config

PTS-Team
  1. SSH Server Access
  2. Install PTS
  3. WatchTower
  4. Remote Path Mappings

Data Transport
  1. PTS Clone
    1. Google OAuth Keys
    2. PTS Move
    3. PTS Blitz
    4. 2nd HD Option

Key Components

  1. Traefik
  2. Port Guard
  3. PTS Shield
  4. PTS Press
  5. Google Cloud - GCE
    1. Automated setup
  6. Hetzner Cloud
  7. PTS Fork
  8. Extra PTS Commands

Blitz App Info

  1. Accessing PTS Apps
  2. App Port Scheme

Tools & Services

Core Apps [Expand]
  1. Emby
  2. Jackett
  3. Jellyfin
  4. LazyLibrarian
  5. Lidarr
  6. Netdata
  7. NZBGet
  8. Ombi
  9. Plex
  10. Portainer
  11. qBittorrent
  12. Radarr
  13. Radarr4k
  14. RadarrHDR
  15. RuTorrent
  16. SABnzbd
  17. Sonarr
  18. Sonarr4k
  19. SonarrHDR
  20. Tautulli
  21. JDownloader2
Community Apps [Expand]
  1. AirSonic
  2. Bazarr
  3. Bitwarden
  4. BookSonic
  5. cAdvisor
  6. Cloud Commander
  7. Deluge
  8. DelugeVPN
  9. Dozzle
  10. Duplicati
  11. Filebrowser
  12. FlexGet
  13. Gazee
  14. Headphones
  15. Heimdall
  16. HomeAssistant
  17. jd2-openvpn
  18. Kitana
  19. Logarr
  20. MakeMKV
  21. MariaDB
  22. McMyadmin
  23. MEDUSA
  24. Mellow
  25. Miniflux
  26. Monitorr
  27. Muximux
  28. Mylar
  29. NextCloud
  30. NowShowing
  31. NZBHydra2
  32. Organizr
  33. plpp
  34. pyLoad
  35. qBittorrent
  36. QBittorrent VPN
  37. radarrsyncarr
  38. Resilio
  39. rflood-openvpn
  40. rutorrent-openvpn
  41. Shoko Anime Server
  42. SpeedTest
  43. SyncLounge
  44. Teamspeak3
  45. The Lounge
  46. Transmission
  47. Trakt.or
  48. Ubooquity
  49. Varken
  50. vnc-xfce
  51. vnstat
  52. ZeroTier

Misc Info & Articles

  1. Change Server Time
  2. Fail2Ban
  3. Custom Containers
  4. Deploying Varken, Influx, Telegraf, Grafana
  5. cloneclean commands
  6. Understanding htop
Scripts
  1. Scripting Area
    1. Auto Upload for Sonarr and Lidarr
    2. Auto Delete Log
    3. Plex Plugin DB Backup
    4. Plex fast BACKUP
    5. Delete All Unmonitored from Radarr
Clone this wiki locally