12 Apr 2012

New server

I’ve always disliked the idea of having a server in my own home. Real server hardware is big, loud, hot and expensive. The alternative is to use consumer (desktop) hardware, which usually isn’t very redundant. Hardware has a tendency to break at the worst possible time, like when you have a big deadline at work, of when you’re taking your university finals. If my website goes down, I don’t lose money, but I still want it up all the time. I had a friend who had an email server in his house. His server broke during his university finals and he calmly said “I don’t have time to fix it right now, so I guess I just won’t get email for 4-5 days.” This is precisely why I haven’t wanted a server in my house. Once you start relying on it, it becomes really painful when you have issues.

I’ve had my own website for years, and I’ve always paid for it to be hosted. It’s not that expensive, and then your hosting company worries about keeping your site up. If my webhost has a hardware failure at 3AM, they’re responsible to fix the issue, and if necessary restore a backup.

Those of you who follow my blog know I’m a big Linux user. Pretty much all computers in my house use the Linux kernel. My desktop, laptop, mobile phone, media streamer and even router (though each one of them is a different distribution with a different version of the Linux kernel) use Linux.

Because of this, I’ve always been able to take advantage of enterprise level open source software, such as NFS. NFS is an extremely hardened Network FileSystem. Since all of my machines are Linux, within a matter of 15 mins, I was able to stream music and video from my desktop to my TV. The only downside to this is that I need to leave my desktop on for this to work. While this is obvious, I don’t really like it. My desktop is a reasonably fast (though 3 year old) quad core Intel i7 920. It sucks quite a bit of power. That got me to thinking. Why don’t I build or buy a very small, efficient low power server that I could leave on 24⁄7 (that of course runs Linux) to use for file storage. I could use it store to all my music/video, and automatically back up by desktop to it. I could even host my website on it if I wanted. I started looking for one, and came across the HP ProLiant N40L (disclosure, I’m an HP employee). It seemed like exactly what I was looking for. It’s small, very energy efficient, quiet, has gigabit Ethernet and can hold 4-5 internal 3.5″ hard drives (and even has 6 USB ports and an eSATA port). This sounded perfect, and the price is brilliant. You can buy one for around $200 (I bought mine for even less during a heavily discounted sale). Of course the price doesn’t include an Operating System (so windows users beware), but for me this is perfect. This way I don’t get charged for an OS that I wouldn’t use, and can instead just download Linux for free!

One of the reasons I like it so much is that is uses an AMD dual core 1.5GHz 64-bit CPU. It’s far better than Intel’s equivalent low power Atom CPU (which isn’t even 64-bit)

It comes with 2GB of RAM, but upgrading it is pretty easy. You just have to pull out all the cables, and slide out the motherboard. Since RAM is so cheap these days I got 8GB of ECC RAM for around $50. So, for a little over $200 you can have a pretty decent server. The hardware on this thing is pretty impressive. Another thing I like about it is the internal USB port. That means you can install your operating system on a flash drive, and use all the hard drives for data. I bought two flash drives, and can quickly switch out operating systems. That way I can switch between Debian 6 and CentOS 6 with just a reboot.

You can of course install windows on it, or pretty much anything else that supports x86_64.

Of course, this setup takes some time. You can alternatively buy a ready out-of-the-box NAS. A device that is already set up for file storage and media streaming. The downside is that they’re usually severely limited. Companies will often deliberately limit features in the hopes that you buy a more expensive version. They’re also limited to being just a NAS, have week hardware, and aren’t upgradeble. With this machine, providing you’re willing to do the work, you get a highly flexible machine that can do almost anything. If a new app comes out that has new functionality, you can just install it. Same goes for the Operating System. When Debian 7 comes out, I can just install it and get all of those improvements for free. I like that kind of flexibility!