← 返回日报
精读 预计 2 分钟

I Don't Maintain My Homelab

摘要

作者表示自己不再手动维护 homelab,而是让其自动维护。基础设施部分使用单台服务器(支持 build guide),降低复杂度 70% 以上,并额外配备 Raspberry Pi 4 运行 Home Assistant OS,更新自动且维护零成本。网络采用 UniFi Dream Machine Pro、交换机及接入点,支持自动和计划更新,实现 set it and forget it 平台。软件方面仅依赖服务器 crontab 一行每周运行 Docker 服务更新,同时通过 root 用户 crontab 处理备份;系统更新则用 apt update 并重启(约 60 秒)。结果是每月大约 15 分钟维护(无突发情况),如果没时间甚至可六个月不碰也不影响,平衡了隐私、安全和便利。

荐读理由

照他单金属箱+UniFi Dream Machine Pro+Raspberry Pi 4 搭建的自动化 homelab,结合每周 crontab 跑 Docker 服务更新、apt update,月均维护仅 15 分钟即可完成——直接复制到我的 AI 工程项目上,省掉日常调试时间。

原文

2026-06-26

I Don't Maintain My Homelab

I don't maintain my homelab... it maintains itself.

Table of Contents

    1. Infrastructure
    • 1.1. Server

    • 1.2. Network

    1. Software
    1. The Outcome

It's true. I don't maintain my homelab… it maintains itself.

Have I reached nirvana? Is this the ultimate goal of homelabbers? It seems that I've somehow automated myself out of a job (hobby?) by building a resilient homelab.

Let's figure out where it all went "wrong".

1. Infrastructure

1.1. Server

I have used a few different servers over the years, but have since consolidated all of my services onto a single server (build guide here), reducing the complexity of my environment.

Because of the single-server setup, maintenance is down 75% (from four servers to one). Yes, clusters and hypervisors and hybrid cloud solutions are shiny and fancy and popular, but I just don't care for it. Instead, I have a single metal box I can pick up with my hands sitting in my basement.

I do have one more "server": a Raspberry Pi 4, but it uses Home Assistant OS, updates itself, and requires literally zero maintenance. Is that really a server? I guess, by technical definition. But it certainly doesn't feel like it; it feels like I've turned a potential server device into a self-sustaining IoT device instead.

1.2. Network

Aside from the server itself, I have a mini rack of UniFi gear (server is in the same rack). A UniFi Dream Machine Pro, a switch, and a couple of access points (APs) constitute my personal data center sitting in my basement.

Again, it really just maintains itself. UniFi supports automatic and scheduled updates, allowing you to disconnect from any manual maintenance of the hardware. UniFi truly is a "set it and forget it" platform.

2. Software

There's a single crontab line on my server, which runs all updates for my Docker services on a weekly basis.

0 0 * * 0 docker-update

Which is an alias for:

for d in ~/docker/*/; do (cd "$d" && sudo docker compose pull && sudo docker compose up -d); done

I do run a few crontab schedules via the root user as well, to account for permission issues. These jobs are really just for backups, to be honest. I've never required a backup, but it's good to be safe.

# Generate a daily system report
0 8 * * * /home/cmc/daily_sys_report.sh

# Backup
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

## App-aware database dumps
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
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

## Backup files to ZFS pool
0 2 * * * rsync -aHAX --delete /var/lib/plexmediaserver/ /tank/cloud/plexmediaserver/
5 2 * * * rsync -aHAX --delete /var/www/ /tank/cloud/server/web_server/
10 2 * * * rsync -aHAX --delete /etc/nginx/ /tank/cloud/server/nginx/
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/
20 2 * * * rsync -aHAX --delete /home/cmc/.ssh/ /tank/cloud/server/ssh/

Aside from this, the only other required updates are running apt update and potentially restarting. This requires about 60 seconds of time whenever I want to do it.

sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y

3. The Outcome

So, what's the end result? I've approximated it somewhere around 15 minutes of maintenance per month, barring an emergency.

If that's normal to you, congrats - you've peaked in life. However, that's absolutely absurd to me. I used to spend days on end building, maintaining, and debugging various aspects of my servers, databases, apps, etc.

You know what's even crazier? If I don't have 15 minutes in a month to ssh into my server and update things, it literally does not affect anything. I could probably go 6 months (maybe more?) without touching it and it wouldn't break.

(This is not a challenge, please don't break my server.)

What a great situation to be in - especially for someone who's become as busy in their career as I have. I feel like I've struck a fantastic balance between privacy, security, and convenience.

Reply via email →

Lobsters · 2 赞 · 0 评 讨论 → 阅读原文 →

这条对你有帮助吗?