The Home Network Media Server / NAS / etc. Superthread
Dec 30, 2012 at 10:39 AM Thread Starter Post #1 of 26

Argyris

Head-Fi's third most long-winded poster.
Joined
Oct 18, 2010
Posts
4,241
Likes
619
Location
Chestertucky, MI
Note: this thread concerns media stored on a computer in a broader sense than just music, but I mainly use the concepts described herein for playing my music, so I figured this would be the proper place for this topic.
 
For the past few years I've been using one of my old computers to serve media on my home network. It's made my life so much easier. Soon after I set up my server, I discovered that there are ready-made devices called NAS--Network Attached Storage--that basically accomplish the same thing as what I did, only in a more set-it-and-forget-it manner.
 
Recently in another thread I mentioned my setup and there was some interest in the concept. I'm really surprised more Head-Fi'ers don't use some sort of home server or NAS, and I thought I would start a thread to evangelize for these setups, guide users how to get one up and running, and bring other Head-Fi'ers who have a setup like one of these into the conversation.
 
Here's some more info about this topic (hidden in order to not clutter up the post):
 
 
Basically, it's a massive repository for all your media that you hook up to your home network using an ethernet cable or wireless connection. You can then map this network location to a drive location/letter in your OS and use it like any local hard drive (similar to your C:\ drive in Windows). The difference is that the same drive can be used by as many devices as you have connected to your network.
 
 
  • A central location for all your media - If you have multiple computers on your network and don't want to have to synchronize your media collection across each one, having a central server with a massive hard drive lets you keep everything in one place and simply stream content over your network to any connected device. This is particularly useful if you frequently add music to your library, since you only have to add it once.

    For instance, if you have Foobar2000 installed on two computers, you can point each of them to your music folder stored on your server or NAS (on my Windows 7 laptop I have the drive mapped to Z:\, so the path is Z:\Music\Tony's Music), and both will share the same library. Any changes made to the contents of this folder will be reflected in all connected libraries--in Foobar2000, for instance, selecting Library -> Album List will make the new entries instantly appear.

    Plus, if you completely change/upgrade your server/NAS, as long as you keep it mapped to the same drive letter and keep the folder structure the same, you essentially have a drop-in replacement, rather than having to reinstall your entire OS or point all your media software to a different library location if you upgrade to/add a larger hard drive. I did this recently and it worked perfectly, saving me hours of work redoing all my Foobar2000 playlists.
     
  • Data security - Many NAS boxes have slots for multiple hard drives (most commonly two). You can set up a NAS box with two identical drives and have everything mirrored across both of them (using RAID 1, a standard level of RAID), creating an instant, continuous backup. If one of the drives fails, the other drive has all your data intact. Though more involved technically, you can set up your own server to do the same thing. In addition, leveraging your home network to have yet another computer back up everything from your server or NAS gives you added security just in case something physical happens to the entire enclosure (e.g. the case gets knocked off a desk). Or, you can back up your NAS or server using online backup utilities (e.g. Mozy, Carbonite, etc.).
     
  • Disaster-proof - If you somehow hose your entire OS, it's a pain getting everything set up again, but it's even worse if you lose something you can't get back. Keeping all your media in a separate place protects it from software-based disaster. You might have to spend a day reinstalling everything, but at least you don't have to re-rip/repurchase/redownload all your media again or slowly reload everything from a backup.
 
 
 
You have two basic options:
 
  • Use a NAS box - Many companies make ready-made NAS boxes that come complete with drives and instructions and everything you need to get going with a minimum of fuss. Others have bare enclosures which you can populate with your own drives. This can save you some money, especially if you can find the drive capacity you want in a good sale. Also, it gives you the choice of which kind of drives you want to use. Enterprise-class drives are more reliable but are much more expensive. Drives like Western Digital's Red series are custom-made for NAS enclosures and are priced in between standard drives and enterprise models. I would not recommend using regular desktop drives (e.g. WD Blue, Green, or Black; Seagate Barracuda, etc.) in a RAID array because they aren't optimized for the task and can cause trouble. If you have a NAS box with multiple slots and want to use some form of RAID array, you must have drives of the same capacity and it's highly recommended that you use two identical drives.
     
  • Set up your own server using existing hardware - This option requires more effort but will also be cheaper, since you don't have to buy a NAS box and, depending on your storage needs, you might not even need to buy another hard drive. Note that a full-sized computer will use more power than a NAS box, so if you're energy conscious you might not want to go this route. You can use any OS you like (Windows will work fine), but it's more efficient to use a server OS such as Ubuntu Server or another Linux variant. This involves a much steeper learning curve, so if you're not a geek don't worry about this last point. There are numerous tutorials online for using a computer as a file server. In time I'll sift through the offerings and post some links to good ones, but for now Google is your friend. 
    smile.gif
     If you know of a good tutorial to link, please let me know about it. This would be highly appreciated!
 
 
I eventually would like to migrate to a NAS box myself, since using a full computer is a bit overkill for my purposes. But lots of folks have old desktops or laptops laying around which would be perfect candidates to be repurposed as media servers.
 
Let me point out here right upfront that I don't know everything. This is just something I've found to be incredibly useful, and there's lots yet for me to learn. I eventually want to turn this first post into an extensive primer on getting started with a home server or NAS, hopefully with the help of other knowledgeable Head-Fi'ers, but for now I just want to gauge interest in the concept and create one central place where Head-Fi'ers can discuss this topic.
 
(See what I did there? 
smile.gif
)
 
Jan 4, 2013 at 4:58 PM Post #2 of 26
I ended up building a NAS/HTPC hybrid and have it hooked up to my receiver and TV in the bedroom. It runs Windows Server 2012 and files are shared using Samba. I also have XBMC installed on it for HTPC needs. The server is on 24/7 and serves music/movies/pictures etc to every computer on my home network.
 
Specs are as follows:
 
CPU: Intel Core i3-3225 3.3GHz Dual-Core Processor
Motherboard: Gigabyte GA-B75M-D3H Micro ATX  LGA1155 Motherboard
Memory: Patriot Viper 3 8GB (2 x 4GB) DDR3-1600 Memory
Storage: Western Digital Red 2TB 3.5" 5400RPM Internal Hard Drive 
Storage: Western Digital Red 2TB 3.5" 5400RPM Internal Hard Drive
Storage: Western Digital Red 2TB 3.5" 5400RPM Internal Hard Drive
Power Supply: Corsair Builder 430W 80 PLUS Certified ATX12V Power Supply  ($24.99 @ Newegg)
 
Relatively low power with enough juice to stream and play HD movies.
 
Mar 20, 2013 at 12:12 AM Post #3 of 26
I want to try my hand building a home server for fairly cheep.  My main goal is just play around with servers and get some hands on experience.  My girlfriend wants to use it  to host some web projects, so i figured kill 2 birds with one stone and have fun and learn a thing or 2 while doing it :)
 
