Install xmlrpc-c, libtorrent, rtorrent and rutorrent from svn

Set and create the dir we will use for svn checkouts

sudo mkdir $svnpath
sudo chown -R $USER:$USER $svnpath

Install everything you will need and remove xmlrpc or else rtorrent will complain because it uses the one from the repos

sudo apt-get remove libxmlrpc-c*
sudo apt-get install subversion gcc apache2 curl libcurl4-openssl-dev automake autoconf texinfo libapache2-mod-scgi build-essential libtool openssl libsigc++-2.0-dev libncurses-dev libcppunit-dev php5 php5-cli screen

Configure, make and make install xmlrpc-c

cd "$svnpath"
svn co xmlrpc-c
cd xmlrpc-c
sudo make install

Configure, make and make install libtorrent and rtorrent

cd "$svnpath"
svn co svn:// rtorrent
cd rtorrent
cd libtorrent
sudo make install
sudo ldconfig
cd ../rtorrent
./configure --with-xmlrpc-c
sudo make install

Install libxmlrpc-c3-dev

sudo apt-get install libxmlrpc-c3-dev

Get the latest rutorrent

cd $svnpath

svn co rutorrent

To enabel scgi in apache run

sudo a2enmod scgi

To add a scgi mount in apache edit /etc/apache2/httpd.conf

sudo nano /etc/apache2/httpd.conf
and add

Then restart apache

sudo service apache2 restart

We also have to add the mount to your rtorrent conf file

In your ~/.rtorrent.rc file
nano ~/.rtorrent.rc
scgi_port = localhost:5000

Create a symbolic link to rutorrent in /var/www/

sudo ln -s $svnpath/rutorrent /var/www/

Change ownership of rutorrent/share/torrents/ and rutorrent/share/settings to the one who runs the apache2 server

Set www-data as group of rutorrent/share/torrents/ and rutorrent/share/settings/
sudo chown -R $USER:www-data $svnpath/rutorrent/share/torrents/ $svnpath/rutorrent/share/settings/
And allow the group (www-data) to edit those dirs
chmod g+w $svnpath/rutorrent/share/torrents/ $svnpath/rutorrent/share/settings/


You can test rtorrent and rutorrent by running
cd /tmp/

To download lucid server iso to /tmp

Then check so rutorrent is working by going to



It should not be any errors.

And that is all.

Running in bagground mode

You can get rtorrent to run in bagground mode, by having installed screen, it’s possible to start rtorrent (meaning it’s not running at this point, else this won’t work if rtorrent is already running!) with the command

screen rtorrent

and then detach the rtorrent interface in the terminal/ssh remote window by pressing

shift + a + d

and then close the terminal/ssh remote session window, and rtorrent will continue to run in the bagground…


Original article found here