Venturing Forth

server diagnostics

Why setting up a home server and what you can get out of it

How about rigging up a home server to host all the services that you normally buy and that sum up to hundreds dollars a month? This page discursively describes the requirements and the rationale behind choosing which home server for your home.

When I recently moved into my new house to grow my family I bought the standard internet connection service from one of the ISP available on the market as normal. It is an FTTC connection and actually I’ve researched a while before choosing the ISP. The reasons is that I was looking to have a static ip address without being obliged to buy a business internet connection. You may find more details here.

Then, from time to time, I found myself surrounded by a lot of nice and finely working services to stream video content, a family set of email addresses with some more features than what the usual free services are providing by default, a some kind of cloud service to store all our files, pics and the like.

I realized that I was spending a lot for all this. None of the free basic services was really enough to satisfy our expectations and I was feeling legit to accept to widen a little the subscription to get something more, for a monthly fee.

I realized then that most of what I was purchasing on the market was already available in my premises without any cost and to the plus of a truly self-hosted service, with all the pros related to privacy and control.

I was already having a NAS at home, a dual bay unit from Western Digital born at the dawn of retail NAS sales. It costed me relatively a lot because it was really one of the first models on the market with rj45 connection. It was working as expected since years but it was really a simple vault where to store my files. No real services were included in that unit (or better are included, as MyBookLiveDuo is still alive and kicking as data replicator and back up unit).

I decided to give a look at what was on the market to substitute the MBLD with something more up to date and providing me the necessary resources to incorporate at home most of what I was purchasing outside.

I did it. And I am happy to have done it.

The IT layout of my house is a little more complicated than what someone may naturally build up to get his work done, but after everything has been set up I did not have to worry about anything more. It is a small paradise and the trade-off was spending money to buy hardware instead of spending money every month to pay what I could be doing myself. On the long run it proven to be the right choice and I am saving money, having a lot more than what I was having before… plus a lot of fun.

So, would you like to try out this strategy yourself? You do not need to be pushed by my same reasons.

You may just need a real big amount of disk space to store your personal files (something around several TB that would cost you a fortune if stored on some online service) or you just need to have all your mail at hand, with calendars and address lists all available at the same time on every device of yours. This costs quite some money too if you buy it from a commercial service. Or you just like to have your video library to be at your sole service with the content that you like and no more, as well as for your music that will remain yours forever, without anybody asking you to pay a penny more than the CD you purchased 25 years ago.

If you see yourself in this description, it is time for you to think about it. It may not be for everybody, but if you think about you have this choice, you have the opportunity to put it in place and test the results yourself. I can tell it is worth the test, at least for what concerns my experience.

This whole blog resides on a self-hosted home server. It is 24/7 alive, equipped with the necessary bandwidth to serve my visitors and, most of all, under my sole control with no real overhead with respect to what a hosting provider would have asked me to bear.

I will give you some hints of about what you can do and what you really need to rig it up.

What can you get out from a Home Server correctly set up?

 Well, this is what is on stage in my house:

  • A fully featured home video media player directly connected to the TV with a hardware remote control (it can also be the same of the TV, I just use the remote coming with the NAS). I use Kodi to have this service.
  • Kodi also streams via dlna on other smart TVs not directly connected to the Server.
  • A music library accessible by whatever hardware can reach samba shares, or again via dlna.
  • An eBook content server streaming my eBooks on every browser accesses its home page. I use Calibre for this.
  • A mail server, with its web access page, administration pages, ActiveSync connection, calendars and address books. The server has practically no limits in mail dimension, mailbox dimension, number of email accounts and the like. I use Kolab Community for all this.
  • A video meeting server, directly hosted on my premises without having to rely on anybody else, with the privacy level I desire and full control of every feature it provides. I use Jitsi Meet for achieving this.
  • A personal could space to store and share files with whoever I want. I put together the most flexible solution that in my opinion is OwnCloud, but I really do not use it as the overall ecosystem of my setup does serve perfectly to the same purpose (I have ftp and WebDAV access to all my samba shares, so they are always at reach via ftp and https protocols).
  • My blog finally, is definitively hosted on my server, at home, without resorting to any of the Web Hosting services out there. I use WordPress.org to show you these pages.

The list can be longer, but I will just avoid to dig into details and talk about my dns server, the ntp server, a multiprotocol download station, a Jackett server, my Rsync central station and many more. I will detail all this in the future.

Ouch… I forgot this. I have also a web proxy server to filter and block web pages passing though my network. I have two young kids. Setting all of this up was one of my major goals to protect them from dangerous content.

How much does all this costs? Well, for what concerns the software, it’s free. All the services I have mentioned are not only open software, they are also free, as most of them are under GPL or similar license.

You will have to buy the hardware and feed it with 220V. Choosing the right one can change your investment from a great deal to a big useless failure. You can decide you go out and buy everything I am talking about because you just realized that the list here is what you have ever dreamed about and you want it this by this night or you can just plan to convert your IT assets to such kind of an architecture. Think about how often you buy an external USB hard drive, how often you change PC, how many personal computers you have at home, phones, and the tablet too. How useful are they for you? Are your getting what they can really give or are you just using what they give you out of the box? How many paid subscription you have online? I am talking about Prime, Netflix and similar. I think you can make the math yourself.

What hardware should I look for?

Well, it depends on what you want to do with it. Here I can just outline some of the simplest logic to apply to the choice and I will use my case and apps to guide you a little in the reasoning.

