DEV Community

Cover image for Self Hosting Experience - 2024
Leo Spratt
Leo Spratt

Posted on • Originally published at enchantedcode.co.uk

Self Hosting Experience - 2024

Intro

Since I started self-hosting a lot has changed, both in my setup and available technology. This article will document my experience (up until 2024).

How I Started And Why

Self-hosting for me started about 5 years ago, in 2019. But why did I start? Well my family was already running a 2 bay Synology NAS. However I wanted a way to host my web app that I was making during school; so that my family could use it (it was a freezer manager) however, my love for tech and expanding my knowledge was also a driving factor.

At that time I had no idea what Docker or containers were; so everything was manually installed (nginx, mariadb and Python). All of this was running on a spare Raspberry Pi 2, so I had many limitations mostly from storage (those pesky Micro SD cards) and available memory (1GB RAM).

At some point my Computer Science teacher suggested I look into Docker (and also git). I researched Docker however did nothing with it; since my setup was running fine. It wasn't until I discovered PiHole a DNS server that allowed for network-wide ad blocking and easy management through a web ui that I started to investigate further.

Learning Docker allowed me to setup PiHole on my existing server and because I was using nginx, it enabled me to access my site through a simple domain name and share port 80, a vast improvement from having each service on a different port.

The First Upgrade

After not long the performance of the Raspberry Pi 2 became a limitation, since I was hosting many more services. So I migrated to a faster Raspberry Pi 4 8GB model, allowing for booting from a 2.5 SSD making it a lot more reliable.

I also wanted an easy way to backup my server. So I bought another Raspberry Pi 4 however, a 2GB model and attached a 2.5 1TB HDD, turning it into a NAS by installing Open Media Vault. As well as backups; I also used this device as a private Docker image registry, mostly for aiding my software development hobby.

Present Day

I now have 30+ services running locally at home. However all of these services no-longer run on a Pi, instead I have moved onto a Docker Swarm cluster running on three mini-pcs.

I went with Docker Swarm as it's a lot simpler than Kubernetes and it covers fail-over well enough for a home-lab. For storage in the cluster I have setup GlusterFS which is a distributed file system, which I have found very stable. I have it setup so that all data is replicated across all machines; as I am more interested in redundancy over storage capacity. Because of this there is no real performance downsides during reads, in-fact I have it setup so a node can read from all simultaneously.

During my time using Raspberry Pis I have found that there are some software limitations with them. The main issue is that some software only runs on x86_64 however, that is changing since a lot more software is supporting ARM64. Another is that the recent versions of MongoDB do not work, due to the CPU missing a certain cryptography feature. This may change in the future with newer Pi's or other Single Board Computers (SBCs) being released.

Despite these issues I still use Raspberry Pi's for servers. I now run Home Assistant and still use my Open Media Vault NAS, which now has an offsite backup, so I can truly say I now have a 3-2-1 backup strategy.

The 2 bay Synology NAS has also been upgraded to a 4 bay, since it was almost at capacity. This is also used as another backup endpoint but mostly houses photos, videos and other documents.

Throughout all my time self-hosting I have always picked Ubuntu Server LTS where possible. I have found it most stable and having good defaults. I would have to agree it does come with some extra software installed that is not found in distros such as Debian however, they do not take much space to make me want to change. Unlike Debian it also ships with better driver support, meaning it will have a better chance at running on random machines.

Tech Specs

For those who want a clear list of the tech I currently have running, see below:

  • 3x HP EliteDesk 800 G3 - 35W
    • CPU: i5-6500T
    • RAM: 8GB
    • Storage: 500GB NVMe
    • OS: Ubuntu Server LTS
  • 1x Raspberry Pi 4
    • RAM: 8GB
    • Storage: 2.5" 250GB SSD
    • OS: Ubuntu Server LTS
  • 1x Raspberry Pi 4
    • RAM: 2GB
    • Storage: 2.5" 1TB HDD
    • OS: Debian with Open Media Vault
  • 1x Synology NAS - 4 bay
    • Storage: 4x 4TB HDD

Conclusion

Looking back on how I started it may have not been the best idea to buy all those Raspberry Pis, since cheap low power mini-pcs have always been available on sites like eBay and would have been more cost effective. Since with Raspberry Pi's you have to buy extras such as cases, power-supplies and storage. However the ones I have already bought will not go to waste as I can always repurpose them for other projects later.

In future I will be investigating how to deploy NixOS as a NAS to replace Open Media Vault. Apart from that I don't think I will be changing anything I am currently doing, apart from making Ansible handle all installs and changes.

I hope you enjoyed and found this article useful. Be on the look-out for a related article that is in the works which is my take on "how to start self-hosting", which will go more in-depth on how to start and some of the things I have learnt along the way.

Join The Community

Stay informed about new posts or announcements about my apps join the community:

Want to help out? A great way of doing that is supporting me at: Buy Me A Coffee.

Top comments (0)