Wiki > ruTorrent
ruTorrent is a front-end for the popular Bittorrent client rTorrent. Full documentation for ruTorrent is located in the ruTorrent GitHub wiki.
Customizing the code & adding new plugins
Follow these steps if you wish to be able to modify the source code of ruTorrent, or add new plugins:
-
Connect to your slot with SSH
-
Run the listed commands:
rsync -a /usr/share/webapps/rutorrent/*/htdocs/ ~/.config/rutorrent/webui/ cp -f /var/www/localhost/htdocs/rutorrent/conf/config.php ~/.config/rutorrent/webui/conf/config.php
Optionally, you can copy the non-standard plugins we provide which includes plugins like autodl-irssi and geoip2
Optionally, you can change the default theme.
-
Edit rTorrent's configuration file:
nano -w ~/.config/rtorrent/rtorrent.rcReplace this line:
execute = {sh,-c,/usr/bin/php /var/www/localhost/htdocs/rutorrent/php/initplugins.php &}
with
execute = {sh,-c,/usr/bin/php ~/.config/rutorrent/webui/php/initplugins.php &}Press CtrlS to save the file, then press CtrlX to exit nano
-
Restart rTorrent on your Manage page
You can now add your own plug-ins by placing their data in ~/.config/rutorrent/webui/plugins and refreshing ruTorrent. You will also have access to all other ruTorrent data and can do with it as you like.
Copy some of the non-standard plugins that we provide by default
The above instructions will give you the most basic of ruTorrent installations. If you would like to also copy over some non-standard ruTorrent plug-ins that we do provide by default, run the following as a single command:
for plugin in autodl-irssi darkbetter filemanager geoip2 magnetic whatbox-cpuload whatbox-data whatbox-diskspace whatbox-helpers; do rsync -a /usr/share/webapps/rutorrent-$plugin/*/htdocs/ /home/user/.config/rutorrent/webui/plugins/$plugin/ ; done
If you wish to not copy one of these plug-ins, remove it from the start of the command.
The base ruTorrent installation comes with the default diskspace and cpuload plug-ins, but these will be broken and inaccurate respectively on our servers. If you prefer to use our fixed versions of these plug-ins, make sure that whatbox-diskspace and whatbox-cpuload are copied in the above command, and then delete the default plug-ins from ruTorrent's plug-in directory
rm -r ~/.config/rutorrent/webui/plugins/cpuload ~/.config/rutorrent/webui/plugins/diskspace
Change the default theme
First, follow the above instructions to customize your ruTorrent install.
Run the following to see what themes you have available:
ls ~/.config/rutorrent/webui/plugins/theme/themes/
Edit the theme config file, setting the $defaultTheme to your desired theme:
nano ~/.config/rutorrent/webui/plugins/theme/conf.php
Example:
$defaultTheme = "Oblivion";
(Press CtrlS to save the file, then press CtrlX to exit nano)
Reverting to the default ruTorrent installation
If you would rather use the default installation again, delete or rename your custom webui directory:
-
rm -r ~/.config/rutorrent/webuito delete, ormv ~/.config/rutorrent/webui ~/.config/rutorrent/webui.oldto rename. -
nano -w ~/.config/rtorrent/rtorrent.rcand replace this line:Replace this line:
execute = {sh,-c,/usr/bin/php ~/.config/rutorrent/webui/php/initplugins.php &}with
execute = {sh,-c,/usr/bin/php /var/www/localhost/htdocs/rutorrent/php/initplugins.php &}Press
Ctrl+Sto save the file, then pressCtrl+Xto exit nano -
Restart rTorrent on your Manage page