How to Install rTorrent + ruTorrent on Ubuntu

This guide will show you how to install rTorrent and ruTorrent on Ubuntu.  Don’t become root and execute all of these commands, it’s easiest to just use sudo when necessary because rTorrent will ultimately be ran by a normal user.  With a few obvious exceptions, everything here can just be copied and pasted.

Note: This guide was last updated on 2/14/2014 for Ubuntu 14.04

Install the packages you’ll need:

sudo apt-get update
sudo apt-get install subversion build-essential automake libtool libcppunit-dev libcurl4-openssl-dev libsigc++-2.0-dev unzip unrar-free curl libncurses5-dev screen
sudo apt-get install apache2 php5 php5-cli php5-curl

Enable scgi for Apache:

sudo apt-get install libapache2-mod-scgi
sudo ln -s /etc/apache2/mods-available/scgi.load /etc/apache2/mods-enabled/scgi.load

Install XMLRPC:

mkdir ~/install ; cd ~/install
svn checkout xmlrpc-c
cd xmlrpc-c
./configure --disable-cplusplus
sudo make install

Install libtorrent:

cd ../../install
tar xvf libtorrent-0.13.2.tar.gz
cd libtorrent-0.13.2
sudo make install

Install rTorrent:

cd ../../install
tar xvf rtorrent-0.9.2.tar.gz
cd rtorrent-0.9.2
./configure --with-xmlrpc-c
sudo make install
sudo ldconfig

Create your required directories. I personally store my torrents on a drive mounted to /Files2, so this example will reflect that. Change as needed.

mkdir /Files2/Torrents
mkdir /Files2/rtorrent
mkdir /Files2/rtorrent/session
mkdir /Files2/rtorrent/watch
mkdir /Files2/rtorrent/download

Setup .rtorrent.rc file (rTorrent config). Probably best to just put this in your home directory.


Configure .rtorrent.rc with your custom settings:

vi .rtorrent.rc
directory = /Files2/Torrents
session = /Files2/rtorrent/session
port_range = 45248-45428 #this uses a single port. or use an entire range, example: 30585-30685
scgi_port =
encryption = allow_incoming,enable_retry,try_outgoing

Install ruTorrent:

cd ~/install
tar xvf rutorrent-3.5.tar.gz
sudo mv rutorrent /var/www/html
tar xvf plugins-3.5.tar.gz
mv plugins /var/www/html/rutorrent
rm -rf /var/www/html/rutorrent/plugins/darkpal
sudo chown -R www-data:www-data /var/www/html/rutorrent

Secure ruTorrent:

sudo a2enmod ssl
sudo a2enmod auth_digest
sudo a2enmod scgi
sudo openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem
sudo chmod 600 /etc/apache2/apache.pem
sudo htdigest -c /etc/apache2/passwords seedbox
sudo /etc/init.d/apache2 reload

Start rTorrent:

screen -S rtorrent rtorrent

Ctrl+A then D to disconnect from the rtorrent screen.

Now access ruTorrent at http://x.x.x.x/rutorrent

In case any of the above links don’t work: