Version 2 (modified by Gabor Hudiczius, 17 years ago) ( diff )


Installation guide


  • rTorrent 0.7.8
    • compiled with "--with-xmlrpc-c"
    • sigc++-2.0
  • XMLRPC-C >= 1.07
  • some webserver
    • php5, with the following extensions:
      • xsl (libxslt1.1)
      • xmlrpc


rTorrent side

Preparing the system

You'll need the following packages to install xmlrpc-c, libtorrent and rtorrent

  • make
  • pkg-config
  • sigc++-2.0-dev
  • libncurses-dev
  • libcurl-openssl-dev

Installing XMLRPC-C

To install xmlrpc, get the source from The XMLRPC-C page In my case, i could only compile the 1.11.00 version (due to a known bug, you may try to configure with --disable-cplusplus, if the compiling stops with some syntax error) Of course, you can try any version, over 1.07 (or any version over 1.00, but you'll get incorrect data for values bigger than 231-1, since it does not support 64bit integers)

Follow the next steps:

cd /usr/src
tar xvf xmlrpc-c-1.11.00.tgz
cd xmlrpc-c-1.11.00
./configure --disable-cplusplus
make install

Installing libTorrent

To install libtorrent, follow the next steps:

mkdir /usr/src/libtorrent
tar xvf libtorrent-0.11.8.tar.gz
cd /usr/src/libtorrent-0.11.8
make install

Installing rTorrent

To install rtorrent, follow the next steps:

mkdir /usr/src/rtorrent
tar xvf rtorrent-0.7.8.tar.gz
cd /usr/src/rtorrent-0.7.8
./configure --with-xmlrpc-c
make install

Setting up rTorrent

If you don't have a .rtorrent.rc file, create one into your home directory. You can find an example .rtorrent.rc file. Open .rtorrent.rc, and edit it (for each user):

  • add this line to your .rtorrent.rc "scgi_port =" where 12345 can be replaced by your choice
  • and restart rtorrent
  • if you have more than one user, set a different port for each user's .rtorrent.rc file (be aware, to set different session directories for the users)
  • set your download directory
  • make sure, you have your session directory set and it exists, so rtorrent will remember your torrents after it's restarted

Now, you can start rtorrent. On the bottom, you should see something like this:

(20:55:52) XMLRPC initialized with 356 functions.

rTWi side

Installing and setting up rTWi

If everything went fine, extract the rtwi-xxxxxx.tar.gz to some place where your webserver can see it. In case it's your first install, open the freshly extracted includes/, and edit the next lines:

  • $abs_path (the absolute path of your webroot, i.e.: "/var/www")
  • $domain (your domain, i.e.: "")
  • $site_path (the relative path of the rtwi-xxxx directory, or whatever you renamed it, within your webroot, i.e.: "/rtwi/", if it's absolute path is /var/www/rtwi/)
  • $include_path (if you move the includes directory, or eave it untouched, i.e.: "/includes")
  • if your php interpreter does not handle .html files (only .php) set the $default_ext variable to "php", and rename the index.html to index.php

Adding users

  • find row 44, and change it:
  • replace "userX" with the actual linux username
  • replace "1234567890abcdef1234567890abcdef12345678" with the sha1 hash of the choosen password for the webui (you can generate the sha1 hash online)
  • replace "12345", with the port, you've set in the user's .rtorrent.rc file
  • keep the quotes in the last three steps
  • if you have more than one user, you have to repeat these steps for each one of them, so you'll get something like this:
    $users = array(
    	"user1"		=> array( "pass" => "1234567890abcdef1234567890abcdef12345678", "port"	=> "12345" ),
    	"user2"		=> array( "pass" => "1234567890abcdef1234567890abcdef12345678", "port"	=> "12346" ),
    	"user3"		=> array( "pass" => "1234567890abcdef1234567890abcdef12345678", "port"	=> "12347" ),


  • all users, using this webui will need an "!rtwi_files" directory into their download directory (set by "directory = some/path" in the .rtorrent.rc) with 0777 rights
  • the download directory should be inside your home directory (this might change later, as soon as i find out something secure)


XMLRPC-C 1.11 compilation stops with some syntax error

  • Configure with --disable-cplusplus

rTorrent compilation stops with an errer, which says, i have no libtorrent installed (No package 'libtorrent' found)

  • Find your libtorrent.pc file (try /usr/local/lib/pkgconfig), and set the PKG_CONFIG_PATH environmental variable to it's path (export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig)

rTorrent compilation stops with an error, which says, my libTorrent's version is an empty string (Requested 'libtorrent >= 0.11.8' but version of libtorrent is )

  • Upgrade you automake (you need 1.5+)

I can see the php code in the browser

  • Your php settings does not allows you to to have a php file named .html - change these settings, or rename the index.html to index.php, and set the $default_ext variable to "php" in rtwi's /includes/
  • Php modul is not loaded by the webserver, take a look at your webserver's manual, to find out, how to enable it

I get some php errors about XSL, or XSLT...

  • Install (or if it's installed, than enable) the xsl php extension

I get some php errors about XMLRPC-C...

  • Install (or if it's installed, than enable) the xmlrpc php extension

I've set my username and my password in the, but i cannot log in

  • Did you use the password? You should use the password's sha1 hash (you can generate the sha1 hash online)
  • Enable cookies (or at least session cookies)

I get the "No connection" message in rTWi

  • Set the same port in your .rtorrent.rc file, at the scgi_port=, and in the rTWi's /includes/ at your user's line
  • Check, if rTottent is listening on the port, you've set (netstat -na | grep 12345)
    • It is
      • Check your firewall
      • Recheck the port set in rtwi's incudes/
    • It is not
      • Recheck your .rtorrent.rc - it should have a line like this: scgi_port =
      • Try to set the scgi port in runtime (Ctrl+X, then entre "scgi_port =")
      • If rtorrent stops with an error, that says xmlrpc is not supported, configure xmlrpc-c with --with-xmlrpc-c, and recompile
Note: See TracWiki for help on using the wiki.