Getting wTorrent working with Apache

wTorrent is a web interface for the rTorrent bit-torrent client. This post shows you how to get it working in ubuntu or another similar debian derivative. This presumes you already have working copies of rTorrent and apache2, and they are running on the same computer.

To get wTorrent running you need the following:

  • xmlrpc-c library
  • xml-rpc php5 module
  • mod_scgi apache2 module


In ubuntu, you can get them using the following commands:

sudo apt-get install libxmlrpc-c3-0

sudo apt-get install php5-xmlrpc

sudo apt-get install libapache2-mod-scgi

Note: if you have a fairly old version of Linux, try libxmlrpc-c3 instead of libxmlrpc-c3-0

Now that you have these installed, you need to have apache2 load mod_scgi. To do this, create a symbolic link of the scgi module in the mods-enabled directory:

cd /etc/apache2/mods-enabled
ln -s ../mods-available/scgi.load

In the above script, replace /etc/apache2/ with the path to your apache config files if they are stored elsewhere.

You will then need to add the following to you httpd.conf to tell wTorrent where to find rTorrent:

SCGIMount /RPC2 127.0.0.1:5000

Get wTorrent from http://www.wtorrent-project.org/trac/wiki/wTorrentDownload.

Extract the zip file somewhere, and then copy or move the files from trunk/wtorrent to a path within your web root. Go into that directory and run the following:

chmod o+wx db torrents tpl_c

Then go into to conf directory and copy the sample.user.conf.php to user.conf.php.

Now you need to go to http://<your-server>/<path-to-wtorrent>/install.php path in a web browser.

Set the rTorrent scgi port field to 80 (or the port on which you are running apache), rTorrent scgi folder field to /RPC2 and Enable auth for the scgi folderto false.

Also set a username and password which you will use to log into wTorrent.

Now start rtorrent if it isn’t running. Then go to your wtorrent url, and log in. You should be presented with the wTorrent interface with all you current torrents.

Author: Musaul Karim

Software Engineer, Hobbyist Photographer, and a bit of a gadget geek.

1 thought on “Getting wTorrent working with Apache”

Leave a Reply

Your email address will not be published. Required fields are marked *