Let's tinker around and accidentally break something.
post
If itβs stable, itβs not a lab.
Thatβs infrastructure.
I've moved my homelab twice because it became stable, I really liked the services it was running, and I didn't want to disturb the last lab**cough**prod server.
My current homelab will be moar containers. I'm sure I'll push it to prod instead of changing the IP address and swapping name tags this time.
When's the last time you checked if your backup solution works?
But if my backups actually work then I miss out on the joy of rebuilding everything from scratch and explaining to my wife why non of the lights in the house work anymore.
What's a backup solution..? (I'm only being half sarcastic, I really need to set one up, but it's not as "fun" as the rest of my homelab, open to suggestions)
No mercy for you, then. ;)
I at least have external backups for important family pics and docs! But yea the homelab itself is severely lacking. If it dies, I get to start from scratch. Been gambling for years that "I'll get around to a backup solution before it dies". I wouldn't bet on me :|
logging is probably down
You do, of course have a dedicated rsyslogd server? An isolated system to which logs are sent, so that if someone compromises another one of your systems, they can't wipe traces of that compromise from those systems?
Oh. You don't. Well, that's okay. Not every lab can be complete. That Raspberry Pi over there in the corner isn't actually doing anything, but it's probably happy where it is. You know, being off, not doing anything.
You have remote power management set up for the systems in your homelab, right? A server set up that you can reach to power-cycle other servers, so that if they wedge in some unusable state and you can't be physically there, you can still reboot them? A managed/smart PDU or something like that? Something like one of these guys?
Oh. You don't. Well, that's probably okay. I mean, nothing will probably go wrong and render a device in need of being forcibly rebooted when you're physically away from home.
Does a $12 Shelly plug count?
if you can cycle your home assistant with the shelly plug whilst your home assistant is down, yes. from experience itβs really quite annoying to have a smart plug switch off HAβ¦
HA is on the same proxmox host as the router. So yeah I can end up locked out. Hasn't happened yet tho! The relay is on my test machine, it's always nvidia that crashes there.
An 8 switch relay, old Pi, and 8 hardware store outlets can be had for not much more. I did that and let PiKVM control my outlets directly.
This is the back of my 10" rack before it was cleaned up. Lots of custom work on this that I'll be posting a page on my site about when complete.

