Skip to content

rutorrent openvpn

h1f0x edited this page Mar 25, 2019 · 1 revision

📂 Click Here - Sign up for Google's Suite for Business - Unlimited Space

📂 Click Here - NZB's with from NewsHost - PG Members Receive a 58% Discount


rTorrent + ruTorrent + OpenVPN

Docker container for rTorrent + ruTorrent 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

Installed plugins

The followinng plugins are installed:

Special: autodl-irssi

  • _getdir
  • _noty
  • _task
  • autotools
  • check_port
  • chunks
  • cookies
  • cpuload
  • create
  • data
  • datadir
  • diskspace
  • edit
  • erasedata
  • extsearch
  • feeds
  • filedrop
  • geoip
  • httprpc
  • ipad
  • loginmgr
  • ratio
  • retrackers
  • rss
  • rssurlrewrite
  • rutracker_check
  • scheduler
  • seedingtime
  • source
  • theme
  • throttle
  • tracklabels
  • trafic
  • unpack

Installed themes

The following themes are pre-installed:

  • Agent34
  • Agent46
  • OblivionBlue
  • MaterialDesign
  • FlatUI_Dark
  • FlatUI_Light (default)
  • FlatUI_Material
  • QuickBox

Install instructions

Important

Login: rtorrent : rtorrent (Basic Auth)

Docker volumes

The following volumes will get mounted:

  • /opt/appdata/rutorrent-openvpn:/config
  • /mnt/incomplete/rutorrent-openvpn:/output/incomplete
  • /mnt/downloads/rutorrent-openvpn:/output/complete

OpenVPN configuration

Prepare an OpenVPN configuration of your choice. 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.

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

docker restart rtorrent-rutorrent-openvpn

Verify OpenVPN status

In "/opt/appdata/rutorrent-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:

# PGBlitz
Name: rutorrent-openvpn
Enable: Yes
Host: rutorrent-openvpn
Port: 80
URL Path: /rutorrent/plugins/httprpc/action.php
Username & Password: rtorrent : rtorrent

Tagging

This docker container supports tagging when feeding new torrents.

If a tag is set, the torrent will be copied to the following location once it's finished:

/mnt/downloads/rutorrent-openvpn/{tag}

If no tag is set, the default location is:

/mnt/downloads/rutorrent-openvpn/unsorted

Configuration files

Several configuration files will be deployed to the mounted /opt/appdata/rutorrent-openvpn/ folder:

Folder Description
rutorrent/* ruTorrent config folder for persistence
rtorrent/* rtorrent.rc, session data, *.torrent files, etc.
vpn/* vpn default config / user config

ruTorrent default settings

The default login for FloodUI is rtorrent : rtorrent

The configured socket is /config/rtorrent/session/rpc.socket

rTorrent default settings

ruTorrent specific

execute = {sh,-c,/usr/bin/php /var/rutorrent/rutorrent/php/initplugins.php rtorrent &}

Listening port for incoming peer traffic

network.port_range.set = 23877-23877
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.insert = d.get_finished_dir,simple,\
        "if=(d.get_custom1),\
        (cat, /output/complete/, (d.get_custom1), /),\
        (cat, /output/complete/unsorted/)"
method.set_key = event.download.finished,move_complete,"d.stop=;execute=mkdir,-p,$d.get_finished_dir=;execute=cp,-fr,$d.get_base_path=,$d.get_finished_dir=;d.start=;d.hash"

Socket specs

execute = {sh,-c,rm -f /config/rtorrent/session/rpc.socket}
scgi_local = /config/rtorrent/session/rpc.socket
execute = {sh,-c,chmod 0666 /config/rtorrent/session/rpc.socket}

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"
#log.add_output = "tracker_debug", "log"

Enjoy!

http://PGBlitz.wiki

Useful Starter Links

  1. Introduction
  2. Blitz YouTube Channel
  3. G-Suite Signup
  4. Recommended NewsHosts

Prior Planning 101

  1. Recommended Pre-Reading
  2. Server - Storage Planning
  3. Usenet or BitTorrent
  4. PG Editions
  5. PGBlitz Repos
  6. Common Issues

Deploy & Config

PGBlitz
  1. SSH Server Access
  2. Create a SUDO User
  3. Install PGBlitz
  4. WatchTower
  5. Remote Path Mappings

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

Key Components

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

Blitz App Info

  1. Accessing PG Apps
  2. App Port Scheme
  3. Plex to AutoScan

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. RuTorrent
  14. SABNZBD
  15. Sonarr
  16. Tautulli
Community Apps [Expand]
  1. AirSonic
  2. AllTube
  3. Bazarr
  4. Beets
  5. Bitwarden
  6. BookSonic
  7. cAdvisor
  8. Cloud Commander
  9. DDClient
  10. Deezloaderremix
  11. Deluge
  12. DelugeVPN
  13. Duplicati
  14. EmbyStats
  15. FlexGet
  16. Gazee
  17. Gitea
  18. Handbrake
  19. Headphones
  20. Heimdall
  21. HomeAssistant
  22. HTPCManager
  23. JDownloader2
  24. jd2-openvpn
  25. Kitana
  26. Logarr
  27. MakeMKV
  28. MariaDB
  29. McMyadmin
  30. MEDUSA
  31. Mellow
  32. Monitorr
  33. Muximux
  34. Mylar
  35. NextCloud
  36. NowShowing
  37. NZBHydra2
  38. NZBThrottle
  39. Organizr
  40. pyLoad
  41. Radarr4k
  42. Resilio
  43. rflood-openvpn
  44. rutorrent-openvpn
  45. ShareSite
  46. Shoko Anime Server
  47. SpeedTest
  48. SyncLounge
  49. Syncthing
  50. The Lounge
  51. Transmission
  52. Trakt.or
  53. Ubooquity
  54. x TeVe
  55. Zammad

Misc Info & Articles

  1. Change Server Time
  2. Fail2Ban
  3. Custom Containers
Scripts
  1. Scripting Area
    1. Auto Upload for Sonarr and Lidarr
    2. Auto Delete Log
    3. Plex Plugin DB Backup
    4. Plex fast BACKUP
Clone this wiki locally
You can’t perform that action at this time.