This guide assumes you have already found a VPS provider and chosen and installed Debian or Ubuntu to your node.
Deluge BitTorrent Client
Deluge is a popular multi-platform bittorrent client often used to provide torrenting / seedbox functionality on Linux servers. Although it is not as popular as ruTorrent it still has a solid place in the seedbox community and provides some functionality not found (or properly implemented) elsewhere such as SOCKS5 proxy support.
If you are a complete beginner to Linux then Deluge makes a great starting point due as it’s extremely easy to install through the Debian repositories.
Installing Deluge to Ubuntu 12.04
This code will assume we are logged in as root. If you are not, then either add “sudo” appropriately to these commands, or input the following command to switch to the root account before continuing:
Install Deluge from repositories. This will install the Deluge application itself, the Deluge Daemon to let us run Deluge as a background process, and the Deluge html based Web Interface. Please note that the official Debian repositories are a version behind… BUT… I prefer this as the older version has proper support for SOCKS5 proxy which was broken in a later release of libtorrent.
apt-get update apt-get install deluge deluged deluge-web
Run Deluge via the Deluge-Daemon and start up the Web Interface using –fork argument to start a new background process.
deluged deluge-web --fork
We will additionally want to prep some folders for our downloads. In my guides I prefer to use /var/www which is the public website space of the server. This makes for simple setup later on for direct downloading and browsing of our files. Don’t forget that this is a public space however! Make sure to setup some security / authentication to your files to protect them.
cd /var/www mkdir files mkdir .temp mkdir watch chown -R www-data:www-data /var/www
Test and Configure Deluge Install
Deluge is now running and ready for us to login for the first time!
The install port will have defaulted to 8112 (ie: http://host.example.com:8112/). The Web UI requires a password to login which will have defaulted to “deluge” and will need to be changed on login.
Additionally when you login for the first time you will need to connect to your daemon process. This will hook the Web UI into the torrent server, and allows you to potentially run multiple copies of Deluge at one time.
After connecting. Change your password. Setup your directories. If you want to tinker with settings for bandwidth and connections then go ahead and do so now.
Add a torrent via the green “+” and either select the torrent from your computer or enter the url of the torrent off the network. If everything is setup correctly it should download and end up in our /var/www/files directory afterwards.
Run Deluge and Web UI On Startup
We are now up and running, the only issue is that if we reboot our server, the Deluge daemon and Web UI will have turned off and we must issue the startup commands again.
We can however create a startup script as per the Deluge user guide: http://dev.deluge-torrent.org/wiki/UserGuide/InitScript/Ubuntu.
Paste the following code into the file:
# Configuration for /etc/init.d/deluge-daemon # The init.d script will only run if this variable non-empty. DELUGED_USER="root" # Should we run at startup? RUN_AT_STARTUP="YES"
Next let’s create the startup script. Make sure to visit the link above and copy the entire script as I am not going to repeat it in this guide.
Paste script into file. After creating the file we turn the text file into a script and tell it to run on startup:
sudo chmod 755 /etc/init.d/deluge-daemon sudo update-rc.d deluge-daemon defaults sudo invoke-rc.d deluge-daemon start
Reboot your VPS. Deluge should start automatically and be accessible!