One dashboard for three machines
I use three machines: a Linux laptop that stays home, a work laptop, and a MacBook. I wanted one page that shows all three: CPU, memory, disk, and whether each one is online.
The parts
- Glances runs on each machine. It serves stats over HTTP on port 61208.
- Tailscale connects the machines and the VPS. Glances binds to the tailnet address only, so nothing is public.
- Homepage runs on the VPS, behind single sign-on.
- A small Python aggregator sits between them.
Why an aggregator
A laptop that sleeps should not look broken. I wanted “Offline, last seen 2 hours ago” on its card.
So the aggregator polls every machine, remembers the last good answer, and serves one JSON card per machine. Homepage reads those cards. A machine that does not answer shows as offline with its last-seen time.
Linux
Glances runs as a system service with DynamicUser=yes. systemd creates a
throwaway user for it. No real account runs the service.
Linux with SELinux
On the work laptop, the service would not start from a pipx install in my home directory. SELinux blocks systemd from running binaries in home directories.
The fix: install into /opt/pipx instead. Same package, a directory that
SELinux allows.
macOS
Glances comes from Homebrew and runs as a LaunchAgent. Two differences:
- No CPU temperature. psutil, the library that Glances uses, does not read it on macOS.
- The main disk is not
/. On modern macOS the root volume is a read-only system volume. The data lives on/System/Volumes/Data. Point the disk widget there.
The Mac sleeps a lot, so my uptime monitor does not check it. It would alert every night.
Two Homepage gotchas
- Homepage reads
settings.yamlonly at start. Restart the container after a layout change. - Widget URLs use tailnet IPs, not container names. The machines are not on the Docker network, so only the tailnet reaches them.