hosted by liquidweb

Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting Talk Tutorials : VPS Tutorials : How to Setup Ubuntu VPS with rTorrent+wTorrent (Seedbox)

Forum Jump

How to Setup Ubuntu VPS with rTorrent+wTorrent (Seedbox)

Reply Post New Thread In VPS Tutorials Subscription
Send news tip View All Posts Thread Tools Search this Thread Display Modes
Old 05-11-2011, 09:04 PM
telvps telvps is offline
Join Date: Jul 2010
Posts: 33

How to Setup Ubuntu VPS with rTorrent+wTorrent (Seedbox)

1. Configure your firewall
This part of the setup is based on following assumption:
- you've only one wordwide IP address and
- your VE has a private IP address.

It is assumed that your VE can connect to the internet, as only the special setup for the bittorrent ports is shown. The following iptables code will redirect the required ports to your VE, where is the IP of your VE.

iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 63963:63981 -j DNAT --to-destination
iptables -A FORWARD -d -p tcp --dport 63963:63981 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 63982 -j DNAT --to-destination
iptables -A FORWARD -d -p tcp --dport 63982 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p udp --dport 63982 -j DNAT --to-destination
iptables -A FORWARD -d -p udp --dport 63982 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
2. Install the base and rtorrent
At first the packages we need: (As more packages we can use the less work we'll have)

apt-get install rtorrent screen mc wget lighttpd gawk php5-cgi php5-common php5-sqlite php5-xmlrpc sqlite unzip php5-curl
Now download following file and save it as /etc/init.d/rtorrent in your VE and activated for automatic startup at boot time with

update-rc.d rtorrent defaults 25
After this we need to add a user under which the rtorrrent process runs and

# adduser --disabled-login rt
# usermod -aG tty rt
# su - rt
$ wget -O .rtorrent.rc
$ mkdir /home/rt/session
$ logout

change the /home/rt/.rtorrent.rc file to your needs. You should try out rtrorrent after any config file change, to avoid problems with syntax errors or that stuff.

# su - rt
$ rtorrent
If it started press CTRL-Q to get out.

$ logout
If all worked start it with /etc/init.d/rtorrent start

3. lighttpd setup
This sections shows how to setup lighttpd for rtorrent XML RPC and for wtorrent. Add "mod_scgi" to the server.modules in /etc/lighttpd/lighttpd.conf and add following there too:

url.access-deny = ("~", ".inc", ".db", ".tpl.php", ".cls.php",)

Create following file /etc/lighttpd/conf-available/10-scgi.conf with following content:

scgi.server = (
"/RPC2" => # RT_DIR
( "" =>
"host" => "", # Ip where rtorrent is listening
"port" => 5000, # Port specified in .rtorrent.rc
"check-local" => "disable"
Enable following two configs by setting a symlink:

# cd /etc/lighttpd/conf-enabled/
# ln -s ../conf-available/10-cgi.conf .
# ln -s ../conf-available/10-scgi.conf .

Restart lighttpd:

/etc/init.d/lighttpd restart

4. Install wtorrent
Get the newest version and configure it:

# cd /var/www/
# rm index.lighttpd.html
# wget "" -O
#mv trunk/wtorrent/* .
#rm -rf trunk
#mkdir tpl_c/
#cd conf
# cp sample.user.conf.php user.conf.php
Change this file according your settings, especially these lines:

define( 'DIR_TORRENTS', 'torrents/');
define( 'DIR_EXEC', '/var/www/');
define( 'DIR_DOWNLOAD', '/home/rt/doing');
After this makes everything belong to www-data and read/writable:

#cd /var/www
#chown -R www-data:www-data *
#chmod -R 755 *
Now try

After the install is finished do following:

# mv install.php install.php_deactivated
# mv install2.php install2.php_deactivated
You should be able to login via !

Sponsored Links
Old 05-11-2011, 10:18 PM
venantius venantius is offline
Join Date: Apr 2011
Posts: 21
How to if I using apache instead lighttpd?
And is it possible to create multi user like torrentflux?



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me setup my seedbox? WLH-G Employment / Job Offers 4 03-05-2011 12:38 PM
need seedbox setup eyeballs Employment / Job Offers 3 02-14-2011 11:43 AM
rTorrent + ruTorrent seedbox setup on Linux snielsen Systems Management Requests 7 01-28-2011 05:14 AM
4 Per Month Bittorrent Seedbox - rTorrent + ruTorrent NuCode Other Hosting Offers 0 01-11-2011 09:43 PM
Any Tutorial To Start SeedBox On Ubuntu 10.04 ? X-Dev VPS Hosting 7 08-31-2010 09:56 PM

Related posts from
Title Type Date Posted
Canonical to Close Cloud Storage Service Ubuntu One Web Hosting News 2014-04-03 14:05:25
Joyent Cloud Adds Platform Optimization, Support for Ubuntu Server Images Web Hosting News 2014-02-20 11:19:00
Nginx to be Included in Upcoming Ubuntu Release Web Hosting News 2014-01-08 15:17:12
Canonical Releases Ubuntu Server 12.10 with OpenStack Folsom Web Hosting News 2012-10-19 11:11:43
Ubuntu Linux 12.04 Supports OpenStack, Adds Cloud Features Web Hosting News 2012-04-27 11:55:18

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Log in with your username and password

Forgot Password?
Web Hosting News:



Welcome to

Create your username to jump into the discussion! is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.

(4 digit year)

Already a member?