Lessons From My Homelab
I have been running a homelab for some time now, and it has taken a few different iterations during its lifespan. It’s grown from a single server setup to a multi-node HA configuration that guzzled power and hard drives using old enterprise machines. Recently I’ve gone through a move and done some planning to downsize and make my homelab a bit more compact, and it got me thinking a bit about all the things I have learnt from the lab and its different forms. I wanted to write up this post to share some of the lessons I have had running and learning with this homelab to hopefully help you make a better decision about starting a lab or the one you are running right now that needs a pick me up to get building on it again.
Store configurations as code
Now if you're building out your lab and installing any apps I would recommend that you start looking into the configuration management tools earlier rather than later such as Ansible, Chef, Terraform and a host of others.
These tools can allow you to consistently apply configurations on your hosts based on the code you write and allows you to start treating the components in your lab a bit more like cattle instead of pets. You will start to find by focusing on these configurations as code you will start hitting fewer errors and weird unique issues as these tools encourage the use of the best practices when doing installations of apps or management of your hosts.
These tools are also very useful in the industry if you are interested in DevOps or just regular software engineering, There is always configuration that can be stored and operated on from code and is becoming more important as tools make it easier to deploy apps closer to its source code. You would have seen this with the explosion of things like Docker and Kubernetes that bring the configuration of the runtime environment close to the application source code.
Build a personal platform for your lab
Now once you've started to set up a couple of apps in your lab you might be thinking how do we start making this easier and more manageable. I believe the best way to achieve this is to think about your lab really as your personal computing platform and to think about running some services to better support that platform. This platform can include things like;
- Centralised logging and alerting
- SSO and Identity services
- VPN and networking
By setting up these kinds of tools you can focus on learning about the things you want rather than having to implement things like SSL for every service. If you develop a pattern for doing this in your lab and better yet make it scriptable or configurable so you can do more with your lab whilst also keeping it secure since you are always able to implement those best practices in your own platform. If you want to look into this further check out these kinds of projects in your lab.
- Setting up SSL for your lab and all its services with free tools like let's encrypt
- Docker registries for a local passthrough cache or for storing private images
- Logging and monitoring for your labs with tools like Graylog, Grafana and Prometheus
Pick a lab that's the right size for you
Now if you've spent some time on forums like r/homelab you might have seen some of the nice labs that use multiple machines in a large server rack that looks very impressive. I'm going to warn you that when your start to build out your lab and learn more about the equipment you could use you will get this urge to just buy and keep adding loud expensive machines to the lab.
You are going to want to stay away from just spending time and money accumulating these machines that you don't actually utilise the computing resources for in your to you don't drive up the complexity, power bill and noise. While you're still learning consider using just a single machine at first to understand the basics of administering your lab and managing the apps you may be running.
Later down the line if you think yeah I want to learn how to manage groups of large hosts or how to host highly available apps then you should look at how you can effectively expand your lab to fit your new learning goals for your homelab. This should be a constant process whenever you look at expanding your lab, plan out what you need it for and get the equipment to suit that job.
Don't buy old junk
In your lab, you may be using a mix of hardware that may be new or used and generally for your homelab I would encourage this as it gets you to build faster for less money which is always good to get more people learning and to reduce those barriers to entry. But I will share a warning that it is important to not be buying junk when buying used hardware for your homelab.
Before you go into buying hardware for your lab make sure you do your research first and work out what features your actually looking for and keep an eye on some key things like power consumption and noise for your machines that you may not have considered if you were just buying consumer products before. If you are looking for some current recommendations for hardware that is still worth your time and money try looking at the following series of products and if you can't find that series in your region on second-hand marketplaces look at the next newer revision of it.
- Gen 13- Dell R30s
- Gen 14- Dell R40s
- HP DL360 G8 & DL380 G8
- HP DL360 G9 & DL380 G9
Generally the rule of thumb with enterprise equipment that is affordable on the second-hand marketplace for your Homelab checkout the major brands like HP and Dell support pages and takes a look at when the support lifespan for their equipment is ending. You will generally find an influx of equipment for sale or going for free on sites like craigslist, gumtree and eBay as these end of support dates approach and organisations decommission old equipment and dump it onto the marketplaces to try and recoup some of that equipment cost, but we will happily pick up those equipment for our lab for a nice discount.
Wrapping up
So to close this article I just want to remind you that you need to have fun with your lab and you should be using it as another tool to engage and develop your skills in a nice practical way. But if it starts costing too much money or causing too much stress maybe it's time to take a step back do some planning and even downsize if that's the best decision at the time.
Now get out there and build something interesting for you, and have fun doing it!
Connect Further
- If you are in the market for some homelab or home server products check our store's products.
- You can also find some of our other blog posts.
- Connect on our social media accounts over on Twitter, Facebook and Instagram.