Monday, April 1, 2013

Installing ruTorrent on CentOS and Debian


ruTorrent Logo

What is a Seedbox?

Simply, a seedbox is a server used for downloading and uploading files. A seedbox is usually used to run and download torrents which can later be downloaded through FTP.
Seedboxes have a very fast internet connection (100 mbps, 1gbps...)

I'm going to use a script to auto install everything to avoid some hardcore configurations. This is the quickest method of turning a server into a seedbox. It was tested on a fresh CentOS6 64 bit installation and a fresh Debian6 64 bit installation. The server has 256 MB RAM and 512 MB Burst RAM, although 256MB should be fine.


Installing ruTorrent on CentOS 6


First let's update all our current packages:
yum update
Make sure wget is installed to download the installer:
yum install wget
Then we download the installer:
wget --no-check-certificate https://raw.github.com/etiennerached/rutorrent-auto-installer-centos/master/rutorrent-installer.sh
And run it:
sh rutorrent-installer.sh

The installer will start, you can keep the default settings by pressing enter, or just choose the ones you want.
I'm going to use Apache as the web server and install ruTorrent to manage the torrents from a web interface.
 
Seedbox Installation

Next, we create a torrent user, I will call mine "tor" for this tutorial. And we install the FTP server with a secure encrypted connection (FTPES), I will choose port number 666.

If you would like to manage your server from a web-interface, you can install webmin, which by default will run on port 10000.
Seedbox Installation

After choosing all the settings, we press Enter to install and configure. This might take around 5 minutes, depending on the server speed. If Webmin is to be installed, more configuration has to be done after few minutes, pressing enter and leaving the default value is OK.

To access the webinterface, go to your-domain-name/rutorrent, or Server-IP-Address/rutorrent, enter the username you chose (tor in my case) and the password.

ruTorrent Interface

To access the FTP, make sure you choose the port number that was selected during the installation (666 in this tutorial), and select FTP over explicit TLS or SSL. Make sure you accept the certificate. The downloaded files will be located in the downloads directory.
Ftp



Happy Torrenting!



Installing ruTorrent on Debian 6

First let's update all our current packages:
apt-get update
Then we download the installer:
wget --no-check-certificate https://raw.github.com/etiennerached/rutorrent-auto-installer-centos/master/rutorrent-installer.sh
And run it:
sh rutorrent-installer.sh
or
sudo rutorrent-installer.sh

The installer will start, you can keep the default settings by pressing enter, or just choose the ones you want.
I'm going to use Apache as the web server and install ruTorrent to manage the torrents from a web interface.
 
Seedbox Installation

Next, we create a torrent user, I will call mine "tor" for this tutorial. And we install the FTP server with a secure encrypted connection (FTPES), I will choose port number 666.

If you would like to manage your server from a web-interface, you can install webmin, which by default will run on port 10000.
Seedbox Installation

After choosing all the settings, we press Enter to install and configure. This might take around 5 minutes, depending on the server speed. If Webmin is to be installed, more configuration has to be done after few minutes, pressing enter and leaving the default value is OK.

To access the webinterface, go to your-domain-name/rutorrent, or Server-IP-Address/rutorrent, enter the username you chose (tor in my case) and the password.

ruTorrent Interface

If the webinterface is not loaded correctly, try to re-install irssi.

sudo apt-get install irssi

To access the FTP, make sure you choose the port number that was selected during the installation (666 in this tutorial), and select FTP over explicit TLS or SSL. Make sure you accept the certificate. The downloaded files will be located in the downloads directory.
FTP Login


Note:

If you get the below error when you access rutorrent:
AutodlIrssiTab._getNewLines: Exception info: name = TypeError; message = $.browser is undefined; fileName = https://xxx.xxx.xxx.xxx/rutorrent/plugins/autodl-irssi/AutodlFilesDownloader.js; lineNumber = 28;
or
Error downloading files. Make sure autodl-irssi is started and configured properly (eg. password, port number): AutodlFilesDownloader.downloadAllFiles: Exception info: name = TypeError; message = $.browser is undefined; fileName = https://xxx.xxx.xxx.xxx/rutorrent/plugins/autodl-irssi/AutodlFilesDownloader.js; lineNumber = 28;

Go back to SSH and type the following command:
vi /var/rutorrent/rutorrent/plugins/autodl-irssi/AutodlFilesDownloader.js
Press "i" to go into editing mode, and replace:
if ($.browser.msie)
with
if ($.browser={ msie: ( navigator.appName == 'Microsoft Internet Explorer') ? true : false })
Press ESC to exit editing mode. Press :w to save. Press :q to quit.



If you are on CentOS 7:
Apache and mod_scgi does not work well on CentOS 7 yet. If you are on CentOS 7 You should choose nginx for now while installing.

And make sure to allow the http/https ports in the firewall:
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload


Happy Torrenting!



Have some questions? Leave us a comment below!

23 comments:

  1. Good tutorial took less than 5 minutes to run the whole installer

    ReplyDelete
  2. Been looking for two days for a working tutorial on how to install ruTorrent. Finally found it!

    ReplyDelete
  3. very good, congratulations!

    But how to make multi-user with this script?

    ReplyDelete
  4. Upon installing the script, you can create as many users as you want.

    if you would like to create more users after the installation is completed, you can edit the configuration files and create new users.

    ReplyDelete
    Replies
    1. could you please inform command for multiuser? also works in ubuntu this script?

      Delete
    2. How to edit the configuration files and create new users?

      Delete
  5. At the top of the script, you'll need to change the URL for xml-rpc to:

    https://svn.code.sf.net/p/xmlrpc-c/code/stable

    The script will stop at that / break if you do not edit it.

    Thanks for the script!

    ReplyDelete
  6. Furthermore, I believe another change is needed:

    https://svn.code.sf.net/p/autodl-irssi/code/trunk/rutorrent/autodl-irssi

    Thanks for the script. Much appreciated.

    ReplyDelete
  7. There is a second change needed because a svn is changed:

    For autodl-irssi:
    https://svn.code.sf.net/p/autodl-irssi/code/trunk/rutorrent/autodl-irssi

    Thanks for the script!

    ReplyDelete
  8. Please can you update this form i try to make rutorrent on a debian server but i stop working before no problems and now error please help this isseu.
    its a good delay
    thanks for the job.
    greets Patrick

    ReplyDelete
    Replies
    1. The script had two outdated SVNs, it's fixed and working now

      Delete
  9. the script stop in this line:

    Downloading xmlrpc-c source code...
    svn: Repository moved permanently to 'https://svn.code.sf.net/p/xmlrpc-c/code/stable'; please relocate

    please solve this problem.

    ReplyDelete
    Replies
    1. vi autodl-setup and replace XMLRPC-C svn directory with 'https://svn.code.sf.net/p/xmlrpc-c/code/stable'

      Delete
    2. The Script has been updated and fixed.

      Delete
  10. You forgot to include:

    yum install wget

    ReplyDelete
  11. dont work for my vps 256 mb debian 6 squeeze
    i got this error every time: http://anonpic.ws/i/WpUI1.png

    ReplyDelete
    Replies
    1. Hello, I doubt that this is from the script

      It seems your ssh connection to the server is timing out

      Do you have any burst or vswap RAM on your vps?

      Delete
    2. no i dont have any burst or vswap RAM. i have only a 256 mb RAM and 100MBiT Uplink. can you change the settings a little bit for my vps, so i can use your script? thanks.

      Delete
  12. With CentOS and vsftpd users cannot change to the HOME directory:

    500 OOPS: cannot change directory:/home/...

    This can be solved by using the following command as root:

    setsebool -P ftp_home_dir on

    ReplyDelete
  13. Worked swiftly on my vps

    thanks a lot for this great tutorial.

    ReplyDelete