rTorrent/ruTorrent¶
- Homepage: https://github.com/rakshasa/rtorrent
- Manpage: https://github.com/rakshasa/rtorrent/wiki
- Changelog: https://github.com/rakshasa/rtorrent/releases
- Repository: https://github.com/rakshasa/rtorrent
- Package: master/make/pkgs/rtorrent/
-
Steward: -
-
rTorrent homepage: https://github.com/rakshasa/rtorrent
- rTorrent wiki/manpage: https://github.com/rakshasa/rtorrent/wiki
- rTorrent releases: https://github.com/rakshasa/rtorrent/releases
- Freetz package path: master/make/pkgs/rtorrent/
- Maintainer: @Ircama
What is included¶
In this tree, the BitTorrent stack is split into three parts:
rtorrentdaemon (download/seeding engine).rtorrent-cgiweb configuration interface and setup wizard.rutorrentoptional full-featured web UI for daily use.
Source-based behavior map¶
Main files that define the current behavior:
make/pkgs/rtorrent-cgi/files/root/usr/lib/cgi-bin/rtorrent.cgimake/pkgs/rtorrent-cgi/files/root/etc/default.rtorrent/rtorrent.cfgmake/pkgs/rtorrent-cgi/files/root/etc/default.rtorrent/rtorrent.savemake/pkgs/rtorrent-cgi/files/root/etc/init.d/rc.rtorrentmake/pkgs/rutorrent/Config.in.incmake/pkgs/rutorrent/rutorrent.mk
What rtorrent.cgi provides¶
AJAX service endpoints¶
The CGI supports an ajax=1 mode with wrapped JSON output and includes actions for:
- checking and creating the base directory,
- checking/creating
.rtorrent.rc, - creating the standard runtime directory structure,
- reading configured peer port from
.rtorrent.rc, - saving base path only,
- saving + starting the daemon,
- secure file read/write helpers for rTorrent and ruTorrent config files,
- soft-delete behavior for
.rtorrent.rcby timestamped archive rename.
Initial setup wizard¶
If no base path is configured or no .rtorrent.rc exists, the wizard is shown automatically.
Wizard flow:
- choose storage location (RW mount suggestions are listed),
- create/select base folder,
- create
.rtorrent.rcfrom template, - create runtime folders,
- read active peer port and show forwarding reminder,
- show ruTorrent availability and launch links.
The wizard also supports keyboard navigation and explicit close confirmation.
Standard configuration page¶
Once setup is complete, the normal page exposes:
- service start mode,
- base directory,
- process priority,
- peer and bandwidth settings,
- DHT settings,
- hash-check behavior,
- boot wait behavior,
- SCGI communication port,
- memory limit tuning for pieces,
- boot monitoring settings,
- ruTorrent section (when installed),
- forwarding status section,
- integrated config editors,
- startup log viewer.
Integrated config editors¶
The page links to:
/rtorrent/rtorrent_config_editor.html/rtorrent/rutorrent_config_editor.html
Supported ruTorrent config targets include:
config.phpfreetz_config.phpplugins.iniaccess.ini
The backend applies path validation, whitelist checks, backup-before-write, and rollback on write failure.
Save/apply and service behavior¶
Save hook behavior¶
The save hook updates .rtorrent.rc after the framework save step, keeping runtime configuration aligned with form input.
It updates rate/peer/DHT/hash/SCGI/memory lines and writes debug traces to:
/var/tmp/rtorrent-save-debug.log
Init script behavior¶
The init script supports both manual lifecycle control and boot-time startup strategy:
- verifies required resources,
- supports immediate or delayed startup mode,
- can run a short boot monitor window with automatic restart attempts,
- writes startup logs to:
/tmp/rc.rtorrent.log/tmp/rtorrent.startup.out/tmp/rtorrent.startup.err
ruTorrent plugin overview¶
Core and base plugin model¶
From Config.in.inc and rutorrent.mk:
- ruTorrent can be installed with or without the official base plugin set,
- optional package-time plugin selection is supported,
- several third-party plugins are integrated by the package recipe.
Included/optional plugin groups¶
Package-managed plugin set includes entries such as:
autodl-irssimobilechat,nfo,hostnamefilemanager(original or Freetz-enhanced variant)mediastreamfilesharelogoffpausewebuiinstantsearchtoggle_details_buttontrackerstatus
Freetz filemanager plugin variant¶
When enabled, the Freetz variant replaces the default filemanager plugin and adds embedded-oriented improvements (for example BusyBox-friendly behavior and improved archive handling).
For full plugin capability, additional tools such as p7zip, unrar, and mediainfo are recommended.
Initial setup tutorial (user-focused)¶
This tutorial intentionally uses UI language only.
1) Build prerequisites¶
Enable at least:
- rTorrent daemon package
- rTorrent CGI package
- ruTorrent package (recommended)
Optional but useful:
- AVM rules package (forwarding workflow)
- p7zip/unrar/mediainfo (plugin enhancements)
2) Open the configuration page¶
Open:
/cgi-bin/conf/rtorrent
If prompted with the setup wizard:
- pick a persistent storage location (USB/NAS),
- create the main folder,
- generate the default rTorrent config file,
- create runtime subfolders,
- confirm the detected peer port for router forwarding.
3) Validate setup results¶
After wizard completion, verify:
.rtorrent.rcexists in the selected main folder,- download/session/watch folders are present,
- startup log section shows no fatal errors.
4) Tune runtime settings from the UI¶
In the regular form:
- decide whether service should auto-start at boot,
- set startup wait behavior for USB/NAS availability,
- tune upload/download caps to match your line,
- tune peer/session limits for your device RAM,
- keep SCGI communication port consistent with ruTorrent.
5) Configure router forwarding¶
In the forwarding section:
- read the active peer port detected from config,
- forward both TCP and UDP for that same port in router rules.
Without proper forwarding, incoming connectivity is limited.
6) Launch ruTorrent and verify connection¶
Open:
/rutorrent/
Confirm torrents load correctly and there is no SCGI/XMLRPC connection error.
Daily usage quick guide¶
- add torrents or magnet links in ruTorrent,
- use watch folders for automatic loading/start policies,
- use editor pages for controlled config edits,
- review startup logs after major changes,
- restart service when making structural configuration changes.
Troubleshooting quick guide¶
Service does not start¶
Check:
/tmp/rc.rtorrent.log/tmp/rtorrent.startup.err
Changes saved but not applied¶
Check:
/var/tmp/rtorrent-save-debug.log
ruTorrent cannot connect to backend¶
Check:
- service status,
- configured SCGI communication port alignment,
- XMLRPC proxy accessibility from ruTorrent.
Permission/path issues¶
Check:
- ownership and write permissions on base folder and runtime subfolders,
- availability of mounted storage at boot time.
Tree references¶
make/pkgs/rtorrent-cgi/files/root/usr/lib/cgi-bin/rtorrent.cgimake/pkgs/rtorrent-cgi/files/root/etc/default.rtorrent/rtorrent.cfgmake/pkgs/rtorrent-cgi/files/root/etc/default.rtorrent/rtorrent.savemake/pkgs/rtorrent-cgi/files/root/etc/init.d/rc.rtorrentmake/pkgs/rutorrent/Config.in.incmake/pkgs/rutorrent/rutorrent.mk