rTorrent and ruTorrent

This article will take you through the installation, usage, and customisation of the torrent client rTorrent and a web UI for it, ruTorrent. For the most part no expertise is required to use the guide. Some areas will require being able to connect to your slot via SSH and you will be instructed to connect via SSH where this is the case.

In this guide rTorrent refers to the torrent client itself and ruTorrent to a web UI for it.

Table of contents

What is ruTorrent?

ruTorrent is the web UI for a torrent client, rTorrent. It allows you to add, manage and remove torrents to your slot, control rTorrent's settings and do a lot of other things through its plugins.

Installation

It is very simple to install or reinstall rTorrent and ruTorrent as the Feral web manager supports its installation. Please follow the separate guide to installing software from the web manager, selecting ruTorrent from the list (rTorrent will be installed as well).

Accessing rTorrent and ruTorrent

Accessing ruTorrent

To access ruTorrent simply visit the link as provided on your slot's software page. This will be in the format https://server.feralhosting.com/user/rutorrent/, where server is the name of your server and user is your username.

Accessing rTorrent

You will need to connect to your slot via SSH in order to access rTorrent itself. Often problems which seem to spring up in ruTorrent are actually occurring in rTorrent so it is sometimes useful for troubleshooting to access rTorrent.

Once you're logged in to SSH, copy and paste screen -r rtorrent.

Starting, stopping and restarting

As described in the introduction rTorrent is the torrent client itself whilst ruTorrent is a web UI for it. ruTorrent does not run as a process so this section covers starting, stopping and restarting rTorrent (process name rtorrent).

Every five minutes the system will scan the processes running and if rTorrent is not running it will attempt to start it up. You can still control the process manually though, as below:

start (press ctrl+a, d to detach)
screen -S rtorrent rtorrent
check running
pgrep -f /usr/local/bin/rtorrent
connect to running rtorrent process (press ctrl+a, d to detach)
screen -r rtorrent
stop
pkill -f /usr/local/bin/rtorrent
restart
pkill -f /usr/local/bin/rtorrent && sleep 3 && screen -S rtorrent rtorrent
kill (force stop)
pkill -f /usr/local/bin/rtorrent

If you get any errors running these commands please check the troubleshooting section.

The check running command will return a process number if rTorrent is running. If it doesn't return anything, rTorrent is not running.

Using ruTorrent

This section provides information on the most basic use of ruTorrent.

Basic considerations

ruTorrent can handle a large number of torrents but you should bear in mind that you may start to see performance issues with higher numbers of torrents. If you want to use more than around 2,000 you should consider using rTorrent by itself.

Adding torrents

To add torrents to ruTorrent click the Add button which resembles a globe in the standard theme. It is the left-most icon on ruTorrent's toolbar.

You can also drag and drop the .torrent files into ruTorrent from your computer. There is a bug with the https version which means an error will be returned when you do this. If you try to add several .torrent files via drag and drop only the first couple may get added. With this in mind you may prefer to either use the http version or add files via one of the other two methods.

Finally, you can also upload the .torrent files via (S)FTP, into the directory ~/private/rtorrent/watch. After around 60 seconds the loaded torrents will be added into ruTorrent.

Removing torrents

To remove torrents from ruTorrent, simply select the torrent(s) you want to remove and right-click the selection. You can pick Remove if you want to remove them from rTorrent without deleting the data from your slot, or Remove and... --> Delete Data if you want to remove the data from your slot as well.

Plugins

A separate article covers installing plugins for ruTorrent.

Changing version

A separate article covers changing the version of ruTorrent or rTorrent.

Troubleshooting

I get the error No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file

This error generally either means that rTorrent has crashed or that ruTorrent has lost communication with it. The fix in either case is to restart rTorrent then refresh the browser running ruTorrent, so please consult the section on starting, stopping and restarting rTorrent.

If it still does not load even after restarting rTorrent and refreshing ruTorrent, please double check if the disk is full by logging in via SSH and running df --si ~/

The ruTorrent loading icon just spins

Refresh ruTorrent and your cache by pressing ctrl + F5 (cmd + F5 on Mac). If it doesn't help, please try restarting the torrent client as per the section on starting, stopping and restarting rTorrent.

When I try to add a torrent nothing happens

This could be down to a number of reasons - that the torrent is has a problem with it, that the .torrent file is greater than 2MB of that the disk is filled.

To check the first, upload the .torrent file somewhere on your slot, log on to your slot via SSH and run transmission-show on the torrent: transmission-show $torrent_path where $torrent_path is replaced by the location of the .torrent file.

If the .torrent file itself is greater than 2MB then you can upload it via FTP/SFTP to ~/private/rtorrent/watch

You can check if your user disk or the server's root filesystem is full by logging in via SSH and running df --si / ~/. If 100% is displayed under the Use% column, please open a ticket.

I get the error rtorrent: Could not lock session directory:

This comes about when the previous rTorrent is not closed properly. Simply delete the lock file via SSH with rm -f ~/private/rtorrent/work/rtorrent.lock and start up rTorrent.

When dragging and dropping a torrent, I get an error (or it only adds the first couple)

This is caused by the dragging and dropping not playing well with Feral's proxypassed HTTPS ruTorrent URLs. So, there are two "workarounds":

  1. Use another method to upload - the Add function, or uploading to ~/private/rtorrent/watch
  2. Use the HTTP link (not recommended)

When I try to access ruTorrent, I just get a lot of 0s down the page

Chrome no longer loads sub-resources (e.g., running JavaScript, CSS) when the username and password are applied via the URL. Loading the page directly or using another browser continues to work fine.

Uninstalling

kill -9 $(pgrep -fu "$(whoami)" "rtorrent")
rm -rf ~/.rtorrent.rc ~/private/rtorrent

These commands act only on your slot, so the software page will not change to reflect the fact that ruTorrent has been removed. The URL and password will remain despite the fact that ruTorrent is gone.