Adding a Second ruTorrent User to Your Server

Since Chogie.info has been offline for quite some time, we thought what a terrible waste it would be for the Internet to lose those excellent rTorrent/ruTorrent tutorials. So, we kept them alive! Here’s Part 3:

Source from - http://chogie.info/?paged=19

Originally titled - “Adding a Second rutorrent user to your server”

====================================================

I was helping out a user on a torrent site with this, and I didn’t even know it was possible. I said I couldn’t do it, but thats not me, I’m the type of person that says no task is to big, So I began reading, and learnt an easy way. So enough yap, Lets get you sharing that server with a friend or family member.

If you had used my first guide rTorrent + ruTorrent the simple way, then this will be a walk in the park.

# First of lets add an second SCGIMount in the apache config.

sudo nano /etc/apache2/sites-enabled/000-default

# All you have to do is copy the SCGIMount line, and change RPC2 to RPC1 or 3 whatever.
# Also change the port it’s running on the default one is 5000 so I used 5001. So it looks something like this.

# Restart the webserver

sudo /etc/init.d/apache2 restart

# thats the hard bit done!

# Add the second user to the system with

sudo useradd -m user2

# the -m is just telling the system to create the home folder for the user. Also if you using VSFTPD, and I’m sure it’s the same with PROftpd, It will automaticy add them to the FTP server so they can FTP the data.

sudo passwd user2

# Is used to add a password to the user.

# lets change to the second user, so all the permissions on the files are correct.

su user2

cd /home/user2

# or

cd ~

#Now lets get rtorrent set up for the second user. First we need to create the .rtorrent.rc

nano .rtorrent.rc

# copy the content from the link below into the nano editor, and make changes you need.

# http://pastebin.com/f146fed2

# Don’t forget to change the download/session/watch dirs to user2’s home directory

# We also need to tell rtorrent what port the SCGIMount is this is found on line 51. Just change the port number
# to the second SCGIMount we maded in the apache config.

# Make the directorys with user2 for rtorrent to use.


mkdir downloads
mkdir watch
mkdir .session

# Change permissions to read+write all

chmod 777 downloads watch .session

# now we need to install the the second webui, and edit the configs.

# we’re have to change user again, as we’ve not put user2 on the sudo list


su <youruser>

# The way I did it was just make a second rtorrent directory in the /var/www directory.

sudo mkdir /var/www/rtorrent2

cd /var/www/rtorrent2

# Lets grab the webui

sudo wget http://rutorrent.googlecode.com/files/rtorrent-2.8.tar.gz

sudo tar -vxzf rtorrent-2.8.tar.gz

# Lets move all the files from the created folder


sudo mv rtorrent/* /var/www/rtorrent2/

sudo rm -r rtorrent

# final steps now is to edit to config files in rutorrent to tell it what ports the SCGIMount is on, to direct it to
# to the correct rtorrent

sudo nano rs.js

# All we have to change in this file is the XMLRPCMountPoint as default it’s /RPC2 we want to change that to the the number we maded in 000-default file of apache, in my case I made /RPC1 so…

# One more file to change, one last tiny detail to change

sudo nano config.php

# Just change the port number. to the same we maded in the apache config.

# change back to the second user

su user2

# Start rtorrent with screen

screen rtorrent


# thats it, you should have 2 instances of rtorrent and rutorrent running, linked to the correct client.