DIY NAS server and HTPC/Media center with Ubuntu Server – including AFP, LAMP and SSH (the hardware)

NAS server and media center in one unit

It is uncommon to combine a NAS server and a HTPC in one unit, but the reason that I wanted this setup was to safe money on electricity – more units will consume more electricity – but also because I do not have a lot of room for multiple units.

To build the perfect system for me I created a list of services that I wanted NAS to handle. The media center in my NAS will be a configuration of XBMC.

Services:

  • AFP
  • Time machine with OS X Lion
  • LAMP server
  • SSH

This post will include my experiences with setting up and configuring a NAS server on Ubuntu Server and use it as a HTPC hardware as well as software. The problems I came across, and how I solved them. This tutorial will include the list of topics that I had to deal with when installing ubuntu server as the foundation system on my NAS server and HTPC.

To help you I have divided the this tutorial into three main topics, this post will only include the 1 part.:

  1. Hardware
  2. The system – Ubuntu Server – AFP, Time machine
  3. The services and specific configurations

Hardware

To build the perfect for my NAS and HTPC I used the following components:

The idea behind this setup was to build a silent unit. Putting all the components into the case was not too hard, and took me less than half an hour.

Next thing up is the installation of an operating system (Will be posted shortly)

Show hidden files in Finder

As I have had to show hidden files in Finder so many times, I thought others might find it useful. The system files in Finder are hidden by default. However, it is useful to know how to show these files.

You have to locate the application “Terminal”. Now there are two ways to find this application. Either go to spotlight and type “Terminal”, and chose the application or locate Terminal in Applications/Utilities/ chose Terminal.

In the Terminal Type:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

The first line, will tell Finder to show all files. To get this working, Finder must be restarted, hence the second line “killall Finder” will restart Finder and show all files, system files and non-system files.

To revert to the original state, simply type FALSE instead of TRUE, like this

In the Terminal Type:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

This will revert Finder to the original state when it comes to the hidden files.

It is a very handy thing to be able to do!