Categories
System Administration

Building a Homelab For Good Old Fashioned Fun

I think having a homelab is one of the most fun, and most important things you can build as an I.T enthusiast, and it doesn’t even need to be complex or expensive to set up. So many times I’ve gone down the homelab rabbit hole on YouTube or Reddit and gotten frustrated that I don’t have the resources to build some of the things you can find. Honestly though, in most cases all of the complex set ups and expensive hardware are completely unnecessary, and the great thing about it is you can always expand as you grow your lab.

When I first got into computers I used to love having machines around to pull apart and play with. I was lucky enough to have a job as a teenager that gave me access to a lot of old, unused or decommissioned computers that I had to clean up and get working. I even had an old Sun SparcStation and a SCO Unix machine.

Experimentation is one of the best ways to learn something in my opinion, and you can’t go wrong with having even the simplest of labs. And, do you know what, not everything needs to be profit or career motivated, it doesn’t need to lead to anything or have a purpose, other than being fun, enjoyable and interesting.

In this post I wanted to discuss some options for homelabs and how you can setup a home I.T environment using old, repurposed hardware without having to spend a lot of money.

Why do you need a homelab?

Well, first of all, because it’s fun. Why does there need to be another reason?

Essentially, I like to think of a homelab as a personal computing environment, either outside of or including your main computer system, that you can pretty much do whatever you want with.

Some people like to host services in their homelab, such as a file server to store important files without having to resort to using third-party Cloud storage.

Some people might host a media server to store movies that they’ve (legally) purchased.

Homelabs are also amazing for experimenting and learning. Want to try out a new Linux distribution, run it in your lab. Want to get familiar with containers and Kubernetes, spin up a cluster in your lab. The list goes on.

Anything you can do with a computer, or multiple computers, you can do in a homelab.

Homelab essentials

I want to make something pretty clear up-front before we talk about building anything.

You DO NOT need multiple expensive computers, server cabinets, redundant storage, network switches, or anything like that for a homelab. In fact, sometimes I think you can get stuck trying to get the best setup when you can learn more by getting started with whatever you have access to.

If you have a resonably modern PC, you can run a homelab.

If you can install Virtualisation software and run Virtual machines, you can run a homelab.

If you have an old, spare computer that doesn’t get used anymore and is just sitting there collecting dust, you can run a homelab.

A homelab is really, anything you need it to be to either host services for personal use, or run multiple machines for whatever purposes YOU need using the hardware and computer resources YOU have available.

Start small. Start with either your personal computer, or a spare computer. And let your homelab grow as it needs to.

My Homelab evolution

My homelab is where I do most of my computer stuff outside of my job. I also personally believe having a homelab has contributed to making me better at my job, not because I’ve put it on my resume and recuriters flock to speak to me, but because it can give me the confidence to speak about things I’ve done if I haven’t done them in my job. My lab lets me build things and experiment, make a mess and then fix things, or delete things and start again.

I don’t have my homelab to host File or Media services or replace Cloud services, as much as sometimes I might want to.

I host a small Pihole virtual machine running on Debian Linux for Ad filtering, because let’s be honest, the Internet is a cesspool of Advertising and rubbish content.

I have a Minecraft server on Ubuntu Linux for my kids, and I also build a small Web server for them to play with. We homeschool my 3 youngest kids and regardless of my career and my interests I do think tech and coding are great skills to learn, so we do some coding lessons and I’m trying to encourage them to build little HTML pages, play with JavaScript and maybe even eventually learn Linux.

And that’s really the only permanent things I host at home at the moment, although that could change eventually. Otherwise my lab is used for my own experimentation.

My homelab is also a hodge podge of different things. Nothing about it is an example of a well built, great looking, textbook lab.

