All projects02 / 08

Homelab platform

A self-hosted platform that watches, updates and rebuilds itself.

live2026

02live

  • Compose stacks in the registry7
  • between watchdog checks5 min
  • health gate before a rollback3 min
  • repeat reminder while open12 h

01 / Problem

Real services on one small machine

A public real-estate site, a game server and several tools run on one Ubuntu VM on a Proxmox mini PC. I wanted to hear about a failure before a user did, and not have to babysit updates, so I treated the box like a small production system with a registry of what should run.

02 / Watching

An alert only when something changes

A watchdog runs every five minutes and checks for containers that are down, unhealthy or restarting, a full disk, low memory, failed units and a pending reboot. It messages me on Telegram when the state changes and repeats after 12 hours, so the channel stays readable. It also pings an outside dead-man switch on every run, so if the VM, the power or the network goes down I still get told.

03 / The hard part

Updates that undo themselves

Once a week the updater tags the current images as a rollback point, pulls and rebuilds, and waits up to three minutes for every container to report healthy. If one does not, it restores the old images and recreates the stack. I proved the rollback on a throwaway stack first, and I keep the Minecraft server out of the weekly run because its mods have to match each game version.

04 / Result

A crash that changed the rules

A test run that opened browsers without a limit filled memory and swap and froze the whole VM for about an hour. Since then every heavy workload runs under a memory cap, and containers have limits too. The box can be rebuilt from one bootstrap script and a written recovery guide, and every service is its own git repo with a changelog.

How it works

Watched every five minutes, updated every week

Every service is a Docker Compose stack. One loop watches them, another updates them, and both end in a message to me or an automatic undo.

The same flow as a list, in order.

  1. Run: Service registry. What should be running. Goes to Watchdog.
  2. Run: Compose stacks. One stack and one git repo per service. Goes to Watchdog, Weekly updater.
  3. Check: Watchdog. Every 5 minutes: containers, disk, memory, failed units, pending reboot. Goes to Telegram alert, Dead-man switch (pings on every run).
  4. Check: Weekly updater. Tags a rollback point, pulls, rebuilds. Goes to Health gate.
  5. Decide: Telegram alert. Only when the state changes. End of the path.
  6. Decide: Dead-man switch. An outside service expects a ping on every run. End of the path.
  7. Decide: Health gate. Every container healthy within 3 minutes. Goes to Automatic rollback (if a container is not healthy).
  8. Recover: Automatic rollback. Old images restored, stack recreated. End of the path.

Stack, by layer

Platform
ProxmoxUbuntu ServerDocker Compose
Automation
systemdBashUnattended upgrades
Alerting
Telegram bothealthchecks.io dead-man switchdiun
Networking
TailscaleCloudflare Tunnel

Live from the homelabOffline

Stacks running
n/a
Uptime
n/a
CPU
n/a