People in tech circles are increasingly moving towards self hosting and I believe this trend is going to catch on with general population as both hardware and Software continues to evolve. This evolution has already reached to a point where a layman with few hours to spare can self host alernative to most of popular cloud based applications. In this blog post I am going to show you the hardware that I have used for low cost server setup at my home.
You can use old PC/laptop as server for your home in which case you don’t even have to buy anything but I would recommend that you use a Raspberry Pi instead. There are quite a few advantages if you go this route.
- They are fast and low on power consumption. You can stream 4K content with Raspberry Pi 4.
- They are cheap. 4GB version will cost you around 5000 INR without accessories.
We want our server to run 24x71 and the power consumption adds up over time so it is an important factor while choosing the hardware for our server. A Raspberry Pi will cost you once in beginning but its going to save you lot of money in the long run. Here’s a calculator to calculate power consumption of any appliance. 10W is average power consumption of Pi. Try putting 65W on that calculator and see how numbers change.
If you are just beginning your self hosting journey I would advise you to start with a Pen drive. This way you can experiment while keeping costs down. If you are determined to have long term self hosting solution then read on.
The storage you choose depends on what you want to use your server for. For me, I want to host a Jellyfin media server that can playback 4K content. This requires that I have at least a Tera byte of storage. Note that Raspberry Pi runs of a memory card and you don’t need anything else but I would suggest to use that only for booting the Pi. Any data that you want to store for long term should never end up on that memory card. Always use external storage like a pen drive or HDD with Pi. suitable for its booting but not for any long term storage.
Few considerations while choosing storage hardware
- Pi should be able to serve 4K content. This requires that the HDD be connected over USB3.0.
- The drive should go to sleep when not in use. This reduces power consumption as well as wear and tear of the drive thus increasing the life span.
- Our storage solution should have proper heat dissipation.
You can connect an external HDD to your Pi and be done with it but there are 2 disavantages to this approach. First, xxternal HDDs have poor heat dissipation which is okay considering they are built for one off usage and not running a mediacenter of them. They are certainly not designed to run 24x7. Second, external HDDs usually have 2.5inch form factor which limits their speed to 5400RPM. These are basically same hard disks as laptops which are slow as compared to internal hard disks used in desktops
After careful consideration of many HDD connectivity solutions I came to conclusion that PiBox dock is best hardware for our low cost server. It can suspend the drive when not in use. It supports both 3.5/2.5 inch HDD and has USB3.0 interface. I have chosen Seagate Barracuda 3.5 inch HDD for my requirement. Another advantage of going with internal HDD is that they are cheaper as compared to their external counterpart. Regarding heat dissipation, since our drive is internal and docked there is no need for additional heat dissipation. I have checked temperatures and they are well within operating range of HDD. Ideally we should be using an enclosure with fans but that goes way over the budget for the low cost server that we want to build.
Bill of Materials:
- Raspberry PI 4 with case and fan - INR 5800
- PiBox HDD Dock - INR 1100
- Seagate Barracuda HDD 1TB - INR 3000
It costs little below INR 10,000 but if you compared this to the NAS solutions that are available in market this is pretty low cost. Not to mention its robust as well. I have been streaming 4K content, hosting an alternative to Google Photos and also a document server capable of running OCR on incoming documents but Raspberry Pi hardly breaks a sweat2. It’s a tiny little beast. In my next post I will show you the kind of applications that I am self hosting at home. So stay tuned.
- We can turn off our server every night further improving cost savings but I will leave that as an exercise for the reader
- Your Pi will have hard time if you are expecting it to perform OCR while also transcoding media streams for multiple users. So yes your apps need to be configured properly to make the best out of this low cost setup.