Building a home server

Here we look at building a cheap, quiet and compact home media server.So what is a “home-media server”? Different things to different folks, but the box I’m going to build is actually to replace an existing unit which works fine but is too large and much too noisy.

What is a home server?

Like many homes these days we have various PCs and client devices scattered around the house, all networked back to a central point and, if required, via that central point to each other. What sits at the centre? Internet access, a fat hard disk for backup of workstations’ data and a couple of server-related functions. The server-side of things has several requirements:

  • allow users to back up to a central location
  • allow users to access shared media (e.g. photos)
  • allow a media client (e.g. Pinnacle ShowCenter 1000) to access shared media (e.g. photos, audio and video files)
  • act as a Bit Torrent client (to allow the BitTorrent functionality to sit on a server rather than on workstations)

Finally, the device also acts as a firewall. While most ADSL modem-cum-routers can themselves provide this functionality these days (and my LiveBox is no exception) the main reason for doing this is to allow QoS (Quality of Service) to be applied to BitTorrent streams so that interactive use of the Internet (e.g. web-browsing) is unaffected (by making sure BitTorrent traffic is of lower priority than other traffic).

My starting point

Today I have an old PC sitting there doing all of this. It was cheap (almost free, in so far as it was built from old components lying around the place) and works OKish. Apart from recent unexplained ‘glitches’ (total system hang – no errors logged) which smell of hardware issues looming, it works well. But it’s large and noisy. Sure, I could buy a slightly smaller case, change/reduce fans and so forth. But that’s no fun. Let’s replace the whole thing with something really small and neat. Hence this project.

I’ll split the project in to two parts: building the hardware and then installing and configuring the software.

Hardware requirements

What are my key requirements for the hardware?

  • Compact (something not too much bigger than, say, a typical DVD player – and preferably somewhat smaller)
  • Quiet
  • Headless (i.e. no screen or keyboard attached, although they must be possible for setting up and diagnostics)
  • Adequate performance for firewall and media-serving functions.

Software requirements

What are my key requirements for the software?

Software choices

Since I already have a box doing just this, let me summarise the software environment which will be more or less replicated on the new device:

  • Ubuntu 7.10 – server edition (A wonderful Linux distribution)
  • Firewall: Ubuntu, like almost any Linux distro, come with iptables. However using this “raw” is hard work! So we will make use of Shorewall and Webmin to layer on top of it to make life easy and friendly.
  • Media server: the very wonderful MTPCenter 2.0 is used.
  • BitTorrent: using torrentflux-b4rt means that users can acccess the BitTorrent system from any PC via a web-browser. It works very well.
  • Remotely manageable: internally (i.e. within the house) we make use of Webmin. And for external ssh access we’ll set up a port-knocking daemon to make sure we’re really secure (yeah, I know the arguments against it – I work in security…).
  • Filesharing: built-in to Ubuntu, and we’ll allow Webmin to administer it.
  • Both the media server and the torrrentflux software require a “LAMP” environment (Linux – ApacheMySQLPHP) Despite the fact that the L, A and M bits can actually be provided by different packages, we’re going to go with the standard set. They are anyway installed by default with Ubuntu server edition.

Hardware – more detail

So now we move back to the hardware. Some slightly more detailed requirements:

  • Totally fanless would be ideal, but I’m prepared to compromise. I do want a fanless motherboard (i.e. no CPU fan) but will tolerate a single not-too-small fan venting the case itself.
  • Network. 10/100 Ethernet will do (rather than 10/100/1000) as much of the client-connectivity is anyway wireless (802.11g) But a key requirement, since we’re going to be acting as a router/firewall is that we have two network interfaces.
  • How much CPU does it need? Very hard to actually quantify this, but experience says “Not much” A box such as this is almost entirely I/O limited, by network and, to a lesser extent, disk. Almost all that the CPU will do here is shift data in and out, with little manipulation.
  • Memory. One could actually run all of this in very little memory indeed. 64MB would work, but frankly these days why fret? It’s so cheap let’s stuff 512MB in there. That way we also have a nice buffer against getting bogged down occasionally, as we can use the RAM for caching. If I’d already got a spare 256MB stick of DDR400 (see later) I’d have gone with that. It really isn’t too critical.
  • Disk. I’m actually going to go with a slightly smaller disk than others might. Since I already have NAS (network attached storage) available for bulk storage, I’ll find 80GB massively more than enough. But one could just as easily pop something bigger in there. It’s really down to personal need.
  • Optical disk. Not bothering – I have no need for one. But one important caveat: for the initial build we will need one, albeit temporarily.
  • Form-factor: given the requirements above, mini-ITX seems the way to go. Smaller than that and it all gets harder to spec, particularly given the dual Ethernet requirement.

Components selected

So finally we move on to the actual hardware ordered. The build list is:

The motherboard has heaps of features we won’t be making use of, but that’s always the way – these things come loaded with the kitchen sink. No matter. The case choice is very subjective. I liked the look of it. Disk: this model has better performance than many 2.5in disks.

All of this was ordered from mini-itx.com – they are good. UK-based, but seem to ship anywhere. Prices are OK, they have an excellent selection and when they say “In stock” they seem to be telling the truth – unlike some other suppliers I could mention. Also, technically they seem to know what they are talking about. I have no affiliation to them at all – I’m just happy to recommend them.

Building the hardware and installing the software will now cover the next steps! Read on…

3 comments to Building a home server