SoFMeRight's Homelab Advice

Intro

Intro

What will I need to get started in homelab/homeserver? (WIP)

Hardware (Work in Progress)

The used market and your old PCs are your best friends!

This is a general rundown of the main components that run the lab. I want you to at least have been made aware of these concepts though there is no demand for you to become any sort of educated about any of them unless you want to delve deeper. If you are just getting started I heavily recommend, dont get anything expensive. The reason most of my lab is retired enterprise server hardware is because we can get this stuff on deals. Be savy, dont light your wallet on fire. I mean unless you want to join the club?! 😁

Overall Base Machine:

NIC (Network interface controller):

HBA (Host Bus Adapter):

GPU:

CPU/RAM: Very convoluted to discuss. Every PC needs them obviously. The amount of RAM you need will be determined by how much RAM your workload needs. Can't really guess that. If you have a CPU heavy workload you might need a beefy CPU or a server with multiple CPUs, if you are not CPU heavy; having a big CPU could just raise the utility bill and make noise and heat for no reason. I'm massively overspec and wasting electricity. Can't give the best advice in this area. I am a mess.

Networking

Switches

Firewall / Router

Access Points (APs)

A access point is just a device like a wifi router that provides a point you can connect to your main network from.

UPS (Uninteruptible Power Supplies)

Domain Name

If you want to route services to the internet or host your own websites, while a domain name isn't necessary (you can access your stuff via your public IP and the service port) it does make things so much simpler just having a domain to access everything.

Security Keys

Another thing that isn't necessary but enhances everything. Security keys allow you to have a more secure way of authenticating (logging in) to services. You tie a pinlock code to a device that stores a key more complicated than your passwords might be and you can have more than one. This helps enforce stronger security though it takes some getting used to remembering to bring your yubikey with you everywhere. Mine literally lives on my actual keyring where I keep my house and car keys!

Smart Devices (lights, sensors, locks, cameras etc.)

Desk phones & SIP trunks

If you want to host your own phone service these are things you will need.

Intro

What do [I wish I knew] / I think you should know *before* starting

Dockerfiles: I wish I knew how easy it is to use Dockerfiles to create your own custom container images from the beginning! I wish I had attempted sooner, it is so powerful being able to do that! You can often find dockerfiles on github when you are browsing open source project code alongside the docker-compose.yaml that is used to deploy the app.

Kubernetes:
Its not infinitely hard! If you want the most flexible deployment system its the way to go. You can configure services to stay online during reboots of servers and maintenance. Kubernetes has built in features to support replicating application data between multiple remote sites and the cloud. Kubernetes has a modern design that considers everything that you might need in the modern world it just has a learning curve that is steepest at the beginning.
I sometimes wonder if I should've skipped docker for kubernetes. I was super intimidated with a lot of the tech sector and later found things are easier than I assumed. I have a good enough understanding of kubernetes now to say if I put the time in I'd probably be pretty fluent with it by now even if its somewhat more  painful to learn, its just about putting in the time. I definitely plan to learn more soon.
I have spent very little time configuring a cluster consisting of 10 Nodes; 5 masters, 5 workers. I was recommended to scale down to 3 masters max even if I increase workers. Apparently lots of masters isnt really needed lol. I have been planning on switching the deployment to Cilium for a CNI, I am running Calico and metallb and I found after deploying kubernetes and learning more that Cilium would be my preference. Many users I have discussed with are running Cilium as well after making this decision so it seems more unanimous of a decision. Though metallb and calico is just fine!



I wish I ever thought to research the purpose of base linux directories:
https://www.pathname.com/fhs/pub/fhs-2.3.html

Directory Description
bin Essential command binaries
boot Static files of the boot loader
dev Device files
etc Host-specific system configuration
lib Essential shared libraries and kernel modules
media Mount point for removeable media
mnt Mount point for mounting a filesystem temporarily
opt Add-on application software packages
sbin Essential system binaries
srv Data for services provided by this system
tmp Temporary files
usr Secondary hierarchy
var Variable data

I used to store my docker deployments in /mnt/app_data/Server/_docker-stack/<appname> 🥴
Now I store them at /opt/docker/<app name> I only put data in the /mnt or /media folders if it relates to a different disk or medium than the primary disk that the OS is installed on. Its super tidy, and the way it was designed to be used.

Intro

Overview: My biased opinion of what I think a base home lab requires

A good homelab base environment should have all of these items sorted out in some regard, this is the core *in my opinion*. There are many ways to achieve these goals, I am sharing my biased opinion of what was best from my perspective. I also will be sorting by order I think we should tackle these goals.

  1. **A hypervisor (Proxmox)**: (optional) We need at least one machine to build an environment. Things will be best in the future in my opinion with a hypervior. I have been using Proxmox VE for quite some time now. Its what I recommend. I personally run a 5 node proxmox cluster, the way clustering works is pretty intuitive. All the machines are managed thru the same ui and you can  send Virtual Machines in between the individual host machines while they are actively running and without loss of connection.  The best part is this is a functionality you can add later, you can add more hosts in the future when we start with just 1. Please aim to have 3+ total machines in the cluster if you ever do intend to cluster, otherwise you will get a suboptimal experience regardless of whether it is possible or not.
  2. **A VM or host machine that can run container images**: There may be services that you encounter going forward that you might run as a separate VM in proxmox but the bulk of this stuff will require you to either install Ubuntu/Debian or your preferred linux OS on a VM or you can just run it in WSL on Windows or the equivalent whatever that be on MacOS?!
  3. We need an easy to use and intuitive way to manage the environment 
  4. We need authentication for the environemnt

Version Control:

Backups

Oversight

UPS

Netbird

nginx

truenas

High Availability:

SSO

Yubikeys

Automation

zitadell

bitwarden 

2fauth

linkwarden