@tal@lemmy.today in case you are interested
Oh. You donβt. Well, thatβs probably okay. I mean, nothing will probably go wrong and render a device in need of being forcibly rebooted when youβre physically away from home.
*furiously adds a new item to the TODO list*
If you do have the smart PSU and power management server you probably also went down the rabbit hole of scripting the power cycling, right? Maybe made that server hardened against power loss disk corruption so it can be run until UPS battery exhaustion.
What if there is a power outage and NUT shuts everything down? Would be nice to have everything brought back up in an orderly way when power returns. Without manual intervention. But keeping you informed via logging and push notifications.
I built an 8 outlet version of those with relays and wall outlets for.. a lot less.
Time to start documenting it!
At 71, I have to document. I started a long time ago. I worked for a mec. contractor long ago, and the rule was: 'If you didn't write it down, it didn't happen.' That just carried over to everything I do.
Do you write down what you write down on the internet?
As in a blog or wiki? I do not because I am not authoritative. What I know came from reading, doing, screwing it up, ad nauseam. When something finally clicks for me, I write it down because 9 times out of 10, I will need that info later. But my writing would be so full of inaccuracies that it would be embarrassing and possibly lead someone astray.
It's how cults start!
I've started to take a l lot more notes at work I guess there will be a time where I take notes of what month it is!
I guess there will be a time where I take notes of what month it is!
You may jest, but there are times when I can't remember what I had for breakfast. They say that you never truly forget anything, but that our recall mechanism fades over time. For a myriad of reasons, including age, my recall mechanism is shit.
Have you already tried implementing an identity provider like Authentik, so you can add OIDC and ldap for all your services, while you are the only one thatβs using them? π€
Behind a traefik reverse proxy with lets encrypt for ssl even though the services arenβt exposed to the internet?
Donβt forget about Anubis and crowdsec to make it even safer inside your LAN
To be fair a lot of apps don't handle custom CAs like they should. Looking at you Home Assistant! π
Who cares if it's exposed to the internet?
-
Encrypting your local traffic is still valuable to protect your systems from any bad actors on your local network (neighbor kid cracks your wifi password, some device on your network decides to start snooping on your local traffic, etc)
-
Many services require HTTPS with a valid cert to function correctly, eg: Bitwarden. Having a real cert for a real domain is much simpler and easier to maintain than setting up your own CA
Probably a good idea to switch over to WPA-Enterprise using Authentik's RADIUS server support and let all of the users of your wireless access point log in with their own network credentials, while you're at it.
All of those systems in your homelab...they aren't all pulling down their updates multiple times over your network link, right? You're making use of a network-wide cache? For Debian-family systems, something like Apt-Cacher NG?
Oh. You're not. Well, that's probably okay. I mean, not everyone can have their environment optimized to minimize network traffic.
I set this up years ago, but then decided it was better to just install different distros on each of my computers. Problem solved?
You can forgejo with a container index enabled, I donβt know if thereβs a way to use that as a proxy for downloading containers though.
The rare moment when everything actually works. π
Don't worry, you're one Docker pull away from having to look up how to manually migrate Postgres databases within running containers!
(Looks at my PaperlessNGX container still down. Still irritated.)
I feel your pain. Had to fix my immich, NC and Joplin postgresdb. Turned out, DB via NFS is a risky life. ;D
https://github.com/pgautoupgrade/docker-pgautoupgrade
Or if you are on k8s, you can use cloudnativepg.
I should do some breaking network changes... While tunneled in.
βYes, while connected to my wireguard server through port 123 here from my Chinese office, I should probably try to upgrade the wireguard server. Thatβs a great idea!β
Ask me how I know.
I stopped the tailscale service...
... while ssh'd through the tailscale interface.
Luckily, it was my home server and I had to drive there anyway.
Backups. You're forgetting them.
Now try migrating all your docker containers to podman.
And then try turning on SELinux!
I set my homelab up on Bazzite immutable with podman and SELinux. It took a while to work everything out and have it boot up into a valid state hahaha
Any reason you chose Bazzite for your homelab distro? First I've heard of someone doing that!
At the start I just wanted a desktop machine that runs Steam through sunshine/moonlight so hardware support and gaming stuff such was very important.
My homelab used to run on my laptop when it could all fit within a couple 100s of GB and I was the only user but moving it was tricky. Since I'm a programmer I'm not afraid of this stuff so I just spent the hours to figure out one problem at a time.
I ended up figuring out adding HDD whitelist in SELinux, make it accessible in podman, manually edit fstab because tools didn't work, systemd service for startup, logging in automatically where I already forgot everything and would have not had to do any of this on a bog standard Ubuntu server.
Respect! I too often take it for granted that it's a privilege for my gaming rig and my homelab server to be separate boxes.
My server is Almalinux, my laptop is Mint, and my gaming rig is Nobara. But if I had to consolidate everything in to one machine, I'd pick Nobara.
Wouldn't an immutable OS be overall a pretty good idea for a stable server?
Good for stability, bad for flexibility for when the homelab grows more complex.
I honestly don't know a ton about immutable distros other than that they let you front-load some difficulty in getting things set up in exchange for making it harder to break. I was just surprised that the distro of choice was Bazzite, since its target audience seems to be gamers.
It's not that difficult to get SELinux working with podman quadlets, especially if you run things rootless. I have a kerberized service account for each application I host and my quadlets are configured to run under those. I very rarely encounter applications that simoky can't be run rootless but I usually can find an adequate alternative. I think right now the only thing that runs as root is one of the talk or collabora containers in my nextcloud stack. No selinux issues either.
I use podman-compose with system accounts and I don't have a ton of issues. The biggest one is that I can't seem to get bluetooth and pip working on Home Assistant at the same time. Most of the servers I manage have SELinux and it works fine as long as I use :z/:Z with bind mounts.
A few years ago, I set up a VPS for my friend's business; at the time, I didn't know how to work with SELinux so I just turned it off. I tried to flip it back on, and it somehow bricked the system. We had to restore from a backup. Since then, I've been afraid to enable it on my flagship homelab server.
are you sure it really bricked it? when turning it on, on next boot it needs to go over all the files and retag them or something like that, and it can take a significant amount of time
Honestly, I don't know what happened, but it was unreachable via SSH and the web console. There shouldn't have been a ton of files to tag since it was an Almalinux system that started with SELinux enabled, and all we added was a container app or two.
that started with SELinux enabled
that does not matter, it needs to go over all of them. I don't know how long it takes with SSD, but with HDD it can take a half an hour or more, with a mostly base system. and the kernel starts doing this very early, when not even systemd or other processes are running, so no ssh, but web console should have been working to see what its doing
Just did that last weekend. Nothing to do anymore. π’
Did you do Quadlets?
Yes of course. Had to spend a couple of hours fixing permission related issues.
I had problems getting apps with multiple containers working in quadlets (definitely a knowledge issue on my part, but didn't feel the time learning it was beneficial, but will probably revisit during kubernetes learning) so went back to podman with docker compose.
You have an intrusion detection system set up, right? A server watching your network's traffic, looking for signs that systems on your network have been compromised, and to warn you? Snort or something like that?
Oh. You don't. Well, that's probably okay. I mean, probably nothing on your network has been compromised. And probably nothing in the future will be.
Never run:
docker compose pull
docker compose down
docker compose up -d
Right before the end of your day. Ask me how I know π
compose up will automatically recreate with newer images if the new one were pulled. so there is no need for compose down btw
Right before the end of your day
Oh, gosh, I did this last evening. I didn't check what time it was, and initiated an update on some 70 containers. I have a cron that shuts down the server in the evening, and sure enough, right in the middle of the updates, it powered off. I didn't even mess with it and went to bed. Re-initiated the update this morning, and everything is up and running. Whew!
All of your systems are set up, but are they capable of being redeployed using a configuration management software package? Ansible or something like that?
Oh. They're not. Well, that's probably okay. I mean, you could probably go manually reproduce configurations, more or less.
You have all your devices attached to a console server with a serial port console set up on the serial port, and if they support accessing the BIOS via a serial console, that enabled so that you can access that remotely, right? Either a dedicated hardware console server, or some server on your network with a multiport serial card or a USB to multiport serial adapter or something like that, right? So that if networking fails on one of those other devices, you can fire up minicom or similar on the serial console server and get into the device and fix whatever's broken?
Oh, you don't. Well, that's probably okay. I mean, you probably won't lose networking on those devices.
top 96 comments