Setting up a Torrent Server
This is a guide for setting up a torrent server on the Raspberry Pi using Deluge.
Contents
Basic Installation
Note. When doing this installation I found it best to do it from the account you want the deluge-daemon to be run from.
Install the deluge daemon and web interface. At the time of writing this installs deluge 1.2.3:
sudo apt-get install deluged sudo apt-get install deluge-web
Follow the instructions at http://dev.deluge-torrent.org/wiki/UserGuide/InitScript/Ubuntu to setup the start scripts and torrent logging. You can run the deluge-daemon using a user already on the Raspberry Pi or create a new user. Don't forget to edit the /etc/default/deluge-daemon file to point to the user account you want to use.
Note: If you create the startup scripts on a Windows machine and then copy them onto the Raspberry PI you will have to run it through dos2unix to get the text file into a linux format. If you don't do this the script won't run (spent a good couple of hours puzzling over this one)
To install dos2unix:
sudo apt-get install dos2unix
Make sure that both scripts are owned by root and have the correct permissions:
sudo chown root:root /etc/default/deluge-daemon sudo chmod 644 /etc/default/deluge-daemon sudo chown root:root /etc/init.d/deluge-daemon sudo chmod 755 /etc/init.d/deluge-daemon
Thin Client Setup
Deluge can be setup so that you can control the deluge daemon from a number of different clients. This can be done either by a Web Interface or the GTK UI.
Note: Both the client and the server need to be similar versions, i.e. both 1.2.x or both 1.3.x.
GTK UI
Server Setup
Add a user and password to the authentication file (this does not have to be your server's user/pass)/
echo "username:password:level" >> ~/.config/deluge/auth
Web Interface
Open up a web browser and go to the following address (need to change the IP address to match your RPi)
192.168.1.4:8112 The password is deluge.
You can configure deluge via the web interface or by editing the config file in ~/.config/deluge. You will need to setup the file locations for completed torrents and also a directory to place torrents for the server to download.
To Do List
- IP Filters / Blocker
- Execute Plugin (Will allow you to run commands on certain events) - could be useful.
- RSS Reader