Skip to content

How to make a Home Theater PC/ Storage Server as easy to use as a toaster

July 21, 2010

Update (5/11/2011): I have replaced the build below with an improved model, though it is larger. Read about it here!

My goal behind building my HTPC/NAS device was to have a storage/TV solution that:
a) Didn’t need me to babysit it to get it to work and
b) Was easy enough to interface with that it would pass the WAF (wife acceptance factor)
Given those two points, the server needs to function more like an appliance and less like a project. Once complete it should do what it was built to do and not require me logging in every day to check on it.

I wanted a device that would be able to do the following regardless of whether or not I was around:

  • Hold all of our media
  • Collect media on it’s own
  • Play it in 1080p over HDMI to our TV
  • Be able to send the media to our cell phones
  • Act as additional hard drive space for our laptops
  • Hold all of our backed up data
  • Enough redundancy to suffer a failed hard drive without any losses

Because these requirements are slightly more processor intensive, I would need a system a little more powerful than a nettop. I did consider going with an Atom/Ion system for quite a while at first because of the lower power requirements but stumbled upon an article at Tom’s Hardware that solidified my decision against the Atom platform. The article showed that because the Atom processor takes longer to complete it’s tasks than a traditional processor, it actually burns more power than a traditional dual core processor.
The Hardware
Mobo: Intel GD45FC – Micro/Mini form factor and has a X4500HD graphics processor and HDMI out
Processor: Pentium E6300 2.8ghz Dual Core – at 65w it packs a punch but won’t kill my power bill
RAM: 4gb OCZ DDR2 800mhz RAM
OS Drive: Seagate 120gb  7200 RPM 2.5” laptop hard drive
Main Drives: 4x Western Digital Green 1TB Drives
SATA Card: SYBA SY-PEX40008 PCI Express SATA II Controller Card
Case: Rosewill RS-MI-01 BK Mini ITX w/250 watt power supply

Putting all that together was quite a tight fit. The case was so small it took a little “creative building” to get it all in. I might swap the case out for one of the Chenbro NAS cases if I ever have $200 sitting around burning a hole in my pocket but this does the trick for now! I went with a smaller, faster hard drive to house my OS and then put the four green drives into a RAID5 configuration. Since my primary concern is being able to read quickly, I’m happy to sacrifice some of my write speed for the redundancy and the read speed.

OS
So I tried two options here. First I started with Windows Home Server. This had some great advantages. The installation was easy, my XBOX 360 and Windows 7 laptops saw it effortlessly and the fact that it had a GUI interface on the actual server I could use to work on it. The downsides however were that automating tasks was a much more laborious process, it ran a lot hotter, and I had to use their proprietary drive configuration that wouldn’t let me remove my boot drive from the storage pool. Those down sides were too much for me so I went with Ubuntu Server 10.04. There is so much documentation and help available these days that unless the thought of using a terminal is way too scary for you, this is by far the best way to go. The abilities this give the server are much more advanced too.

Installation and Software

*NOTE: For detailed, step by step instructions including the commands used, click here instead.

OS: Installing Ubuntu Server was pretty straight forward. I loaded the OS  on to my thumb drive and set it to boot using unetbootin. Once I booted the server into the install program I selected the basic Ubuntu Server, SSH, and the LAMP server package. I partitioned my smaller 120 gb drive so that root, usr, tmp, and var had their own partitions along with my swap partition. I set all four of the WD Green drives as Linux raid drivers and then went into the RAID setup to configure them as an EXT4 RAID5 array. I mounted the array as my /home directory since that’s where all the media is going to be stored. Also, this is the data I really need to be redundant if one of the drives fails. Once the formatting and installing finished the server greeted me with the terminal login screen. The server was ready for action!

The Basics:

Webmin: In order to manage the server easier, I prefer to use a mix of  SSH and Webmin. Webmin gives you a graphical web interface that makes some of the basic managing easier. I’m really impressed with how much you can do from Webmin, including browsing, moving, and managing files, managing settings, monitoring the status of the server, and even fixing things when they go wrong (I had a hard drive die and could tell the RAID to rebuild itself through the Webmin tools).
Samba: By sharing the huge RAID array with Samba, I can map all of the server’s storage drives to our Windows 7 laptops. This way anywhere in the house we can access the data on the sever as if it was stored locally. The computers can also back up and restore files from the server which already came in handy once when I hosed my laptop.

The Media Acquisition Piece:
One of the key pieces of this media server is that it has to be about as easy to use as a toaster. I want it to automatically acquire all of our new TV shows and download/sort movies with one-click selection. I chose two methods for getting media but either one of these could be implemented to handle this.

