How to build a Linux media server

If you’ve ever fancied the idea of building a server to store your ever-growing collection of media files, be they movies, photos or music, but have been put off doing so because it seems far too complicated to build one yourself, or you’ve simply no idea how to go about doing it, then read on. I’ve put together a step-by-step guide showing you how to build and configure a media server that is far more powerful and far more flexible than any of the “pre-built” systems on the market today. Not only that but it’s cheaper too!

What’s the point of a central media server?

I’ve had a few people ask me this so before we go too far let me explain the setup I have in my house. Hopefully then you’ll see why you might want one too.

I have a TV and Media Streamer in most rooms in my house. In each of these rooms I have the ability to watch any Freeview channel. I can also pause, rewind and record any Freeview channel as well as watch anything I’ve previously recorded. I can watch a single Sky channel or any of the videos, DVDs or Blu-ray disks I own. I can also listen to music, either owned music or internet radio, along with being able to browse the family photo album. Not only that but each room can do all of this independently of any other room.  Sound exciting? Well, there’s more! If I’m watching something, say, in the sitting room and decide to go to bed I can continue watching it in the bedroom, at the exact same point I left it in the sitting room!

Whilst you can achieve the same without going for a central server you’d need a PVR, a DVD player, Blu-ray player, VCR and radio in each room. Furthermore you’d have to record the same TV programme on every PVR to allow you to watch a particular recorded programme in any room.

Now, going that route is not only very impractical but it can also get rather expensive too since each room would have to have all that equipment in it. You’d also need multiple copies of every DVD, Blu-ray, video and music CD you own along with duplicates of the family album to have the same level of flexibility as I have with my setup. Not only that but you’d struggle to be able to pause, say, a blu-ray in one room and continue watching it in another at the exact same point.

Instead of duplicating your media collection you could of course keep the physical disks in one room, on the understanding that anyone in the house can “borrow” one when needed. But in my house the disks would never get put back when they’d finished with them and so you’d be forever on a treasure hunt trying to find your favourite disk.

So, what must this media server be able to do?

Once you’ve concluded that you need, or at least want, a media server you have two basic choices: 1) build your own or 2) buy a pre-built device.

Over the past few years I’ve owned quite a few of the pre-built devices out there but none have been the perfect one for me. They’ve all started off just fine but I’ve simply outgrown them. Hence my decision to build my own one.

So, having decided to build my own media server what exactly were my requirements for it? Well, in no particular order they were:

  • It must be quiet.
  • It must use relatively little power when it’s not streaming media. This device will be running 24/7 and so running costs cannot be ignored. My view on power consumption is that when this server is running full steam it can dim the lights in the whole street for all I care but when it’s idle I want it to throttle down and use less than a light bulb.
  • If must not generate a lot of heat. This server is going to live in a, relatively, air-tight cupboard and I don’t want to install extra cooling in the cupboard. Doing so would use power and add noise. Oh, the cupboard by the way is in the main bedroom of the house, hence my desire for it to be quiet.
  • It must be flexible enough to do pretty much what I want with it. I don’t want to hit the same brick walls I’ve hit with all the other pre-built “servers” I’ve bought in the past.
  • I want to be able to record TV programmes with it. I then want to be able to stream these programmes around the house. I have a few media streamers and a PS3 too so it must be able to support these.
  • In the rooms without a TV I’m using Squeezeboxes so this server must be able to support them too.
  • It must be able to run torrent downloads. I want this server to automatically download my favourite TV shows and make these shows available to all my Media Streamers and PS3. Previously I had to dump TV shows from my Sky+ box onto DVD and then rip the DVDs onto my NAS before I could stream them around the house.
  • It must be powerful enough to support multiple, simultaneous, High-Definition video streams. Not only that, but it must be able to do this whilst doing other things too, such as backing up my desktop computers or re-encoding video files.
  • It must be headless. BUT I don’t want to learn hundreds of commands to be able to configure it so I need a GUI interface too. Hmm, headless AND a GUI interface?
  • It must be stable. I don’t want to be tinkering with it every 5 minutes. Nor do I want to be rebooting it every couple of days.
  • I don’t want to have to buy an operating system for it. Nor do I want to be worried about the latest and greatest virus infecting it. This means going for a Linux-based Operating System such as Ubuntu or ClarkConnect or similar.
  • Since this server will live in a cupboard and be running 24/7 I want it to be able to monitor its own temperatures and to shutdown automatically if things get a bit too “toasty”. I want it to send me an email if it’s going to shutdown so I know it’s not happy and is in need of my attention.
  • As mentioned above, it must be able to throttle down when idle. By this I mean the drives must spin down when they’re not being used. This will save power and ease cooling.
  • It mustn’t cost the earth to buy.
  • If I ever get bored with it, or change my mind about this whole central media server idea, then I want to be able to put it to good use elsewhere. e.g. use it as a desktop computer.

Now, whilst there are a few pre-built devices out there that can do one or more of the above, NONE of them can do all of the above so I had little choice but to build my own.

Wait, you need to be a guru to be able to run a Linux media server, don’t you?

Erm, no you don’t.

If you’d have asked me 10 years ago what operating system I would recommend using for a media server then I doubt very much I would have said Linux. However, many Linux “flavours” have moved on in leaps and bounds over the last few years and today I would whole heartedly recommend using Linux if you’re thinking of building your own media server, even if you’ve never used Linux before.

It is true that some “flavours” of Linux still retain their guru status but if you take Ubuntu as an example, you can now buy “home computers” from major retailers that are running Ubuntu. This was totally unheard of a few years ago!

So, how do I build this Ubuntu media server then?

Talking about what this media server must be able to do is one thing but you want to know how to actually build it, right? Of course you do. So then, without further ado, here are my 5 steps to happiness:

  1. Choose the components
  2. Assemble the components
  3. Install Ubuntu
  4. Configure the server
  5. Install software applications

If you’re unsure what front-end to use to view all you movies then be sure to check out Kodi