Make/Setup your own Seedbox on your Cheap VPS

You can easily get a cheap VPS online or get a custom vps made through Rose Hosting these are  these easy steps to run your own seed box on centos and run your own cheap seedbox yourself.

Why do you need a seedbox?

  • Your ISP is blocking or throttling BitTorrent traffic.
  • The IT department at your work is blocking or throttling BitTorrent traffic.
  • You have a laptop and it is not practical to keep it running all the time.
  • You travel a lot and rarely stay online for a significant period of time to download a full torrent.
  • You are a member of a private torrent site and would like to maintain a good standing aka ratio.
  • You are tired of overpaying for seedbox hosting at other places.
  • And last, but not least, you’d like to maintain privacy!

What will I accomplish at the end of this howto?

seedbox cheap

  • A Linux box running Transmission BitTorrent client with web based access. Web based access is also optimized for iPhone.
  • A cross-platform desktop Transmission Remote GUI front end.
  • FTP access to download completed downloads.

What do I need to begin this guide?

  • Average computer skills.
  • Minimal Linux knowledge (basic shell commands).
  • A dedicated or VPS (Virtual Private Server) running CentOS 5.5 and above. Other similar distros might also work, but haven’t been tested yet. Your Linux distro needs to have a yum package manager.
  • SSH client (e.g. PuTTY on a Windows machine; Terminal on a Mac machine)
  • Ten minutes of your time. I was actually able to set this one up in under 4 minutes during one of the tests.

If you don’t have a server yet, don’t worry. Unless you are a very heavy-duty user, you probably won’t need a dedicated server. If you are unsure, go with a VPS. I don’t have any service provider recommendations at the moment, but I assure you there are plenty. Just do some research on torrent-friendly ones. ;)

Installation

I assume that you have obtained your server credentials (username and password) by now. Login to your server using the SSH client.

Installing prerequisites

First we are going to install a bunch of prerequisite software packages that we will need during the course of this tutorial. Issue the following command:

yum -y install wget bzip2 which gcc gcc-c++ make openssl-devel pkgconfig curl-devel perl-XML-Parser perl-libwww-perl gettext
yum -y upgrade

This installation might take a minute or two, depending on your server specs and connection speed.

Installing intltool

CentOS intltool package is out of date and a recent version is not available through the package manager. We must compile it from source. Don’t quit now. This isn’t as scary as it sounds. :)

cd /usr/local/src
wget -q http://ftp.gnome.org/pub/gnome/sources/intltool/0.40/intltool-0.40.6.tar.gz
tar zxf intltool-*.tar.gz
cd intltool-*
./configure --prefix=/usr && make -s && make -s install

Installing libevent

CentOS libevent package is out of date, just like intltool, so we resort to installing the latest version by hand.

cd /usr/local/src
wget -q --no-check-certificate https://github.com/downloads/libevent/libevent/libevent-2.0.17-stable.tar.gz
tar zxf libevent-*-stable.tar.gz
cd libevent-*-stable
./configure --prefix=/usr && make -s && make -s install && ldconfig

Installing Transmission

Transmission is the actual torrent application that you will be using. Again, just copy paste the commands into the SSH client window.

cd /usr/local/src
wget -q http://download.transmissionbt.com/files/transmission-2.50.tar.bz2
tar xjf transmission-*.tar.bz2
cd transmission-*
./configure --prefix=/usr LIBEVENT_CFLAGS=-I/usr/include LIBEVENT_LIBS="-L/usr/lib -levent"
make -s && make -s install

Add a user account for running the Transmission daemon application. You will be prompted to create a password. You will use that password to login and obtain the files that have been downloaded. Try to remember the password or write it down.

useradd -m transmission && passwd transmission

Create init script for starting the daemon. Adapted from Jason Friedland’s implementation.

wget --no-check-certificate -q -O /etc/init.d/transmissiond https://gist.github.com/moltar/5187393/raw/
chmod 755 /etc/init.d/transmissiond

Set the Transmission daemon to start automatically when the server is restarted:

chkconfig --add transmissiond
chkconfig --level 345 transmissiond on

Start and stop the Transmission daemon. You must do this before proceeding to the next step. This ensures that everything up to now has been installed properly. Most important, this creates a default configuration file that we will be editing later on. You should see two green [OK] outputs after the completion.