For TV shows I use Torrentflux-b4rt to download an RSS feed set up at showrss. To do this, you use a little gem called “fluxd”, a daemon that runs in the background running specific tasks. The two important tasks fluxd is running for me are 1) Download any new torrents from my RSS feed to a folder and 2) Check that folder every 10 minutes for new torrent files and automatically start downloading them when they appear there. The real magic comes in with the sortTV perl script. Using cron (the task scheduling function in Linux) I have this script run once a day and it looks at the TV show names and then files them into their appropriate folders using the /TV/Show Name/Season Number/ filing system. I can’t tell you how excited I am about this, especially since it works flawlessly (so far at least).

For movies I went a different route. Movies are a different beast because you don’t want all of one type of movie, like action or drama. You want the movie you want and you want a GOOD copy, not a CAM. For this reason I pay ($9.99 a month) for access to a newsgroup service, easynews. I like this service in particular because for the price I get 20 gigs a month that I can download as fast as my internet connection can handle. Now easynews alone will give you access to way more content than you’d ever want to deal with so you need a way to filter the content to get just what you’re looking for. For this we have NZB sites like nzbs.org. These catalog all the media on news group servers into categories like “movies” or “tv” and even further into the quality. Once you get a free account on one of these sites you can just browse all the latest movie postings until you find the ones you want, put a check mark by them and add them to your “cart”. This dumps them into your rss feed, ready to be downloaded.

So how to get those files from the RSS feed, to your sever, unzipped, and put into the correct folder? Sabnzb, that’s how! Sabnzb does for the nzb files what torrentflux-b4rt and fluxd do for the TV show torrents. Sabnzb watches the RSS feed, downloads all the new movies, tv shows, music, or whatever else you put in your cart, unzips/unrars them, deletes the compressed files, and moves them to folder based on media type (movies go to /Movies, tv goes to /TV etc). It can get really advanced with it’s TV show or movie sorting but since I just use it for movies I don’t have any of that set up.

With these two services, I can now go to either showrss or nzbs, click on a new TV show or movie that I want to watch, and a little while later it’s downloaded and sorted. No further action is required by me. I love how seamless this works!

Media Consumption: The fun part!
Now that all of this media is just amassing on the sever, I need it to get to my TV, laptops, and cell phone for me to enjoy it. Otherwise this would all have been a waste, wouldn’t it? I used a couple different programs to do this since each of them has one thing that it does really strong but is weak in other areas.

Watching Media on the Xbox 360: Twonky Media Server
The Xbox 360 has a great value added feature of being able to act as a network media player. I originally bought it primarily for this reason but eventually discovered that while it will play media off the network, it’s really damn picky about the media it plays. Twonky is a DLNA server that does a really good job of finding the media the 360 can play and sending it over.

Watching Media right off the server: XBMC
This is a really, really sweet piece of software if you’ve ever used it. With the server constantly acquiring media and sorting it, XBMC takes it a step further and automatically pulls down the IMDB info, the posters for the movie or show, and the trailers as well. With a gorgeous 1080p interface optimized for the TV, this is really the best way to go. Right now I just have this running off a monitor but because the mother board has a HDMI output, I plan on moving this into my living room once I work out some pesky wiring issues. As a bonus there are aps for Android OS, iOS, and WebOS to use cell phones as remote controls. This is perfect for parties where any one of the guests can see and change the video or music playing if you grant them access.

Media off the cell phone: Ampache
Even with modern cell phones now coming with gigs of storage in the double digits, none of them can even get close to the terrabytes of media stored at home. Although I keep my most frequently listened to songs directly on my phone, what am I supposed to do if I decide I need to listen to the entire Rolling Stones discography while I’m traveling for work? Android OS, iOS, and WebOS all have applications that can log into the Ampache server (which just runs off the Apache web server) and seemlessly stream any song you have. With great search features, finding one song out of 10,000 isn’t hard either. Ampache will now handle video streaming too, but unless you have a massive upstream connection at home, expect a long frustrating wait before the movie trickles onto your phone.

The End Results
I love to tinker with gadgets and don’t mind troubleshooting the occasional issue or two. A system that has to constantly be prodded into producing what you built it to do is not a finished product, it is an eternal project. Although my installation wasn’t without the occasional snag, the system now works so flawlessly, it’s almost… boring. When we decide we want to watch something new, it takes a couple clicks in a web browser before the content is on it’s way. Everything gets sorted and cataloged correctly without any manual moving etc. The only point any maintenance is required at all is once the drives start to get full, and then we’ll just open up the shared folders and delete old TV shows (for daily TV shows I even have a cron job set up to delete them once they reach over 15 days in age so it’s actually only an issue for multi-season shows). Mission accomplished!