Anyways i have an idea on what to do for the hardware side of things but im unsure of what software i would need, i plan on using Ubuntu server 12.04, is there anything else i would need? again the main use of this will be for hosting a few small websites. Im no web developer so im not sure what all is needed for website hosting
 
here is what i plan on putting into the build (along with 2 1TB HDs that i have sitting around).  Is having an SSD worth it for something like this? and any tips for specific hardware ( i have always built gaming pc's so im not %100 on how i should go about building this.  
 
 
 
edit: i will also use it for media storage and streaming, but my main goal is to host some websites
 
Mar 20, 2013 at 1:13 AM Post #4 of 26
Here's quite a good write-up which should make things much easier to consider:
 
http://www.mactalk.com.au/content/mega-4-bay-nas-review-2772/
 
Mar 20, 2013 at 8:41 AM Post #5 of 26
I bought a HP Microserver (N40L) for around $220 and upgraded its Ram from 2GB to 16GB. The specs say it only runs 8GB but about 1 year ago someone actually tested adding the additional 8 and to everyone's delight it worked.  I've also installed 5 green hard disks in it (software mirrored 2 of them), and also installed a solid state disk.  I went with the server because of its low power consumption as the server itself uses bugger all power and the disks power down when not in use.
 
I use it for:
- music, movie, TV series storage used in combination with a western digital live player, SONOS, and various PCs,
- redundant storage of personal information (mirrored disks).  Backup is held off-site,
- sickbeard, couch potato, sabnzbd server (these are brilliant mind you),
- mame emulator which outputs directly to my tv for when I feel the need to jump back in time,
- electricity monitoring using pvbeancounter.
 
I like the concept of the NAS but they're also limiting in some ways too. I prefer a full operating system as it gives me flexibility.
 
Mar 20, 2013 at 8:47 AM Post #6 of 26
Green hard disks I wouldn't touch with a 10ft barge pole. They are just about guaranteed to fail after a year or two. 
 
After spending a year slowly investigating, I ended up using my old MacBook Pro from 2006 that has a dead battery as a NAS with a couple of external eSATA cases. I stuck it in an upside-down "V" position behind the TV so that it doesn't automatically sleep which it will do with the lid closed. No having to worry about what software to use or other issues as I just used the drives I had that already have all my stuff on them. I think down the track I'll get a couple of 3TB drives and make a RAID 1 mirror from them for safety though.
 
Mar 20, 2013 at 10:37 AM Post #7 of 26
I have also set up a custom built NAS based on the Chenbro ES 34069 (http://www.chenbro.eu/corporatesite/products_detail.php?sku=78). Hardware consists of [size=small]Atom mITX Mainboard  (Point of view ION330-1), [/size][size=small]4GB-USB-Stick (for the OS), [/size][size=small]2x 1GB DDR2-800 RAM and [/size][size=small]4x 1TB Samsung HDD as storage (Raid5 = 3TB). [/size]
 
One disadvantage though: the Chenbro stock fans are quite noisy. I've been too lazy to replace them (and since the box is located in the basement it can scream and noone will hear...) 
 
Since early 2010 running 24/7 without complaints. Initially on Ubuntu server 10.04, later updated to 12.04 (I skipped 10.10 and 11.xx). I mainly use it as a storage server, serving all kinds of files (ISO, Music, Video, Documents etc.) to various windows "clients" spread all over the house (and one WDTV Live). So far, I did not "stream" as such (i.e. the box decoding/transmitting a video-stream over the network), rather the WDTV, for example, plays ISO files stored on the server for my TV in the living room. 
 
So far I did not run into any hardware limitations, the box delivers up to 80MB/sec (byte, not bit) on my gigabit network, speed mainly depending on file size and "receiving HDD" write speeds.
 
I chose linux because a) it's for free, b) lower hardware requirements to deliver decent performance (where needed) = translates into cheaper than a windows box, c) can be customized to do almost anything and everything and d) appealed to my tinkering appetite... :D
 
In 2010 of-the-shelve solutions were way more expensive while having a rather limited feature set. This may be different now though. 
 
However, I (still) embrace the benefits of a fully fledged linux server: I can safely connect to my home-network from the road with OpenVPN as if I were "at home" (to start other PCs with wake-on-lan, trigger downloads, download music files I forgot to take with me, have a quick peek through an IPcam watching the maid clean... hehe), run a webserver whenever I want e.g. for testing purposes or connect with SSH for server administration or.... well... you get the idea. 
 
Of course you can achieve the same with other solutions, but administrating the linux server is its own kind of entertainment (for me). 
 
Mar 20, 2013 at 11:00 AM Post #8 of 26
Quote:
Green hard disks I wouldn't touch with a 10ft barge pole. They are just about guaranteed to fail after a year or two. 
 
After spending a year slowly investigating, I ended up using my old MacBook Pro from 2006 that has a dead battery as a NAS with a couple of external eSATA cases. I stuck it in an upside-down "V" position behind the TV so that it doesn't automatically sleep which it will do with the lid closed. No having to worry about what software to use or other issues as I just used the drives I had that already have all my stuff on them. I think down the track I'll get a couple of 3TB drives and make a RAID 1 mirror from them for safety though.

I don't know which version of OSX you have on your 2006 macbook pro, but I use nosleep with my MBP so I can close the lid and still keep it running all its programs.  
 
Mar 20, 2013 at 12:11 PM Post #9 of 26
Someone willing to give an ubuntu-based NAS a try may want to have start with the "official" Ubuntu 12.04 Server Guide
HTML: https://help.ubuntu.com/12.04/serverguide/index.html
PDF: https://help.ubuntu.com/12.04/serverguide/serverguide.pdf
 
Covers or provides a first start for everything you may need (software raid, samba, ssh, openvpn etc.) to get your box running with the key services: SSH server is mandatory, so is samba for a "windows" network. 
 
On your windows box you'll learn to love putty (ssh client): http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html 
 
Rest really depends on what you want to do with your box. If you want to grant access to your box from the big bad internet, server security becomes a key topic and things get much more complicated. As a general rule, I would strongly advise against granting outside access to your box, in particular if you plan to run a webserver on it for internal/testing purposes and don't really know what you're doing. You risk that your server (and through it your whole home network) gets compromised because you experimented with innocent things like phpmyadmin, postfixadmin etc. (which are, for example, vulnerable to SQL-injections and systematically searched for and attacked from China)... 
 
One link I found particularly helpful, kind of "special interest" though if you want to set up a Mailserver (this howto is a real blessing, if you're new to mailservers):
http://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/
Note: The only part not covered by the tutorial - at the time I used it - was how to set up the /etc/mailname file – which is required for amavis but apparently not automatically created /filled when installed via apt-get. 
 
Have not tried it myself, but I hear that XMBC is a very good solution for HTPC/streaming needs: http://wiki.xbmc.org/index.php?title=Installing_XBMC_for_Linux 
Other tools frequently menitoned are MythTV, Squeezebox and Mediatomb. Again, I did not use my box for this kind of stuff, so others will have more in depth knowledge.
 
If you want to expand your linux file server more to media, you may also want to have a look at: http://www.havetheknowhow.com/ as a starting point.
 
As a general rule and one of the linux benefits is: If you are willing to spend the time, you'll find the answer also for your individual problem/topic/task eventually via google... :D
 
Mar 20, 2013 at 12:27 PM Post #10 of 26
If you value your time and just want to get to the end-result with minimal fuss, I highly recommend getting a Synology NAS.
 
They are extremely versatile, relatively easy to use, and software is updated/improved regularly.
I haven't had a single issue in the 2+ years I have been using mine.
 
Mar 20, 2013 at 1:40 PM Post #12 of 26
Mar 20, 2013 at 2:34 PM Post #13 of 26
IMHO if you really want to run a webserver that basically everyone can access from everywhere, there is too much to consider regarding security to discuss here (even assuming that all content served by the webserver can be accessed by everyone, i.e. you don't have different access levels / users on your website). 
 
In any case you will want to think about firewall, PHP SQL-injections, task specific users (samba/www/mysql...), file permissions and encryption (both on HDD and transmission, e.g. truecrypt/ssl).
 
Some ubuntu specific links regarding server security:
 
http://www.rationallyparanoid.com/articles/ubuntu-12-lts-security.html
http://www.thefanclub.co.za/how-to/how-secure-ubuntu-1204-lts-server-part-1-basics
 
and two very generic reads:
 
http://www.ibm.com/developerworks/library/l-sc7/index.html
http://www.linux.org/article/view/security-issues
 
IMHO server security is a topic that is too wide and too important that you can/should reasonably discuss it here. Note I am not an expert myself and all the experts I talked to basically advised not to set up a server accessible from the internet unless, if something goes wrong, you can 1) pull the plug, 2) start fresh from scratch at any time and 3) possible damage to you (and others!) is limited (e.g. to that specific machine). 
 
For the purposes of this thread I suggest continuing on the assumption that the NAS-/media-/web-server is for private use only, i.e. cannot be accessed from the internet (except maybe through a VPN). 
 
Mar 20, 2013 at 5:13 PM Post #14 of 26
Quote:
IMHO if you really want to run a webserver that basically everyone can access from everywhere, there is too much to consider regarding security to discuss here (even assuming that all content served by the webserver can be accessed by everyone, i.e. you don't have different access levels / users on your website). 
 
In any case you will want to think about firewall, PHP SQL-injections, task specific users (samba/www/mysql...), file permissions and encryption (both on HDD and transmission, e.g. truecrypt/ssl).
 
Some ubuntu specific links regarding server security:
 
http://www.rationallyparanoid.com/articles/ubuntu-12-lts-security.html
http://www.thefanclub.co.za/how-to/how-secure-ubuntu-1204-lts-server-part-1-basics
 
and two very generic reads:
 
http://www.ibm.com/developerworks/library/l-sc7/index.html
http://www.linux.org/article/view/security-issues
 
IMHO server security is a topic that is too wide and too important that you can/should reasonably discuss it here. Note I am not an expert myself and all the experts I talked to basically advised not to set up a server accessible from the internet unless, if something goes wrong, you can 1) pull the plug, 2) start fresh from scratch at any time and 3) possible damage to you (and others!) is limited (e.g. to that specific machine). 
 
For the purposes of this thread I suggest continuing on the assumption that the NAS-/media-/web-server is for private use only, i.e. cannot be accessed from the internet (except maybe through a VPN). 

thanks for the links, and i understand why it should be in different area, i just searched for it here and this came up and i didnt want to make another thread :)
 
Mar 20, 2013 at 5:34 PM Post #15 of 26
I have an HP Microserver I paid £100ish for (got £100 off via a cashback scheme), takes 4 bays stock but can be modded to fit 6 drives - I'll probably just stick to 5. Plan was to fill it with drives and run UnRAID but right when I was about to order, the floods in Thailand hit and prices rocketed. Waited a long time for them to get back to something resembling normal again - think I'll go for the WD Reds at this stage, although I'm still waiting for a killer deal to pop up. Idea will be to run both Logitech Media Server on it for my SBT as well as have it as my iTunes library as I'm weird and run a couple of different systems!
 

Users who are viewing this thread

Back
Top