service transmissiond start && service transmissiond stop

Now we need to modify the Transmission configuration file. Replace the bold/underlined portion of the last two commands with your own username and password combination. You’ll use this to login to Transmission application.

cd /home/transmission/.config/transmission/
sed -i 's/^.*rpc-whitelist-enabled.*/"rpc-whitelist-enabled": false,/' settings.json
sed -i 's/^.*rpc-authentication-required.*/"rpc-authentication-required": true,/' settings.json
sed -i 's/^.*rpc-username.*/"rpc-username": "username",/' settings.json
sed -i 's/^.*rpc-password.*/"rpc-password": "password",/' settings.json

Create a directory for storing downloads:

mkdir -p /home/transmission/Downloads/
chown -R transmission.transmission /home/transmission/Downloads/
chmod g+w /home/transmission/Downloads/

Finally start the Transmission daemon for good:

service transmissiond start

Installing ConfigServer Security & Firewall application

We are also going to install a ConfigServer Security & Firewall application. This application will help your server to stay secure and also ensure that the necessary ports are open for Transmission to function properly. This is an important step, please do not skip it. Hosting providers have different configurations of the default CentOS install and may block certain ports. This installation will ensure that the necessary ports are open and unnecessary ones remain closed.

cd /usr/local/src
wget -q http://www.configserver.com/free/csf.tgz
tar zxf csf.tgz
rm -f csf.tgz
cd csf
./install.generic.sh

Now that we have CSF installed, we’ll issue a few commands to “doctor” the configuration file and open/close some ports.

cd /etc/csf
sed -i 's/^TESTING =.*/TESTING = "0"/' csf.conf
sed -i 's/^TCP_IN =.*/TCP_IN = "21,22,9091,51413,30000:35000"/' csf.conf
sed -i 's/^TCP_OUT =.*/TCP_OUT = "1:65535"/' csf.conf
sed -i 's/^UDP_IN =.*/UDP_IN = "20,21,51413"/' csf.conf
sed -i 's/^UDP_OUT =.*/UDP_OUT = "1:65535"/' csf.conf
service csf restart

Testing your installation

By now you should have the Transmission daemon running. Let’s go play! :)

Testing Transmission

Open the following URL in a new browser tab/window:

http://[YOUR_SERVER_IP]:9091/transmission/web/

You will be prompted to enter a username and password. Use the same username and password you have created during the Transmission installation (the second one). Once logged in, you should see a Transmission web interface. Click “Open” and copy-paste the following URL to test the download functionality and speed:

http://ftp.osuosl.org/pub/centos/6/isos/x86_64/CentOS-6.2-x86_64-LiveDVD.torrent

You should now see the download status bar increasing.

Testing SFTP Connection

Download, install and open FileZilla. Go to File -> Site Manager. Click “New Site“. Give it a good name. Under “Host” field put the server name (if you have one), or simply the IP of the server. Choose SFTP under “Server Type“. “Logon Type” set to “Normal”. Set the user to “transmission” and the password you have created during Transmission installation (the first one). Now click “Connect“, you should see FileZilla establishing the connection and then finally listing remote directories in the right hand side part of the window. You should see “Downloads” directory, this is where all of the download files will be stored.

Setting up Transmission Remote GUI

This is my favourite part about this whole setup. Not only you get a nice and fast web based client, but you can also set this up to be used with the desktop application! If you are migrating from µTorrent, then you’ll love this!

Head over to the Transmission Remote GUI project page and download a copy of the client. Install the software.

Once you have it open:

  • Go to menu Torrents and select “Connect to daemon“.
  • Enter the server IP into the “Remote host” field. Make sure not to put the whole URL (http://….), just put the IP part (e.g. “123.45.67.89″).
  • Enter 9091 into the “Port” field.
  • Enter your username and password you have set during the Transmission installation (the second one).
  • Click “OK”.

Your desktop software should now be “talking” to your server. Note that this software only shows the status of the downloads, but you can’t actually access files through that UI. You still need to use the FTP client to download the completed torrents.

 

All credits go to Seeboxr from DIYseedbox.com


This is a staging enviroment