Stay tuned though. This home media project will be the first of many!

26 Comments leave one →
  1. July 22, 2010 8:57 am

    That was excellent. Now I need to graduate college so I can actually buy another computer. I feel like prices for hardware suitable for this project are at an all time low right now, but still.

    • July 22, 2010 10:02 am

      Thanks man. Total cost for something like this really depends on how crazy you get with the storage. You could get in at $300 for a nettop version or all the way up to $700+ if I slapped a fancier case on it with hot swappable drives. $300 is almost college affordable! :-)

  2. July 22, 2010 9:51 am

    Pretty nice, may need to load Ampache onto my HTPC.

    • July 22, 2010 10:06 am

      Ohh man, ampache is a slick program. I can’t believe how smooth it works with only a cell phone signal. I mean I’ve got tens of thousands of songs and all I have to do is start typing and it will find what I’m looking for! Once again, it passes with WAF too because Carrie can use it just as easily. We can share playlists etc. too. It’s great for trips!

  3. July 27, 2010 3:10 pm

    I’m going to link this to my blog.

    • July 28, 2010 10:26 am

      Thanks for the link! Just trying to help people with similar ambitions.

  4. marco permalink
    July 30, 2010 3:26 pm

    Great post – very informative.

    Thanks for the great work and for sharing

  5. fg1 permalink
    August 3, 2010 8:53 pm

    Doing this as well… I was going to go with freeNAS instead of ubuntu server, but you may have persuaded me. Did you consider freeNAS

    • August 4, 2010 6:19 am

      I actually did consider freenas but then after some research backed away for a few reasons. First, freenas is designed primarily to be a very small, low powered OS to duplicate the features found on BYO disk NAS offerings from Synology or QNAP. Because of this it doesn’t have a lot of the capabilities found in Ubuntu. Freenas doesn’t support the newer EXT4 file system either. I think the final nail in the coffin for me and freenas is when I read a posting in the forums at smallnetbuilder.com mentioning that the RAID read/write speeds were a lot lower than what people were getting with Ubuntu Server. So much for it being a great NAS OS!

      I think people using Freenas are primarily concerned about the size of the OS and less concerned about the features. It’s only like 64 megs! Lets face it though, disk space is cheap and a minimal Ubuntu Server install isn’t that big. With all the programs I have installed I think I’m only using like 7 gigs on my 120 gig hard drive (11 gigs if you count the generous 4 gigs of swap space I have assigned). The user base for Ubuntu is a lot bigger too so there is a lot more support, a lot more coding going on, and the sky is really the limit when it comes to adding additional functionality! Adding a program to freenas looks like it requires a lot of tinkering too while adding a program in Ubuntu is as difficult as typing “sudo apt-get install [program name]“.

      Just a few points I considered when trying to choose me OS!

      • fg1 permalink
        August 4, 2010 2:42 pm

        Hmm, okay, because I’m trying to decide between the two right now. I’ve already bought all the parts and everything, but I didn’t buy a OS hard drive for my file server. I was just going to run off my 1GB flash drive if I decided to use freeNAS.

        But after reading you’re post, I think I want to go ahead and use Ubuntu server for my install. I can’t find much about installing it onto a USB (and the biggest one I have is about 8GB, which would be cutting it close) so I may have to invest in a cheaper boot drive.

        I also wanted to say thanks in advance, I am going to be following your documentation exactly, and if everything works out, you would have made my life so much easier.

  6. August 4, 2010 3:01 pm

    FG1: Thanks for the Kudos, I’m glad you found this helpful!

    I think that given the relatively low cost of memory these days you won’t regret going with Ubuntu and a slightly larger boot drive. You could probably even drop like $50 on a 16 GB SSD and use that as the boot device while using the raid for the main storage. I think the little laptop hard drive that I put in ran about $50 so that’s why I ended up with such a large boot drive ; I just couldn’t find anything smaller without going the SSD route (which was way more expensive at the time).

    With the small investment of a little more boot drive space I think you’ll be happy at how expandable the little server becomes. What once would have been a basic NAS with a torrent program can pretty much do anything you can come up with!

    Let me know if any other questions come up!

  7. g00nda permalink
    August 9, 2010 1:53 pm

    Good write up. Could you please breakdown your setup with costs?
    Thanks!

    • August 9, 2010 2:07 pm

      The setup cost around $650 when all was said and done (drives, case, etc) but because of the nature of technology these prices change every day. I actually bought most of the components last year but didn’t write this article until I had the software exactly where I wanted it. The links above will take you to each of the pieces I used in the setup but even a year later some of them have already been replaced by newer models. For example the Western Digital EADS model that I used has been replaced by the newer EARS model.

  8. Pieter permalink
    August 17, 2010 5:04 pm

    Great write-up. I am running this as a Virtualbox to test, and it seems to work great, except for fluxd and RSSad. I have defined an RSS at ShowRSS and added it to fluxd as a job, with the savedir the standard incoming directory and the URL of course the ShowRSS link.

    The Watch job is running, but fluxd seems to do nothing, and it does not show in the log that it is doing anything, although the directory watchdog seems to be checking the folders for incoming torrents. The filter I have as * by itself.

    Any ideas where to start to track this problem down?

    • August 17, 2010 7:51 pm

      Thanks man! I posted a reply to your question on the Advanced Setup page! Let me know if that doesn’t fix it. Also anyone can email me at: dave(at)somethingtangential.com if they have any advanced questions.

  9. August 20, 2010 9:26 am

    I took a slightly different route. RAther than have the storage in the player I built a NAS for the storage and kept the meida pc as thin as possible.

    Your box looks great though and thanks for the bits on downloading – very useful :)

  10. Matthew permalink
    May 10, 2011 7:36 am

    Great article, thanks for taking the time to share it!

    • May 10, 2011 9:09 am

      Glad it was helpful! It has progressed a little since I posted this article. Hopefully I’ll have the new version up soon.

  11. July 12, 2012 9:28 am

    Amazing amazing piece of information for someone like me who is just gathering information on how to build and automate a HTPC cum Home Media Server. This article is almost 1 year old now. Could you please recommend some hardware/software I could use in present day considering the price and speed have gone down and up respectively by leaps and bounds. I don’t want to spend heavily as I am also planning to build a Gaming rig after this. Need guidance.

  12. abhiespeaks permalink
    July 12, 2012 9:30 am

    Amazing amazing piece of information for someone like me who is just gathering information on how to build and automate a HTPC cum Home Media Server. This article is almost 1 year old now. Could you please recommend some hardware/software I could use in present day considering the price and speed have gone down and up respectively by leaps and bounds. I don\’t want to spend heavily as I am also planning to build a Gaming rig after this. Need guidance.

    • July 12, 2012 10:05 am

      You’re right, the two things that have significantly changed since I wrote this are power and cost of the hardware. For the most part, my software setup is still very similar to what I detailed in this article other than some updates. I’m still using the hardware I detailed in my article “New Server New Software” with the only exception being that I swapped out the processor for a six core AMD to play with VM software and I added a cheap video card that could handle high def 3D video in case I get a 3D TV. Other than that, it’s still working perfectly!

      If I had to re-build the system today, I would probably use almost the exact same hardware I did in the “New Server, New Software” post but using one of the new Intel i5 processors as it’s more powerful and energy efficient. Depending on whether or not you needed 3D video rendering you could either use a motherboard with dedicated video processing or go with a dedicated video card. I highly recommend the XBMC.org or AVSForums hardware forums for their up to date hardware guides. Whenever I start thinking about replacing or updating a product that’s the first place I look. Honestly with everything still working perfectly, I haven’t had to do much upgrading though!

      Hope this helps!

  13. Sean permalink
    January 1, 2013 11:09 am

    I have a few questions to pick your brain with. I currently have a Freenas 8 machine (finally with plugins to serve dlna) It’s been a big hassle and a disappointment. For one thing, I cant assign file permissions to a list of users without a separate active directory server. Anyways Im about to convert the box into a ubuntu fileserver and also installxbmc on it.
    But I I have questioans. Should I start with a ubuntu lightweight desktop(which one) and add the fileserver service and xbmc. Or start with a ubuntu server and add a lightweight desktop?
    I really want some sort of gui to manage the server aspect. I have a hard time with command line. Even the gui used to program my vcr (remember those?)

    • January 1, 2013 5:50 pm

      If you want a full GUI, any of the Ubuntu distributions will give you the option to install “Ubuntu Desktop” during the OS installation. You can install either Ubuntu Desktop edition or Ubuntu Server and still get all the server applications too. If I were you I would start with the Ubuntu Server version and just tell it to install the full GUI when it asks what packages you want to install (just check the box).

      Also, I wasn’t very good with command line usage either when I started this process and that’s why I installed Webmin. It works as a web based GUI that is really great at managing your server.

      Good luck!

Trackbacks

  1. Quick Booting Mini HTPC Build « something tangential
  2. New Server, New Software Layer! « something tangential

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: