Homelab & Server Portal
LiveA self-hosted infrastructure I run and secure myself: three servers across two sites, services reachable only over a Tailscale zero-trust network, containers with dropped capabilities, tested restic backups, and a monitoring portal I wrote that tracks health, updates, SMART disk wear, TLS expiry and storage growth.
The problem
I run more than a website. Between home and a small campus I look after a handful of machines that carry real data: a family photo library, scanned paperwork, file sync, and several live web applications. Each one is easy to set up and easy to forget, and the forgetting is where the damage comes from.
The failures I was worried about were quiet ones. A disk that reports reallocated sectors for months before it dies. A backup job that stops running and says nothing. A certificate that expires on a Sunday. A security update that has been waiting three weeks for a reboot. A new device on the network that nobody noticed.
Commercial tools cover this, but they assume a fleet, a subscription or an open inbound port, and I wanted none of those. I wanted a small, boring, private system that I fully understand, that is reachable only by me, and that tells me when something needs attention instead of making me go looking.
What I built
Two things, built together: the infrastructure and a portal that watches it.

The infrastructure
- Three servers across two sites. One main application host, one dedicated backup target, and one web host. They are small business-class mini PCs chosen for low power use, bought second-hand and upgraded where it mattered.
- Private by default. Services such as photo management, document archiving and file sync are reachable only over a Tailscale network. Nothing is exposed with an open port. Public websites go out through a Cloudflare tunnel, so no inbound ports are needed for them either.
- Hardened containers. Everything runs in Docker with dropped Linux capabilities,
no-new-privileges, read-only filesystems and resource limits. Web applications live on their own isolated network, separate from the private services. - Tested backups. Encrypted, deduplicated restic snapshots go to a separate machine, with database dumps taken first. Retention is pruned weekly, and I have actually restored from the repository rather than trusting that it works.
- Always-on by design. BIOS and OS power settings are set so the machines run 24/7 and come back by themselves after a power cut.
The server portal
A web app I wrote for myself, in Python, that turns all of the above into one screen I can read in ten seconds:

- Inventory and diagram. Every server and network device with its hardware, photo and location, plus a live network diagram with a 2D and a 3D mode and rotatable 3D device models.
- Health and history. Current CPU, memory, disk and temperature, with charts back to 30 days, plus SMART disk health and power draw.
- Alerts for the quiet failures. Disk wear and reallocated sectors, storage that will be full within two weeks, a backup that is failed or overdue, security updates waiting, reboots pending, TLS certificates close to expiry, and a service that stops answering.
- Network sanity checks. Duplicate IP addresses, overlapping subnets, addresses outside their subnet, and Tailscale devices that are not in the inventory.
- Backups page. Each job's last result, size, duration and age, so a silent failure shows up as "overdue".
How it works
The portal is a FastAPI application with server-rendered pages, a SQLite database and no external dependencies at runtime. It runs in a hardened container (read-only filesystem, non-root user) on the private network and is reached only over Tailscale, behind its own login.
Where the data comes from
- Beszel supplies live system stats and multi-resolution history. The portal reads its database read-only, so it cannot change anything.
- A small collector runs as a systemd service on each host. It gathers what Beszel does not: SMART data, power draw, filesystem use, pending updates, reboot-required state, and the Tailscale device list. It posts them to the portal with a per-server bearer token. The portal never logs in to a server, so a compromised portal cannot reach into the machines.
- Backup runs are reported by a wrapper around restic, which records the result, size and duration of each job.
- Service checks probe each URL every five minutes, recording status, latency and the certificate's expiry date.
Design decisions
- Pull and report, never push commands. Hosts report in; the portal does not control them. That keeps the blast radius small.
- Alerts on conditions, not on noise. A service must fail twice in a row before it is called down, and warnings have separate thresholds from critical alerts (for example a certificate at 14 days versus 5).
- Trends, not just snapshots. A least-squares fit over 30 days of disk usage gives a "full in N days" forecast, which matters far more than "72% used".
What I learned
Monitor from where the user is, not from where the monitor is. Services reachable only over Tailscale could not be probed from inside the portal's own container, because Tailscale Serve does not open an ordinary network socket on the host. My first version reported them as down. The fix was to let the collector on the host probe them and report back, and to show anything it cannot reach as "not checked" instead of "down". A false alarm costs trust faster than a missed one.
Refused is not the same as down. When I tightened the firewall, timeouts turned into "connection refused", and the portal started counting that as an outage. I caught it before any alert fired, but it taught me to test the failure modes of a checker as carefully as its happy path.
Overlapping networks are a real hazard. Two sites ended up using the same private subnet, and two devices shared an address. Nothing broke, but it would have, as soon as I routed between them. That is now a check the portal runs, not something I rely on remembering.
A backup is a restore. I treated the backup as unproven until I restored from it. I also added weekly pruning and measured the backup time separately, so that housekeeping does not look like a slow backup.
Decommissioning is part of the design. When I retired an old server I removed it from monitoring, access keys, the tunnel and the inventory, and kept its backup history. Leaving a dead host on the list is how stale credentials survive.
What I would do next: alert delivery by push notification, a documented one-page rebuild runbook for each server (the main one already has one), and Tailscale access rules scoped per device.