Commit 54a254596a
Verified · cmc
Layout: unified · split
content/blog/2026-06-26-homelab-maintenance.org added +99
| @@ -0,0 +1,99 @@ | ||
| 1 | #+date: [2026-06-26 Fri 23:01:11] | |
| 2 | #+title: I Don't Maintain My Homelab | |
| 3 | #+description: I don't maintain my homelab... it maintains itself. | |
| 4 | #+slug: homelab-maintenance | |
| 5 | #+filetags: :self-hosting: | |
| 6 | ||
| 7 | It's true. I *don't* maintain my homelab... it maintains itself. | |
| 8 | ||
| 9 | Have I reached nirvana? Is this the ultimate goal of homelabbers? It seems | |
| 10 | that I've somehow automated myself out of a job (hobby?) by building a resilient | |
| 11 | homelab. | |
| 12 | ||
| 13 | Let's figure out where it all went "wrong". | |
| 14 | ||
| 15 | * Infrastructure | |
| 16 | ** Server | |
| 17 | I have used a few different servers over the years, but have since consolidated | |
| 18 | all of my services onto a single server ([[https://cleberg.net/blog/server-build.html][build guide here]]), reducing the | |
| 19 | complexity of my environment. | |
| 20 | ||
| 21 | Because of the single-server setup, maintenance is down 75% (from four | |
| 22 | servers to one). Yes, clusters and hypervisors and hybrid cloud solutions are | |
| 23 | shiny and fancy and popular, but I just don't care for it. Instead, I have a | |
| 24 | single metal box I can pick up with my hands sitting in my basement. | |
| 25 | ||
| 26 | I /do/ have one more "server": a Raspberry Pi 4, but it uses Home Assistant OS, | |
| 27 | updates itself, and requires literally *zero* maintenance. Is that really a | |
| 28 | server? I guess, by technical definition. But it certainly doesn't feel like it; | |
| 29 | it feels like I've turned a potential server device into a self-sustaining IoT | |
| 30 | device instead. | |
| 31 | ||
| 32 | ** Network | |
| 33 | Aside from the server itself, I have a mini rack of UniFi gear (server is in the | |
| 34 | same rack). A UniFi Dream Machine Pro, a switch, and a couple of access points | |
| 35 | (APs) constitute my personal data center sitting in my basement. | |
| 36 | ||
| 37 | Again, it really just maintains itself. UniFi supports automatic and scheduled | |
| 38 | updates, allowing you to disconnect from any manual maintenance of the hardware. | |
| 39 | UniFi truly is a "set it and forget it" platform. | |
| 40 | ||
| 41 | * Software | |
| 42 | ||
| 43 | There's a single crontab line on my server, which runs all updates for my Docker | |
| 44 | services on a weekly basis. | |
| 45 | ||
| 46 | #+begin_src | |
| 47 | 0 0 * * 0 docker-update | |
| 48 | #+end_src | |
| 49 | ||
| 50 | I do run a few crontab schedules via the =root= user as well, to account for | |
| 51 | permission issues. These jobs are really just for backups, to be honest. I've | |
| 52 | never required a backup, but it's good to be safe. | |
| 53 | ||
| 54 | #+begin_src | |
| 55 | # Generate a daily system report | |
| 56 | 0 8 * * * /home/cmc/daily_sys_report.sh | |
| 57 | ||
| 58 | # Backup | |
| 59 | SHELL=/bin/bash | |
| 60 | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
| 61 | ||
| 62 | ## App-aware database dumps | |
| 63 | 45 1 * * * mkdir -p /tank/cloud/server/backups/immich && sudo docker exec -t immich_postgres pg_dumpall -U postgres > /tank/cloud/server/backups/immich/immich-postgres-$(date +\%F).sql | |
| 64 | 50 1 * * * mkdir -p /tank/cloud/server/backups/piped && sudo docker exec -t piped-postgres pg_dumpall -U piped > /tank/cloud/server/backups/piped/piped-postgres-$(date +\%F).sql | |
| 65 | ||
| 66 | ## Backup files to ZFS pool | |
| 67 | 0 2 * * * rsync -aHAX --delete /var/lib/plexmediaserver/ /tank/cloud/plexmediaserver/ | |
| 68 | 5 2 * * * rsync -aHAX --delete /var/www/ /tank/cloud/server/web_server/ | |
| 69 | 10 2 * * * rsync -aHAX --delete /etc/nginx/ /tank/cloud/server/nginx/ | |
| 70 | 15 2 * * * rsync -aHAX --delete --exclude='**/postgres/' --exclude='**/postgresql/' --exclude='**/mysql/' --exclude='**/mariadb/' --exclude='**/redis/' --exclude='**/valkey/' --exclude='**/database/' --exclude='**/cache/' --exclude='**/tmp/' --exclude='**/logs/' /home/cmc/docker/ /tank/cloud/server/docker/ | |
| 71 | 20 2 * * * rsync -aHAX --delete /home/cmc/.ssh/ /tank/cloud/server/ssh/ | |
| 72 | #+end_src | |
| 73 | ||
| 74 | Aside from this, the only other required updates are running =apt update= and | |
| 75 | potentially restarting. This requires about 60 seconds of time whenever I want | |
| 76 | to do it. | |
| 77 | ||
| 78 | #+begin_src sh | |
| 79 | sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y | |
| 80 | #+end_src | |
| 81 | ||
| 82 | * The Outcome | |
| 83 | ||
| 84 | So, what's the end result? I've approximated it somewhere around /15 minutes of | |
| 85 | maintenance per month/, barring an emergency. | |
| 86 | ||
| 87 | If that's normal to you, congrats - you've peaked in life. However, that's | |
| 88 | *absolutely absurd* to me. I used to spend days on end building, maintaining, and | |
| 89 | debugging various aspects of my servers, databases, apps, etc. | |
| 90 | ||
| 91 | You know what's even crazier? If I don't have 15 minutes in a month to =ssh= into | |
| 92 | my server and update things, it literally does not affect anything. I could | |
| 93 | probably go 6 months (maybe more?) without touching it and it wouldn't break. | |
| 94 | ||
| 95 | /(This is not a challenge, please don't break my server.)/ | |
| 96 | ||
| 97 | What a great situation to be in - especially for someone who's become as busy in | |
| 98 | their career as I have. I feel like I've struck a fantastic balance between | |
| 99 | privacy, security, and convenience. | |