First, some of the items of my list reside on physical hardware and some are virtualized. This is not necessary in general but at the same time it is difficult to find a good platform allowing you to install all of the bunch on the same operating system with no hassle. For example, having Kolab running on a Debian machine was a difficult task for me. I managed to have it running but it was somehow not stable so I decided to follow the original advice from the developers and put it on a CentOS machine. I never encountered CentOS before but I really had no big issues in putting the email server on production. On the flip side, Jitsi is hardly running on CentOS 7, I coped with a lot of errors during the installation and eventually I gave up before having it on production. Now, it runs on Debian like a charm, so I have two virtual machines for these two main services.

Virtualization shall be one of the major points of attention to pick the hardware right. Having a system in position to cope with virtualization allows for flexibility and availability at the same time. Virtual machines are somehow good white pages to go for wild testing when you need it. If you don’t have a deep experience in what you are trying to test, a VM grants you a fully working environment where you can make your mistakes with no harm.

Having virtualization in mind means providing a reserve for some RAM and some computation capacity under the hood. In terms of RAM, you need at least 2 Gb per VM. My email server has 3 Gb virtualized ram. My Jitsi server other 3 Gb. Remember to reduce the swappiness of such OS as much as possible.

Computation capacity does not really mean a lot if we keep the discussion to this depth, I would just resume the whole concept with the requirement of having an Intel® x64 4-cores processor over the motherboard.

The other interesting parameter is rendering capacity, I have a Celeron 3150 CPU and I never had any issue with HD movies (one at a time obviously). Again, x64 recent processors are more than fine in my opinion. Celeron is not really the best on the market but we are bound to home services and home budgets as well.

What I really miss is x.265 hardware rendering. If this capability is not native on your processor and you have to use floating math capabilities of the processor you will end up in a flickering video output.

Then storage capacity. Here the matter is a little wider than the simple amount of Tb you want to have available for your data (and virtual machines). It is also a matter of availability and safety. Fortunately almost all hardware on the market comes with software RAID as a minimum. I bought a 4 bays NAS, initially equipped with 4 x 3Tb disks, then upgraded to 4 x 4 Tb. The day I will have to change NAS I will definitively go for a 6 bays and not for a reason of space, but for the possibility to add a 5th disk and move the RAID layout to 6 without compromising too much the cost per Tb of my array.

The alternative to this is to have data replicated on two different units, or somewhere else equivalently. Somebody says to stay on the safest side, I prefer to say to be on the correct side. I personally tested the consequences of a double error on a RAID 5. The only choice you have in that case is to copy all data on external disks and save as much as you can before substituting the disks. In principle you should have only two corrupted files in the worst case. There’s an unpleasant chance that one of these two files can be a virtual machine drive. So go for RAID 6 if you can.

Then LAN network connection. A good connection is essential to pass data between devices within the network but also a cat 6 cable is normally exceeding the I/O allowed by a standard home internet connection. So, if the majority of your traffic is on the wan side there is no such sense in providing Gigabit ports if you cannot make any use of them. The good point is instead having a NAS that has more than one network connection. Here the combination of opportunities becomes interesting. I have 4 independent ports that can be coupled to provide additional bandwidth or can be used to connect different machines or even subnetworks. I use the NAS also as a hub for my tune-able white lighting system in my living room. My NAS is a QNAP TS-453-A. I have others but it is the core hardware where all the magic happens currently.

I have chosen a commercial NAS. You can have alternatives here, the main branch is between a commercial NAS or a so called micro-server. You may find some more development of such kind of choice here.

Finally WAN connection, i.e. the line going from your boundaries to the external world.

You are bound to buy what is commercially available at you side. In my town a 12 MB down/4 MB up has become cheap and this is what I have (when I use the uppercase “B” I mean bytes, when you see a lowercase “b” read bits instead, the conversion factor is approximately 1:12 when dealing with http protocol).

You need to have 1 MB band up/down for every 20.000 visitors a month of your website if you have one. This is a very rough figure that is not valid in general. You can’t rig up Napster with such a limited bandwidth, so consider that I am referring to a blog or some kind of static website where text is the major compound of your pages. Like this one, just to be clear.

You need more or less 1 MB up /down every 20-30 users with more than one device connected at the same time to your mail server.

If you want to use the download station, you have to plan it wisely if you are at home not to jeopardize the other services. Define an upper limit over the day and let it loose during night time.

But let me tell you my truth. I have put together some Quality of Service on the router, to be sure voice IP calls can be privileged, but I really don’t pay any attention to how or to when I use something at home. Everything works just smoothly. Don’t get nervous on this. If you will have something similar to what I am describing you will be able to do almost everything the same way I am doing it.

How much time does it takes to put everything together?

Quite some time. This is evident. Sometime you need to try, to test and make errors. Most of the time will be spent in tailoring what you find on the web and have it fitting your hardware, your intentions and your pre-existing environment. It is not difficult and if you have read this page up to here you don’t need actually so much persuasion to proceed.

Be ready to convert time into fun and don’t fall in the wrong idea that the money you are saving is not worth the time you are dedicating to the setup.

In my pages you can find a lot of details and guides to set up a QNAP NAS to suit your needs with all the software I use at home. Most of that information is ready to use for a quick deployment with minimal setup.

Auf Wiederluege!

Cheers

Alex

Leave a Comment

Your email address will not be published. Required fields are marked *