I'm writing this guide as a starting point for anyone considering building a low-power low-budget torrent slave their home network. This article is an instruction in what to look for in terms of hardware and then making it all work using Ubuntu Server and Deluge.
I am assuming you know at least something about computers and how to install operating systems. No Linux expertise is required, common sense is required, and being able to ask for help in a nice manner.
So, what's in the box? I wanted something that's low-power because most of the time it's sitting idle. When it is downloading, it's not using much power either. Sure you could buy an old cheap Athlon but they still use quite a bit of power (unless you under-volt/-clock it) and the performance wouldn't be so good at low clock speeds if you did want to do anything intensive. Another factor was having something that's new enough to support some of the modern technologies. Sure old Athlons have SATA support but other things like DDR1 RAM are hard to find and expensive now.
I decided to go with one of the new “Pineview” Intel Atoms. They're no longer a power hungry beast because of an old north-bridge that uses more power than the processor itself. There's no nVidia based Pineview Atoms yet because of licensing disputes so if you want it to double as a HTPC you're going to be using more power.
Since the Pineview Atoms are low-power it makes sense to use a passive heat-sink on them. This also reduces the noise a bit too because you don't have as many fans whirring.
The board I chose is the ASUS AT5NM10-I. It's a Pineview Dual-core Intel Atom (with Hyperthreading) with a passive heat-sink. It has 2 SATA ports which is enough for me. I don't know what the official maximum supported hard drive is on there, but two 1TB hard drives would be enough for most applications.
There's also gigabit LAN so there should be no problems with transfer speeds over the network for those large files.
Personally I'd recommend against putting a WLAN card in it because that's going to provide a huge bottleneck in streaming and transferring files. It's up to you if you decide to put a WLAN card in and shove the computer in a closet somewhere. Just be aware that performance will degrade.
The board is mini-ITX so you can put it into quite a small case and it won't take up much room. I bought a cheapy mini-ITX with a power supply in it. You could go with an ATX case if you had one spare, it doesn't matter too much unless space is a problem.
The hardware configuration for slave is:
- ASUS AT5NM10-I motherboard
- Mini-ITX case
- 2GB DDR2 RAM
- 320GB SATA HDD
Now the software, the most important part of this guide. None of this would work without it.
I chose Ubuntu Server 10.04 for the operating system. I'm familiar with Ubuntu having used it for the past three years. The current release (10.04) is a Long Term Support release so it has 5 years of security updates for the server edition. Ubuntu is also quite ubiquitous so there's plenty of help and packages out there for you if you ever get lost.
Because my torrent slave doesn't have a CD/DVD drive I had to install via USB. Fortunately Ubuntu provides good support for this and even has an official guide.
The installation is quite straight forward, follow the prompts, answer the questions. If you're unfamiliar with partitioning then I suggest you let the installer do it for you.
Installing the server edition leaves you without a GUI desktop so you've only got the terminal. Don't worry, you don't have to do too much with it once things are installed.
NB: swap partition:
I chose not to use a swap partition. I've never actually used any swap, even when using a machine with 1GB RAM. My current configuration for the torrent machine only hits about 700MB used memory so 2GB is more than enough.
So now you've installed Ubuntu, time to configure it.
To make things easier we'll install ssh server and set the IP to a static one so you'll always know where it is.
Having a static IP is handy if you have multiple services running on the one server. You'll always know where it is and can later set up an alias in your hosts file (http://en.wikipedia....wiki/Hosts_file). You could also later set up port forwarding to your torrent box so you can access the deluge web UI from the internet and manage your torrents remotely.
On the torrent box, start it up and log in.
First we'll set up a static IP
To configure your Ethernet device with a static IP address and custom configuration, some more information will be required. Suppose you want to assign the IP address 192.168.0.2 to the device eth1, with the typical netmask of 255.255.255.0. Your default gateway's IP address is 192.168.0.1. You would enter something like this into /etc/network/interfaces:iface eth1 inet static address 192.168.0.2 netmask 255.255.255.0 gateway 192.168.0.1In this case, you will need to specify your DNS servers manually in /etc/resolv.conf, which should look something like this:nameserver 192.168.0.1 nameserver 18.104.22.168
To edit /etc/network/interfaces type this command
sudo nano /etc/network/interfacesFor example, this is my /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.90 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1
and my /etc/resolv.conf is
nameserver 22.214.171.124 nameserver 192.168.1.1
Now restart your network by typing into the terminal
sudo service networking restart
It should say [OK]. You can double check that it worked by typing
and seeing if the IP you set is the same as inet addr on the device.
eth0 Link encap:Ethernet HWaddr ff:ff:ff:ff:ff:ff inet addr:192.168.1.90 Bcast:192.168.1.255 Mask:255.255.255.0Also check that you can access the internet by typing
Installing the SSH server is much easier. Type in this command
sudo apt-get update sudo apt-get install openssh-server -y
Now ssh is installed you no longer need a keyboard or monitor attatched to your torrent box. You can connect to through the network now.
On Windows you can use PuTTY to connect to your torrent box.
Before we go onto installing anything else we should make sure ubuntu has the latest packages installed.
sudo apt-get upgrade
So you can access your downloaded files we'll set up a samba share. This works best as you'll be able to access the files from Windows as well.
To install samba
sudo apt-get install samba -y
Once that is done we need to configure it.
I have my torrent box set up to have two folders shared
- Partial Downloads
Make these folders in the home of the user that you're using for torrents.
mkdir ~/partial mkdir ~/completed
Now edit /etc/samba/smb.conf so the shares are visible.
sudo nano /etc/samba/smb.conf
What we want to add are these lines under [global]
security = share usershare allow guests = yes
Then at the bottom of the file add these lines
[Completed] path = /home/<your username>/completed read only = no guest ok = yes force user = <your username> [Partial Download] path = /home/<your username>/partial read only = no guest ok = yes force user = <your username>
Change <your username> to what ever the user name is you've created the folders in. Don't forget that linux IS case sensitive. ToRRent is not the same as torrent.
Now anyone can create, delete and modify files in those directories. (I'm assuming you trust anyone accessing your share)
Server Side(The torrent box)
Now on to Deluge. I use Deluge because it has some good features I like. It has a client/server architecture which allows you to have the server on a seperate computer and connect the GUI client side to it over the network. It also has the plugins I need, a blocklist (ala PeerGuardian) and a web UI.
To get the latest version of Deluge for Ubuntu
sudo add-apt-repository ppa:deluge-team/ppaNB: If add-apt-repository does not work you can install it by running
sudo apt-get install python-software-properties
If everything goes okay you should get a message saying it has imported a key.
Once this is done, update apt-get so it knows Deluge is there and then install Deluge.
sudo apt-get update sudo apt-get deluged deluge-web deluge-console
This will download the daemon, the web client and the console client.
Now we'll set Deluge up to auto-run the daemon and the web-ui
Follow this guide from Deluge themselves http://dev.deluge-to...itScript/Ubuntu
(There's also guides for other distributions at http://dev.deluge-to...uide/InitScript)
Client Side(Your desktop)
On the client side of things you'll want to install Deluge which you can get from http://dev.deluge-to...g/wiki/Download or if you're on Linux, your package manager(for Ubuntu all you need is deluge, deluge-common and deluge-gtk)
To connect to your deluge server follow these 10 simple steps:
2.Go to "Preferences -> Interface" and untick "Enable" under "Classic Mode".
3.Restart deluge. You should now see a connection manager box pop up.
4.Remove the localhost daemon.
5.Click "Add" and enter your server's ip.
6.Leave the port as default.
7.Enter the username & password you added to the authentication file.
8.Click "Add" to add your server's daemon. You should now see a green tick as the status for the host you just added.
9.(Optional) Expand "Options" and select "Automatically connect to selected host on startup" and "Do not show this dialog on start-up".
10.Click "Connect" and the connection manager pop up box should disappear.
Congratulations! You can now access deluge on the server via the GTK UI.
You can know change any options on the server from the GUI.
To enable the blocklist and scheduler
2.Go to “Preferences -> Plugins” and tick the plugins you want
4.Go to “Preferences ->” <Plugin> and change the options
I find it's best to leave the blocklist URL as it already is as it works. If you want to use a different one you can.
The scheduler I have set so that it only downloads at night in my off-peak hours.
To get deluge to download to different directories
1. Run deluge
2. Go to "Preferences -> Downloads" and tick "Move completed torrents to:"
3. Change "Download to: to "/home/torrent/partial"
4. Change "Move completed torrents to:" to "/home/torrent/completed"
To access the web UI of deluge open your browser and go to
You will be prompted with a password. The default is “deluge” (without the quotation marks).
I suggest you change this immediately to something else.
To do this
1.Preferences - > Interface
2.Change the password in the text fields provided
Once you've done this check that the new password works by clicking Logout (top right) and then logging in with your new pasword.
As others have pointed out having your torrent slave automatically download torrents for you would truly make it a slave. The reason it wasn't in here originally was it didn't work for me the first time. The software couldn't download its required libraries, but now it can!
Thanks to gazpachoking on the deluge forums here is the RSS automation.
1. Log in to your torrent slave
2. Make sure the latest version of python is installed and the python utility "easy_install"
sudo apt-get install python python-setuptools3. We now want to download the FlexGet "egg". The default python version of ubuntu 10.04 is 2.6 so we'll download that egg.
The link is current as of writing (14th june 2010)
wget http://download.flexget.com/unstable/FlexGet-1.0r1283-py2.6.egg4. Once FlexGet is downloaded we need to install it which is done with
sudo easy_install /path/to/FlexGet-1.0r1283-py2.6.eggIf you haven't moved directory you should be able to do
sudo easy_install ./FlexGet-1.0r1283-py2.6.eggWhen it's installed check that it's working by running
flexget -Vwhich should produce output such as this
FlexGet 1.0r12835. Now it's installed we need to set up a config for FlexGet so it knows which shows we want it to download
make a directory in the home of the user that will be running FlexGet. If you follow my instructions it will be the user you're currently logged in as.
mkdir ~/.flexgetTo create the config:
The indentation for this is very precise. DO NOT use tabs, USE SPACES
The layout for a simple RSS of TV shows would go something like this
feeds: feed_name: rss: www.examplefeed.com/feed/ series: normal: - TV Show - Another Show 720p: - Example Show deluge: yesEach "indentation" is two spaces
feed_name can be changed to what ever you want. It can't have spaces in it, so use _ or -. eg tv-show, tv_shows
rss is the rss feed you want FlexGet to check
normal is the quality of video you want. This will select your usual 350MB/hour HDTV rips
720p will select 720p rips of the shows. FlexGet will only download Example Show episodes that are 720p, it won't fall back to a normal rip.
deluge means that it will automatically add the torrent to deluge for you, which makes it all nice and easy.
Same example with the number of spaces that precede the first character
feeds: 0 feed_name: 2 rss: www.examplefeed.com/feed/ 4 series: 4 normal: 6 - TV Show 8 - Another Show 8 720p: 6 - Example Show 8 deluge: yes 4
Check your config.yml by running
flexget --checkExpected output would be this for my config
2010-06-14 22:36 INFO deluge Using deluge 1.2 api Feed 'feed_name' passed
FlexGet will only check the feed when run, so we need to set up a cron job to automatically run the command for us.
To do this edit the crontab by running
It will make a new crontab for your user and run all the commands set up as your user.
cron can look confusing, so here's some help from wikipedia explaining it
.---------------- minute (0 - 59) | .------------- hour (0 - 23) | | .---------- day of month (1 - 31) | | | .------- month (1 - 12) OR jan,feb,mar,apr ... | | | | .----- day of week (0 - 7) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat | | | | | * * * * * command to be executedThere's also some shortcuts instead of defining a time
@yearly Run once a year @annually (same as @yearly) @monthly Run once a month @weekly Run once a week @daily Run once a day @midnight (same as @daily) @hourly Run once an hourso instead of the * * * * * format you would replace it with one of the above.
So choose a time you want to check the RSS feed. If it's a busy one you might want to use @hourly, but I wouldn't recommend going more often than that as the feed owner might ban you for checking too often.
An example of hourly would be
@hourly /usr/local/bin/flexget --cron
So go in and add a line at the end of the crontab to set when you want FlexGet to check for new torrents. Mine is set to check at 8pm (2000 hours) every day.
0 20 * * * /usr/local/bin/flexget --cron
Now your torrent box should really be a torrent slave
If you would like to do more, see the FlexGet Cookbook
So everything should have gone as planned. If it has you now have a low-powered machine that will download torrents for you in your off-peak hours and store them on the network for you.
You can easily add more functionality to your machine if you wished. Linux is limitless.
I've got Mediatomb installed which is a UPnP streamer. It's handy for when I want to watch something on my PS3 that I've downloaded and don't want to turn on my main computer to access the video. Sadly I haven't been able to get mkvs working properly. However I have found a script that will remux mkvs into a playable format. It can be found at http://mediatomb.equ...2ts/mkv2m2ts.sh
Overview of various Pineview motherboards in relation to Linux
Mediatomb UPnP media server
Webmin web management to make administration of your system easier
Questions, complaints, bugs, advice?
Edit: Added justification for static IP
Added web UI instructions. Thanks for pointing that out boogerjones
Added instructions for RSS download using FlexGet
Added how to set the download completed torrents and partial torrents
Added note for if add-apt-repository is not installed