I run a lot of virtual machines on my main laptop. I have both VirtualBox and Virtual Machine Manager with Libvirt. I use them for different things, for different reasons, none of which are really important. But I’ve always used virtual machines. Virtual machines on your main PC are in my opinion the best way to get started with a homelab because you don’t need to buy any new equipment. The only issue with Virtual machines is maybe if you have a laptop, when you close the laptop lid the virtual machines are most likely to become inaccessible.

I’ve been experimenting with Kubernetes a fair bit, so my VirtualBox currently has Minikube set up. I also do a bit of security research and Pentesting for my own personal interests so I have Kali Linux.

In Virtual Machine Manager I have Code Ready Containers which is a local installation of Red Hat OpenShift.

I also have CentOS 7 as I’m currently working on upgrading to CentOS 8 and 9 for work, so having a local machine that I can play with is handy.

The CentOS Stream 9 virtual machine is a development environment so that I can have a CentOS desktop to work with. It’s not running all the time, so I just power it up when I need to.

I have an old laptop that I don’t really use that I had lying around. I’ve had this laptop for about 10 years, and it was second hand when I got it. It’s an old Dell laptop with 8GB RAM and a 500GB hard drive. For ages it was sitting in a drawer in my desk. It would occasionally get in the way and I’d consider getting rid of it. The battery doesn’t last longer than about 15 minutes so I can’t take it anywhere without its power cable. Sometimes I’d get inspired and turn it on, I’d install a new Linux distribution on it, have it sitting on my desk for a while, then it would get turned off and put back in the drawer.

Eventually I decided to give Proxmox a try. Proxmox is a step up from VirtualBox as it’s a dedicated virtual machine hypervisor platform built on top of Linux. Proxmox has some really cool components that I won’t go into here, but basically Proxmox let’s you setup a dedicated computer for hosting virtual machines, similar to Vmware ESXi but it’s free and open source. I set up Proxmox on my old laptop which is where I could start hosting servers that don’t need to run on my personal laptop.

Proxmox also lets you setup a cluster, which is when two or more standalone computers are configured to work together. Over time I got my hands on another second hand computer which I also installed Proxmox on and joined into a Proxmox cluster with the laptop. This basically just gave me additional resources to host my virtual machines.

With Proxmox I can monitor the resources such as RAM or disk space across both machines. I can migrate virtual machines between the two underlying PCs. I can manage everything through a Web UI and I can create as many virtual machine servers as the cluster can handle without worrying about keeping my laptop powered on.

When I get my hands on a third or fourth (or tenth) secondhand PC, I can again install Proxmox on it and join it to the cluster to increase my labs resources.

Now granted I’m not using Proxmox to it’s full capabilities. I’m not using shared storage or CEPH and I’m not using all the high-availability resources available. But those will be there when I want them and I can add the hardware to the lab.

This Proxmox cluster is where I host my Pihole virtual machine which as been one of the single most exciting servers I’ve built at home. I honestly can’t even imagine trying to use the Internet without it anymore.

I’ve configured my home router to use Pihole for DNS which blocks Ads for every device that uses my home Internet, and in turn, Pihole is configured to use Cloudflare’s 1.1.1.1 to block Malware and nasty content from my home network.

My homelab really isn’t anything special as far as setup, but it is very useful. At the moment I have 13 virtual machines with capacity to add more when I need to. Some of my machines are only temporary experiments and will be deleted when I’m done to free up resources.

I do want to expand the RAM on both physical computers. I’ve already sourced what I need and will buy it soon because RAM is the resource I use up the most, being only 16GB available between the two computers in the Proxmox cluster. If I can double that I can run many more machines.

The other option is to add a third physical computer when I can get my hands on one.

I’d love to eventually add some more equipment, like dedicated storage to run CEPH, or a NAS. I’d like some more networking equipment too. But that can all wait.

So if you haven’t already, install VirtualBox, or if you can Proxmox, and start building out a homelab to play with. It doesn’t need to be flashy, or expensive, and it definitely doesn’t need to replicate a commercial data center. Just throw up some VMs and have fun.

Leave a Reply

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