Skip to content
Emon.
All work

Case study 05

Fleet control plane for 86 on-prem servers

Designed and led a Go control plane that keeps a multi-site ERP current on 86 servers sitting behind NAT, with no one on site.

on-prem servers managed
86
on-prem servers managed
sites on the current release
83 / 88
sites on the current release
servers on the WireGuard mesh
85
servers on the WireGuard mesh

Problem

A large ERP runs on its own on-prem server at each of 88 sites (86 servers). Every update, configuration fix and support session used to need a person on site, and versions drifted apart.

Constraints

  • Sites sit behind NAT on consumer-grade links, mostly Windows boxes.
  • Updates must never interrupt work during opening hours.
  • Remote access must be audited; no shared SSH keys.
  • The application is big: 1,001 schema migrations to roll out safely.

What I built and led

  • A Go management server (68 releases) that holds desired state per site: modules, configuration and versions.
  • Per-site agents: a sidecar that pulls and applies desired state, a migrator for safe schema rollout, and a sentinel for health and alerting.
  • A CLI and an audited remote terminal that replace on-site visits and shared credentials.
  • An operator dashboard in React + TanStack Router/Query/Table with an xterm.js web terminal (45 releases).
  • dockwarden, my open-source Go container auto-updater, running on every box.

Architecture

The hub never pushes into a site. Each site joins a WireGuard mesh, and its agents pull desired state (modules, config, versions) from the control plane and converge. The sentinel reports health back. Every remote command goes through an audited terminal.

Impact

  • 88 sites live on 86 on-prem servers (70 Windows, 15 Linux), 85 of them on the mesh
  • 83 of 88 sites on the current release through automatic pull updates
  • 80 sites heartbeating in the last 24 hours (most switch off overnight)
  • 600k+ patient records and 590k+ billing records under management (a lower bound, from a 26-server sample)
  • 42 fleet-wide automation runs since Aug 2026, every remote command audited

Production figures, October 2026.

Transfers to: Edge and retail fleets, IoT, and any company running software on customer premises.

Stack

  • Go
  • WireGuard
  • Docker
  • PostgreSQL
  • S3
  • Laravel
  • React
  • TanStack