How To Install rTorrent & ruTorrent (using Socket + SSL + Authentication) on Ubuntu or Debian
February 13, 10 by sharky 53,641 viewsThere are plenty of tutorials out there that explain how to install rTorrent + ruTorrent, but this one’s a little different. This tutorial will guide you through the steps of installing rTorrent+libTorrent and ruTorrent on a Ubuntu or Debian server; with sockets, SSL, and authentication. The end product is a very secure rTorrent/ruTorrent installation that uses sockets (instead of ports); a password-protected GUI; and even an encrypted SSL (https) ruTorrent browse & login page.
UPDATE: This guide is now badly outdated and thus not recommended. While some segments can still be used, we highly recommend users to refer to Subsy’s Guide:
Subsy’s Seedbox Setup Guide at ruTorrent’s official Forum.
What You’ll need:
- • A VPS (or dedi) with root access. (Most providers will offer root access to the server or VPS, but it’s never a bad idea to ask first.)
- • A clean install of Debian 5 or Ubuntu 9x. (This tut is aimed to work with a ‘fresh’ *nux installation, one that doesn’t already have rTorrent/libtorrent).
- • An SSH/shell client such as PuTTY to connect to your server - necessary in order to enter all those exciting commands!
A Prelude:
This has been tested on Debian x86, Ubuntu x86, and Debian x64 and worked perfectly just copying and pasting from the guide. Since it seems more people use Ubuntu than Debian, although I prefer Debian, the commands in this guide are directed at Ubuntu. If you are using Debian, you’ll just have to be in root (type su then the root password) when you enter the commands (and omit the "sudo" part from the commands). All of these commands will need to be done in root if you are using Debian, unless otherwise stated.
A very special thanks goes out to http://SeedboxWorld.net, who allowed us to test this out on their 1gbps servers.
For the Pros: Anyone who’s already familiar with Linux commands through SSH/shell (nano, wget, etc) should find the entire process to take about 10 minutes. PuTTY Pros - ignore the images & tips.
For the Noobs: Even if you’ve never attempted to create your own do-it-yourself seedbox before, I’ve included a few screenshots & useful tips to show how it’s done. There’s no reason why anyone can’t follow this guide. Noobs, be sure to opt for a server that has Ubuntu installed (as opposed to Debian) since you’ll be copy/pasting these commands as-is.
Let’s get started!
Connecting to your Server:
Assuming you’ve already purchased a server (VPS/dedi) from OVH, Leaseweb, server.lu - or even a reseller/VPS hosting provider - you’ll have received a welcome email that contains your server credentials (ie. login details). Look for a section that says "SSH Root" or similar - you’ll need this info for connecting to your server through PuTTY.
Download putty.zip, extract the files to a folder, and run PUTTY.EXE. Enter the IP address of your server (this could be a numerical value or a URL - ie k06.kimsufi.com, either are acceptable). You can save your session and load it later; and lastly click Open to begin the session.
In the PuTTY shell, type in your username (default is "root") and hit Enter on your keyboard. Next copy/paste (or just type in) your password. The password will not be displayed here, but rest assured it has indeed been entered, so hit Enter again to login. Something similar to below is now what you should see:
Configure your Server / rTorrent-ruTorrent Installation:
Now you’re ready to begin. First we need to update apt, then install the tools and such that we will need later on. Copy & paste this line into PuTTY (at the green prompt) and hit Enter:
Once it’s finished, copy & paste this line (and hit Enter):
It is strongly recommended that you create another user (as opposed to using root). So now we’ll create the user that will run rTorrent - we’ll call the new user "rtor". TIP: Add each line at a time, and hit Enter after each:
sudo passwd rtor
Now, create a new password for the new user and enter it (do this twice). This password should be different than the PW you used to login as "root". Remember it, since you’ll need it in combination with the username "rtor" when logging into the ruTorrent WebGUI as well as for other parts of this guide.
Next, copy/paste:
sudo chown rtor:users /home/rtor
With our tools downloaded and our user created, we’ll now install rtorrent (+libtorrent) and ruTorrent. We’ll start with libTorrent:
sudo wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.6.tar.gz
sudo tar zxfv libtorrent-0.12.6.tar.gz
cd libtorrent-0.12.6
sudo ./configure
sudo make
sudo make install
Next is XMLRPC-C:
sudo svn checkout http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable xmlrpc-c
cd xmlrpc-c/
sudo ./configure
sudo make
sudo make install
Then rTorrent:
cd /tmp sudo wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz sudo tar zxfv rtorrent-0.8.6.tar.gz cd rtorrent-0.8.6 sudo ./configure --with-xmlrpc-c sudo make sudo make install
In order for ruTorrent to communicate with rTorrent using xmlrpc, we need to add some settings in lighttpd, our webserver deamon. To do this, type:
You’ll have noticed that PuTTY has changed - the "nano" command is an editor, think of it similar to Notepad but done within PuTTY (shell). What you’re now seeing is the lighttpd.conf file, where you can edit it. Use the up/down & left/right arrow keys on your keyboard to manipulate (scroll) where you want to move the cursor.
Referring to the screenshots below, scroll down to the last " ) " in the server.modules section, and paste these lines underneath it:
server.modules += ( "mod_scgi" ) scgi.server = ( "/RPC2" => ( "127.0.0.1" => ( "socket" => "/tmp/rpc.socket", "check-local" => "disable", "disable-time" => 0, # don't disable scgi if connection fails ) ) )
BEFORE (see below) — This is where you want to paste the above lines. Using the arrow keys, position the green cursor exactly here, and "paste" it in.
AFTER — This is what you want to end up with:
Exit and save using CTRL + X, enter Y when it asks if you are sure, followed by enter. Out of nano now, type the following to restart lighttpd:
You’ll need to make one more configuration change:
— If running Ubuntu, copy and paste this entire section directly into PuTTY (hit Enter only once):
sudo /usr/sbin/lighty-enable-mod fastcgi-php5
else
sudo /usr/sbin/lighty-enable-mod fastcgi
fi
— If running Debian, copy and paste this entire section directly into PuTTY (hit Enter only once):
/usr/sbin/lighty-enable-mod fastcgi-php5
else
/usr/sbin/lighty-enable-mod fastcgi
fi
Then restart lighttpd again:
Now we get ruTorrent:
sudo svn checkout http://rutorrent.googlecode.com/svn/trunk/rtorrent
cd rtorrent
ruTorrent needs to be configured to use the correct socket. Open config.php with nano:
And change the values for $scgi_port to 0 and $scgi_host to unix:///tmp/rpc.socket
Before (these are the default settings)
After (this is what you want the changes to appear as)
Again, exit and save using CTRL + X, followed by Y then enter.
Now out of nano, we need to finalize a few things. Type each line in PuTTY:
sudo chown www-data:www-data /var/www/rtorrent/settings
sudo chown www-data:www-data /var/www/rtorrent/torrents
Right now, you are still logged in as "root" user. Now we need to LOG IN AS THE USER “rtor” that we created. One way to do this is to end the PuTTY session and restart it - at the prompt, enter rtor (hit Enter) and then enter in your password that you created. (Note: there are other ways to switch users during the same PuTTY session - but for the purpose of the screenshot below, we exited & restarted PuTTY). As shown below, we are now logged in as our created user, rtor.
Once logged in, do the following commands:
mkdir /home/rtor/torrents
This next part will involve some custom configuring to get rTorrent working precisely how you want, this should be done when logged in as your user "rtor". Paste these commands into PuTTY:
nano ~/.rtorrent.rc
The rtorrent.rc file is crucial for rTorrent, the backbone of ruTorrent. I highly suggest you read this file and get familiar with it - here you’ll be able to make any necessary changes. NOTE: By default everything is "commented out" (ie - features are deselected/not available as indicated by the # figure seen before each entry). Removing the # from the beginning of a line will then enable rTorrent to read that line.
This guide isn’t about how to make proper configuration settings to rtorrent.rc - "ideal" settings may vary depending on many factors (VPS vs. dedicated; server specs; connection; users per box, etc). But for this specific guide, you should use these settings:
directory = /home/rtor/torrents schedule = watch_directory,5,5,load_start=/home/rtor/watch/*.torrent schedule = untied_directory,5,5,stop_untied=/home/rtor/watch/*.torrent schedule = low_diskspace,5,60,close_low_diskspace=100M port_range = 51515-61234 port_random = no use_udp_trackers = no encryption = allow_incoming,try_outgoing dht = off peer_exchange = no #The Following Are VERY Important encoding_list = UTF-8 scgi_local = /tmp/rpc.socket schedule = chmod,0,0,"execute=chmod,777,/tmp/rpc.socket"
IMPORTANT: The Last 3 Lines (above) You Need To Have In Your Configuration File!
Now, since all lines are # (commented) in rtorrent.rc, you are able to copy/paste the code from above into rtorrent.rc as-is. Be advised that if you later choose to go back and edit rtorrent.rc and uncomment identical options, you’ll end up with two similar entries that rTorrent will attempt to read (naturally, this will lead to errors). So take your time getting rtorrent.rc right the first time - you don’t need to copy/paste the above code (the other option is that this can be done line-by-line if preferred), but just make sure that they’re uncommented (remove the #) and you don’t have duplicates.
If you chose the quick method to just copy/paste it directly, you should now see something that appears similar to this:
Again, exit and save using CTRL + X, followed by Y then enter.
Security
Although this rTorrent + ruTorrent setup is using a socket, which makes it more secure than just an open port, there are a few more quick options that will protect you. These are not optional; it’s a continuation of the guide.
Security (Part I) - Password-Protect Using mod_auth
First we will password protect ruTorrent, that way only you can access it, preventing an unfortunate incident in the event that someone finds your ruTorrent unprotected. This needs to be done logged in as a user who can sudo (the user you used for the first chunk of this tutorial - which in this case is "root"). So, end your PuTTY session [or you can keep it running and type su - then hit the Enter key, and type in your password for the user "root". Once logged in, type this:
Enter a password here (preferably the same password as you entered when we made the rtor account) - you'll need to enter it twice, just as before. This is the password we will use to log into ruTorrent. Now edit lighttpd.conf again:
And below what we added the last time, paste the following:
auth.backend = "htdigest"
auth.backend.htdigest.userfile = "/etc/lighttpd/.auth"
auth.debug = 2
auth.require = ( "/rtorrent/" =>
(
"method" => "digest",
"realm" => "Authorized users only",
"require" => "valid-user"
)
)
Just to clarify, you should now see this below (click image for a full view of the server.modules section in lighttpd.
Again, exit and save using CTRL + X, followed by Y then enter.
Then restart lighttpd:
Security (Part II) - Add SSL to ruTorrent
In Security (Part I) we added a user/pass combo to the login on the ruTorrent web GUI. Next we'll set up SSL - it will allow you to use https:// - this means all your traffic is encrypted. We're fairly sure you're only using rTorrent for legal torrents, but this is still a very good practice. What we're going to do here is create our own SSL certificate.
Assuming that you're still logged into PuTTY as the "root" (sudo) user, here's what you need to do. Copy/paste each of these 3 lines:
cd /etc/lighttpd/certs
sudo openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout lighttpd.pem -out lighttpd.pem
You'll now be prompted for some info about your certificate. NOTE: Everything you enter here is arbitrary - we suggest you don't use your real information, just to stay on the safe side
Now we'll need to edit lighttpd again to tell it to use https:
Paste the following code above the mod_auth section that we added previously (refer to image below for exact placement in lighttpd.conf).
$SERVER["socket"] == ":443" { ssl.engine = "enable" ssl.pemfile = "/etc/lighttpd/certs/lighttpd.pem" }
Again, exit and save using CTRL + X, followed by Y then enter.
Then restart lighttpd:
…we’re almost done.
Using your New rTorrent/ruTorrent Installation:
Ok, you’ve gone through all this work so far, and you still don’t have those latest Ubuntu torrents downloading yet. Not to worry, it’ll only take a second and you’ll be ready to go.
Logout as "root" and back in as the user rtor that we created. Next, start rtorrent in screen. In PuTTY, type:
Screen is a cool program that allows you to keep a program running even after you disconnect from PuTTY, perfect for rTorrent. You can exit screen by pressing CTRL + A + D. - or even close the connection (close PuTTY). Now open FireFox (Or chrome, or… Internet Explorer, but please don’t) and go to https://MyIP/rtorrent or https://mydomain.com/rtorrent. You’ll have to accept the SSL certificate (surely you know how to do this) and then you’ll be presented with a login box where you enter your rTorrent name (in this case, rtor, followed by your password).
If you’ve followed the directions and everything worked, you should now have a completely functional ruTorrent GUI.
Happy ruTorrent Torrenting! If all else fails, you can get a preconfigured seedbox from SeedStorm, starting at $15/month:
01 • RaVeN Says: 13.02.10 at 12:56 am
First!!!
And thanks, im sure it’ll be useful in the future
02 • Capt Hook Says: 13.02.10 at 1:18 am
I’ve been looking for a good guide, thanks. Will this work on a home server using Ubuntu Server? Everything goes smooth until I get to this command in the rtorrent section:
sudo ./configure –with-xmlrpc-c
I get this error:
checking build system type… Invalid configuration `.with-xmlrpc-c’: machine `.with-xmlrpc’ not recognized
Everything else seems to be working fine. Any suggestions how to get past that? Thanks again.
03 • Capt Hook Says: 13.02.10 at 1:41 am
Nevermind, I got past the above error but I’m still not able to get rutorrent to work. I’ll keep tweaking away.
04 • puffdaddycool Says: 13.02.10 at 1:52 am
anybody want invites to IPT or tvt.ro aka freshontv
mail me at puffdaddycool@gmail.com
05 • Whooze Says: 13.02.10 at 4:36 am
thanks for this usefull post.
I was looking for this since reintalling my dedicated.
06 • kokkkk Says: 13.02.10 at 5:25 am
i have got error over here: sudo /etc/init.d/lighttpd force-reload
07 • me Says: 13.02.10 at 11:03 am
that is just too much hassle.
MS-OS for the win, for the lazy and the breached
08 • Alex0007 Says: 13.02.10 at 1:14 pm
I’m using torrentfux-b4rt on debian
09 • bart simpson Says: 13.02.10 at 2:17 pm
imo this is a better tutorial using apache2 http://chogie.info/?p=3
all what u need
010 • chessboxing Says: 13.02.10 at 3:08 pm
How do you set a multi user system for this? So anybody with a account (username/pass) gets a fresh rutorrent only for him/her.
011 • Bill Says: 13.02.10 at 3:08 pm
how to fix, step:
sudo wget http://libtorrent.rakshasa.no/export/1124/trunk/rtorrent/doc/rtorrent.rc -O ~/.rtorrent.rc
sudo nano ~/.rtorrent.rc
when logged in as rtor, I am prompted for my pw after each line above, and get “rtor is not in the sudoers file. This incident will be reported.”
But if I logout and back in as the root, both lines work fine. Please help
012 • no0ne Says: 13.02.10 at 4:31 pm
@ Capt Hook
How have you managed to solve sudo ./configure –with-xmlrpc-c error?
013 • HackedServer Says: 13.02.10 at 6:10 pm
BILL:
Don’t do sudo. Those commands should be done as rtor without sudo.
014 • sbb Says: 13.02.10 at 6:20 pm
Bill and hackedserver. i did it as root and now my rtorrent couldnt find rtorrent.rc
i do not konw what i am going to do for this. sould i reinstall every thing o just this step without sudo as hackedserver sad. ??
NOONE
puty makes -with-xmlrpc to .with-xmlrpc so it is incorrect command. type - instead of .
and also puty makes mant ” charecters . so you should correct it one by one.
015 • sbb Says: 13.02.10 at 6:50 pm
ok. i did it work properly.
but speed is very low and not uploading.
do i need to open port at my modem ?
016 • HackedServer Says: 13.02.10 at 10:58 pm
SBB, if you do it as root it puts the file in the wrong spot. You should just be able to redo it as rtor without using sudo.
Speed is low? Opening ports is beyond the scope of this tut since its meant for servers apparently. But it does use ports in the 50000 range if you copy and paste from the tut, so you might need to.
017 • no0ne Says: 14.02.10 at 1:22 am
would any one explain to me? how to solve this error:
checking build system type… Invalid configuration `.with-xmlrpc-c’: machine `.with-xmlrpc’ not recognized
Which appear after entering this command: sudo ./configure –with-xmlrpc-c
during rtorrent installation
thanks
018 • HackedServer Says: 14.02.10 at 3:53 am
If you look at what SBB said, when copy and pasting it turns the dash into a period. You’ll just have to type a person so its –with-xmlrpc-c
019 • HackedServer Says: 14.02.10 at 3:54 am
type a dash ‘-’ *
020 • Scene Database Says: 14.02.10 at 4:45 am
Very nice tutorial but I still need to practice my linux skills :/
021 • sbb Says: 14.02.10 at 7:26 am
scene db
i do not agree. puty does everthing just copy and paste.
i tried it with a virtual machine created by virtualbox on my desktop computer
i installed ubuntu 9 server edi. then did the same as here. only one problem is above this comment.
Now I Wonder That ;
if this vps or dedi was pre configured by a server company to run such as apache mysql plesk pyton etc. Would this command work properly without unistalling apache or mysql or etc.
because in article it says vps was provided by a seedbox comp. so i think it is not preconfigured for a web server.
022 • vortex Says: 14.02.10 at 1:59 pm
Thanks for all who done this great tutorial
H have an Error after activating this line of command during rutorrent install:
sudo svn checkout http://rutorrent.googlecode.com/svn/trunk/rtorrent
the error as follows:
svn: PROPFIND request failed on ‘/svn/!svn/vcc/default’
svn: PROPFIND of ‘/svn/!svn/vcc/default’: 503 Service Unavailable (http://rutorrent.googlecode.com)
Any thoughts!?
I appreciate the help
023 • vortex Says: 14.02.10 at 3:10 pm
Never Mind the Above error. It Was due to my stupid net connection. I am actually trying to install rtorrent on my HOME PC.
After I have finished Installing when I try to run rtorrent by entering “rtorrent” in terminal it show this Error:
Error in option file: ~/.rtorrent.rc:7: Wrong number of arguments.
darker@darker-desktop:/tmp/rtorrent-0.8.6/doc$
Help is appreciated.
024 • vortex Says: 14.02.10 at 4:45 pm
Well HILLK what a great offer. A GFT for Bit-HDTV. It is either of two things:
1. Either Bit-HDTV stock has increased in value.
or 2. which I believe it is the closer one, YOU ARE A HACKER.
Even if you are Honest I would not do that or any Torrent user who loves his trackers with all sick traders rating Program (level shit, Level Low, Level 100 of trackers).
Any one can help me in the error I mentioned above please do not hesitate.
025 • sharky Says: 14.02.10 at 11:16 pm
UPDATE:
The error with the “xmlrpc-c” line (see the step “Then rTorrent:” above) is due to our Wordpress theme, whereby it doesn’t show double dashes (- -) correctly when they’re typed together. When the line “sudo ./configure –with-xmlrpc-c” is copied, it doesn’t render what ’should’ be pasted.
UPDATE 2:
Quotation marks ” ” (when copy/pasting) have now been fixed.
Sorry for the inconvenience folks; my bad. It’s now been fixed.
026 • Calico Says: 15.02.10 at 3:11 am
As you said, “his guide isn’t about how to make proper configuration settings to rtorrent.rc - “ideal” settings may vary depending on many factors (VPS vs. dedicated; server specs; connection; users per box, etc).”.
Do you know any website which explains these settings in order to optimize them ? If it’s not, could you make one please ?
I think it should help a lot of people !
Thanks.
027 • omfg Says: 15.02.10 at 4:57 am
sudo apt-get install transmission-daemon
bum done
028 • user76 Says: 15.02.10 at 4:49 pm
For those having problems with:
sudo /etc/init.d/lighttpd force-reload
Check the part where you have edited the “sudo nano /etc/lighttpd/lighttpd.conf” file as when you cut and paste the text it replaces the ” with . as soon as you go through and edit these it will be all up and running.
Thanks for the great tutorial, keep up the goo work!!!!
029 • Pyro Says: 15.02.10 at 11:56 pm
Also for anyone having problems with binding lighttpd to port 80 change the port from 80 or remove apache all together.
030 • pantherking Says: 16.02.10 at 2:14 am
so i got it all installed and everything but rutorrent gives me this message, Bad response: (500) 500 - Internal Server Error 500 - Internal Server Error
031 • Shailendra Says: 16.02.10 at 9:55 am
nice tutorial..worked perfectly for me… thnx
032 • John Woods Says: 16.02.10 at 10:28 am
Without a doubt this is the most secure way of doing it. I mean seriously.
Jess
http://www.privacy-tools.de.tc
033 • reflx Says: 16.02.10 at 4:55 pm
Really need help:
I follow all this guide but when I type rtorrent or screen rtorrent give me the follow error:
/.rtorrent.rc:18: Wrong number of arguments.
Any ideias.
Thanks!
034 • ma2 Says: 17.02.10 at 9:48 am
@REFLX
when you cut and paste it turns ” into “.” so you need to change that. had the same problem!
035 • REFLX Says: 17.02.10 at 11:48 am
@MA2
I need to change what?
/.rtorrent.rc:18: Wrong number of arguments.
take the dont? or put the dont between “.”?
Thanks
036 • shutbug Says: 18.02.10 at 8:29 am
@REFLX
When you copy paste you have to change all the quotation marks. They might look good, but they are not.
037 • Desi Says: 18.02.10 at 10:32 am
Hi..thanks..I have made a shell file to automate this
038 • New Guy Says: 18.02.10 at 11:53 am
Hi all ,
what mods are needed to this tutorial to install on a Nginx Server not lighttpd?
039 • REFLX Says: 18.02.10 at 12:26 pm
Thanks SHUTBUG!!
040 • New Guy Says: 19.02.10 at 5:27 pm
“cannot execute rtorrent, no file found” ?????
I copied all the way down where much I have gone wrong? seems to have had a problem with libcurl4-openssl-dev at the start and installing the rtorrent bit I guess
041 • TF Says: 20.02.10 at 2:15 pm
My Ubuntu Desktop died a few days ago, and this is my first attempt at running a headless torrent server.
Your guide worked just flawless.
Thanks.
042 • Ama Says: 20.02.10 at 5:14 pm
Set it all up but when I go to rutorrent in browser it just keeps saying loading, any ideas?
Thank You
043 • Ama Says: 20.02.10 at 5:41 pm
I had changed the folder from tmp as that was having issues there running out of space, I changed where it says tmp everywhere else as well.
Was I ment to keep any of them saying tmp even if everywhere it no longer says tmp?
Thank you
044 • lauti Says: 25.02.10 at 4:57 pm
FINALLY I got it working
it took some time, but thx to your guide I made it
045 • reflx Says: 01.03.10 at 6:57 pm
how I can protect more then one folder using lighttpd?
046 • Adrian Says: 13.03.10 at 4:56 pm
The line:
sudo svn checkout http://rutorrent.googlecode.com/svn/trunk/rtorrent
is not OK, I think it is should be:
http://rutorrent.googlecode.com/svn/trunk/rutorrent/ rtorrent
(???)
Then:
config.php is not in /rtorrent/ but in: /rtorrent/conf/config.php
Then:
sudo chown www-data:www-data /var/www/rtorrent/settings
sudo chown www-data:www-data /var/www/rtorrent/torrents
NOT OK, /settings and /torrents folders are in:
/var/www/rtorrent/share/
—
If I use these correct(!) commands, still not work (rutorrent run fine, but it is can not connect to rtorrent -yes rtorrent is running):
http://drp.ly/AK95l+
047 • Adrian Says: 13.03.10 at 5:28 pm
Ok I see the problem: this article is for the ruTorrent 2.x, but the latest ruTorrent from svn is 3.x (which is totally changed his file structure)! Please update your article to work with the latest version of ruTorrent.
048 • Adrian Says: 13.03.10 at 5:54 pm
+1 question, sorry for the 3 comment
:
How I can access my local box from the internet? My local PC (with rtorrent) is behind a router, with an another PC (for which I opened the ports what I use). Which port I must open for rutorrent/rtorrent? Sorry if it is lame question, the sockets are new thing to me.
049 • scar Says: 14.03.10 at 2:37 pm
hi, i followed your guide recently, and everything was working fine. however, today, when i try to start rtorrent, i am given this error:
$ rtorrent
rtorrent: Error in option file: ~/.rtorrent.rc:94: Could not prepare socket for listening: Address already in use
on ~/.rtorrent.rc:94 is the following:
scgi_local = /tmp/rpc.socket
050 • waldo Says: 14.03.10 at 11:06 pm
I’m having the same issue aswell.
$ rtorrent
rtorrent: Error in option file: ~/.rtorrent.rc:111: Could not prepare socket for listening: Address already in use
051 • stoner Says: 16.03.10 at 6:31 am
If you are having trouble installing rtorrent/rutorrent on your server then come over to http://serverscene.com and drop me a message. We set these systems up all the time. And can do it for you for a very small fee.
For the people having errors with the .rtorrent.rc file make sure the lines have not broken up when U copied it over as that does happen sometimes. Copy and pasting from this forum will not always work as it messes with some of the characters.
052 • Lux Says: 22.03.10 at 1:35 pm
Great guide..with a few work arounds and adjustments, flawless install. Like stated above, watch the SVN install and the mod_auth section of the lighttpd.conf..make sure the path is correct (RUtorrent NOT rtorrent) or SVN will throw an error at download..
Permissions on the share folder needs to be clarified..Like the users above, I had to chown to www-data the /share/torrents and /share/sessions folders..I ALSO had to chmod -R 777 the /share folder itself to get RUtorrent to add torrents and write to the folders..not safe IMO, but had to do it to get it to work..Would chmod -R 766 on the /share folder work? Haven’t tried it yet..
Also I had to make sure permissions on the Rtorrent users folder are writable by the user running Rtorrent…For some reason, probably because I used “adduser”, running sudo mkdir /home/rtor/watch and sudo mkdir /home/rtor/torrents from the admin account created a root ownership which I had to ‘chown rtor:rtor /home/rtor/watch’ etc, to fix..
Found a bug in Debian squeeze between lighttpd and openssl which prevented using https at port 443 with this setup and produced an error code at lighttpd startup..switched to uBuntu 9.04 and 10.04, both of which worked fine on 5 different VPS’s..
Be sure to check the needed double dash “–with-xmlrpc” and the cut/paste conversion to “.” when compiling XMLRPC..
Lastly if you want a quick and easy hack to start rTorrent in Screen when the system starts up try this:
sudo nano /etc/rc.local
Insert the following line BEFORE the “exit 0″ phrase:
su USER -c “screen -d -m rtorrent”
Where USER is your Rtorrent user’s name.
Ctrl+X the Y to save the file
type “screen -r” to bring up Rtorrent and “Ctrl+Q” to quit
and reboot to test..
BTW the above hack work for autostarting vnc as well, insert:
su USER -c “cd ~USER && vncserver :1″
Bam
053 • lol Says: 23.03.10 at 10:15 am
Another Linux guide that doesn’t work if you follow it. The trademark of Linux guides.
054 • morta Says: 31.03.10 at 7:36 am
Debian-50-lenny-32-minimal:/var/www# svn checkout http://rutorrent.googlecode.com/svn/trunk/rtorrent
svn: URL ‘http://rutorrent.googlecode.com/svn/trunk/rtorrent’ doesn’t exist
what i must do to fix this step ?
055 • Ben Says: 31.03.10 at 5:53 pm
I would just like to say thankyou for this guide it has helped me on many occoasions
056 • kdawg Says: 03.04.10 at 5:19 pm
Hey guys the only thing i can’t get working is that i can’t get it to ask me for a username and password when visiting the site. the ssl certificate works. but thats it. but little disappointed. any other info would be great
057 • kdawg Says: 04.04.10 at 10:20 pm
Make sure that auth.require = ( “/rtorrent/” => this is the name of /var/www/rtorrent if it’s not that
Eample if /var/www/rutorrent then auth.require = ( “/rtorrent/” =>
this is the lighttpd.conf
058 • ztaale Says: 22.04.10 at 9:26 pm
KDAWG (or anyone else) i to had the same problem, i tried changing /rtorrent/ to /rutorrent/ but then the interface bugged and no plugins or torrents would load.. basicly the rutorrent interface became useless..
what do i need to do to fix this?
i want pw protection plz!
btw, im using :
https://mydomain.com/rutorrent and not https://mydomain.com/rtorrent
anyone?
059 • Ted Says: 08.05.10 at 7:14 pm
I followed this guide, but I can’t connect to the web page. When I type https://my-ip/rutorrent i get…

Unable to connect
Firefox can’t establish a connection to the server at my-ip.
060 • Anonim Says: 17.05.10 at 10:41 am
I have problem with step “Now we get ruTorrent:” i used the tips from 046 comment, but it still not working good(loads only the main frame of webui).
061 • ProtoWorker Says: 23.05.10 at 1:20 pm
Hey MORTA…
sudo svn checkout http://rutorrent.googlecode.com/svn/trunk/rtorrent
Change the /rtorrent to /rutorrent D:
Thats the mistake and it should work fine
062 • Anonim Says: 25.05.10 at 11:59 am
Ok, now works correctly, but rTorrent can’t remember torrents list and settings. All pluggins work except geoip…
063 • willtriv Says: 09.06.10 at 4:34 pm
So this guide is anything but secure….
The RPC2 dir can be controlled by remotely pointing any other UI to it.
This guide is nice, and is still relevant to those who want to take the time and read the comments to get everything working in karmix/rutorrent3.0
I’m going to probably c/p this entire post and update it for 3.0+ and also add support for html digest auth on the /RPC2 folder. I just have to figure out how to get rutorrent to auth with RPC2
064 • willtriv Says: 09.06.10 at 5:14 pm
So just putting a password on /rtorrent doesn’t protect the RPC2 SCGI service. Which can be used by any other rtorrent UI (like transdroid for android phones.) While it’s nice that you can also connect transdroid to the server directly with this setup, transdroid supports uname/password.
the best change to make everything secure (provided you arent using lighttpd for other things) is to change the auth.require = ( “/rtorrent/” => #line to
auth.require = ( “/” =>
this will just make everything on the server (except for the local rutorrent connection) passworded. It seems that both rutorrent and transdroid are able to play nicely with the /RPC2 services now.
065 • ~J~ Says: 21.06.10 at 11:04 pm
Excellent guide, just nitpicking but….
sudo svn checkout http://rutorrent.googlecode.com/svn/trunk/rtorrent
should be
sudo svn checkout http://rutorrent.googlecode.com/svn/trunk/rutorrent
066 • T Says: 27.06.10 at 11:23 pm
Thank you! It works perfectly!!!!
067 • Suraj Says: 08.07.10 at 5:46 am
For me every thing works but i can not saw any menu bar for seed torrent
068 • Aaron Paulley Says: 14.07.10 at 5:08 pm
This process fails for me on the second step:
E: Couldn’t find package lighttpd
069 • N8 Says: 22.07.10 at 8:32 pm
Hey great tut, it worked great (with a little tweaking here and there)
My only question is there a simple way to make it so my server will run rtorrent on boot. or must i write a upstart script?
070 • Fredrik Says: 31.07.10 at 5:36 pm
I have a small problem I cant resolve myself. All new downloads i trying to be saved to “./” instead of the corresponding catalog to the one rtorrent is watching.
here is my .rtorrent.rc
http://pastebin.com/SNupJTht
071 • Fredrik Says: 31.07.10 at 5:42 pm
forget it, had cemented out the tempcatalog
072 • Trackback :: Installing rTorrent + ruTorrent - Bravo List 08.08.10 at 8:04 pm
[...] could take a look at some tutorials like this one: http://filesharefreak.com/2010/02/13…untu-or-debian i use Torrentflux-b4rt 1.0 Beta 2 on a Fedora VPS and its very easy to install and use donwload [...]
073 • Peter Says: 24.08.10 at 3:50 pm
Everything works fine except one thing.
The webui (rutorrent) dont ask for my password
Any help is much appreciated
074 • cdx1 Says: 26.08.10 at 12:16 pm
having a problem with this stage
once i run this command
if [ -e /etc/lighttpd/conf-available/10-fastcgi-php5.conf ]; then
sudo /usr/sbin/lighty-enable-mod fastcgi-php5
else
sudo /usr/sbin/lighty-enable-mod fastcgi
fi
then type sudo /etc/init.d/lighttpd force-reload i get this error
* Stopping web server lighttpd [ OK ]
* Starting web server lighttpd Duplicate config variable in conditional 0 global: fastcgi.server
2010-08-26 18:13:01: (configfile.c.855) source: /etc/lighttpd/lighttpd.conf line: 183 pos: 1 parser failed somehow near here: (EOL)
[fail]
any one know how to fix this please really need to get this working thanks
075 • meepmeep Says: 27.08.10 at 5:58 pm
@Peter : if you made correction to this howto, ‘rtorrent’ becomes ‘rutorrent’, so you should modify this too on lighttpd.conf
@CDX1 : it says that you already have a line about fastcgi. You should remove all existing line (like in server.modules list, and further on the file like “fastcgi.server = ( “.php” => ((”).
@AARON PAULLEY verify that yours cache is update ==> “apt-get update”. lighttpd is a classic/old package, you should have it
(apt-cache search lighttpd to find the correct name)
@WILLTRIV the easy way to protect the RPC2 is to load the rpc module from rtorrent svn, and desactivate the /RPC2 from lighttpd. Work perfectly here
076 • meepmeep Says: 27.08.10 at 5:59 pm
(btw, really cool howto, fix all the xml-rpc bug from lenny !)
Thank you !
077 • optiix Says: 04.09.10 at 7:47 pm
Hello guys.
I’m kind of a newbie on linux (ubuntu server 10.04) and in need of some help.
First of all, great guide except some dead links and wrong file names (php 0> php5) (…for newbies like me).
I’ve sorted out atleast two problems, my last two was:
rss: Some functionality will be unavailable. web-server’s user can’t access external program (curl).
AND
rss plugin: rTorrent’s user can’t access php interpreter. Plug-in will not work.
————————————–
Now Im stuck at this one:
rss: Some functionality will be unavailable. rTorrent’s user can’t access external program (curl).
I’ve tested Everything. chmod 777 on curl folder and curl/ and curl/*. Nothing works.
As u prolly already understand im trying to get RSS working.
Please help me.
078 • sharky Says: 22.09.10 at 9:11 am
UPDATE: This guide is now badly outdated and thus not recommended. While some segments can still be used, we highly recommend users to refer to Subsy’s Guide: