Home Server

Server (from the word “serve”) is computer that provides some services. But why should someone spend money and time to build and manage own server? Especially when most services are available online…

In this article I describe my home server and for what tasks am I using it. Lets take synchronization and backup service as example. Dropbox offers 100GB for 99 per year. On my home server I have available more than 1200GB and electricity costs are around 40$ per year. Server can of course provide more services than backup and synchronization.

Server hardware

Server typically runs 24 hours each day. So it’s power consumption should be considered. Most power saving available computers are based on ARM CPU. ARM computers are however quite slow and offer minimal peripheral options. It is nearly impossible to find ARM based board with SATA controller. They are therefore suitable only for really simple tasks and experiments. Another option (that I have chosen) is server based on Intel Atom board. It have more common architecture x86/x64 and is aimed on regular PCs so it is possible to connect standard peripherals. In my case whole server consumes 20-25 W. It is not as powerful as modern desktops, but it is good enough for server with Linux OS. So complete configuration of my server is Intel D410PT main board with Intel Atom CPU and 1GB of RAM. As system disc I use 250GB 2.5″ HDD that has been left unused after my notebook disc upgrade. 2.5″ discs have lower power consumption than standard desktop discs. That is good to reduce electricity bills. I am using another 1TB 3.5″ disc for large data that I don’t access so often. This large disc is suspended most of time so it consumes really small amount of power. There was only one missing part – power supply. Fortunately I had one 100W ATX from old Pentium 2 computer. There is not much space in server’s location. Therefore I wasn’t bothered with computer case and simply mount all the components on single wooden desk. According to intended use you also need suitable Internet connection.

design

Software and services

Operating system choice for server was quite simple. Long before server build I was sure that it will run the most universal OS available – Linux. I chose Debian distribution as one of most used distribution on servers. There were some attempts to create home server operating system from Microsoft but nothing I would be interested in. Later in this section I describe some services that my server runs.

Network storage

When there was only one computer at our home everything was quite simple. In modern time I am now using notebook, netbook and smartphone. It is convenient to have some data available from all these devices. In case of large amount of not critical data I find network storage to be the best solution. All my movies, lecture recordings and similar data can be mounted as network drive to directly play them or to work with them without need to copy them first. On my notebook I run windows and on my netbook I have Debian. Therefore I chose 2 different approaches to access network storage. For Windows access I configured Samba tunneled through OpenVPN for security reasons. In Linux I simply use SSHFS.

Synchronisation and backup

When I need to work with some data without network access it is necessary to have local copy in device. This copy must be always up to date on all devices. Manual copying is not practical so it is good to have tool to automatize this synchronization. Currently I am using combination of rsync with some own scripts and Unison synchronization tool. I have actually found one interesting project – OwnCloud, that I am going to try soon. I synchronize all my music, documents and recent version of all source codes. This data are located on 3 different devices. That can be considered quite good backup. To be sure I backup the most critical data using SpiderOak service (encrypted alternative to dropbox).

Version control system

During software development, but also during general document creation, it is often necessary to have several latest versions in backup. This allows us to return back if something went wrong. Maintain more version manually is not practical. Therefore there are version control systems, that allow to add comments to each version and store only differences between versions to preserve space. There is also support for more people cooperation. To manage my projects I have configured Subversion (SVN) repository.

TV streaming and recording

One of services that actually need home server is streaming and recording TV channels. For these purposes I use sophisticated software package MythTv. There is TV tuner stick connected to my home server and MythTv backend installed. This backend receives TV signal and streams it to clients. It also manage TV recording scheduling. The scheduler is quite powerful. It can for example record TV shows based on keyword search in EPG information. Scheduler can also be controlled using web interface. So the recording can be setup using the Internet in case you can’t make it home in time to see your favourite show. On my notebook and netbook is installed frontend of MythTv. It controls the backend and allows to play live TV and recordings and to configure scheduler. It is possible to watch shows that are still recorded. I can for example start watching show 30 minutes after start and then move forward on boring commercials. I can also skip few seconds backward to replay moments I accidentally missed.

mythweb.png

MythFrontend.png

Own web hosting

If you plan to run web presentation and don’t expect millions of visit each day it is quite possible to run it on home server. This web is currently located on my home server. In order to don’t bother your visitors it is necessary to have fast enough and reliable Internet connection. Unfortunately my ISP doesn’t offer acceptable option with more than 1.5Mbps upload speed. I am prepared to move this web to more suitable place in case of problems. I am using classical LAMP configuration (Linux, Apache, MySQL and PHP) and WordPress content management system on top.

There are of course many more possible use cases of home server, for example game servers and VPN for secure connection of two networks over Internet. All you have to do to build your own server is spend some money on hardware and some time on software configuration and management.


Tricopter
Own CNC (1) – Mechanics