Bothy

A console for one machine that asks Docker what is running

A self-hosted console for a single machine. It reports containers, ports, routes, metrics and files by asking Docker directly, so what it shows is what is actually running. Release notes and engineering notes.

A console for one machine is normally a hand-written list, so it is wrong from the first container that moves and nobody notices until it matters. And every project on the same box ends up re-solving the pieces it does not ship: an edge, identity, observability, a shared database, backups.

One person's reproducible development box, in git: the console, the compose stacks beneath it, and the CI that clones the repository into an empty directory on every pull request and runs every suite in the tree against whatever came up.

Start any container and it appears in the console within ten seconds with no edit to Bothy; stop it and its dot goes red just as fast. Fifty routers require a role across five files, and the tables that say so are asserted against the YAML row by row rather than written by hand — the README once enumerated fourteen routers when the tree held forty-eight.

Worth knowing

  • Every card is discovered, never configured
  • Each PR bootstraps the whole stack from empty and runs every suite
  • Secrets generated at install; names logged, values never
  • 125 merged pull requests

Decisions worth defending

The security boundary is the Traefik rule, not the socket proxy's configuration.

docker-socket-proxy gates by endpoint family, so CONTAINERS=1 also permits /containers/{id}/json — whose body contains every container's environment, which is to say real passwords. What actually prevents that is the router, where every rule is an exact Path() and exactly two Docker endpoints are routed. Widening it to a prefix would open the rest silently.

There is no exec, and that is a deliberate regression.

No shell in the browser, no kill, no create, no image or volume management. docker exec is root on the box, so EXEC: 0 is written out explicitly on all three socket proxies rather than left to a default, the verb list is a literal three-element tuple that is never derived from the handlers, and a check asserts both. Portainer did offer it, and was deleted; the replacement is docker exec over Tailscale SSH.

One function owns the walk, so the security check is not something a caller has to remember.

The file API's safepath.collect() is the only way the application can learn a set of paths, so a new endpoint inherits the deny rules by calling it rather than by its author remembering them. That was learned twice: a listing doing its own walk paid for 30,093 refused files to serve 3,474, and when full-text search arrived the same shortcut would have returned a matching line out of .env with the deny-list still technically correct.

Built with

  • React 19
  • TypeScript
  • Docker Compose
  • Traefik v3.7
  • Keycloak
  • VictoriaMetrics
  • Grafana
  • Tailscale

Bothy · Notes

Elsewhere

  • WindoM — Every new tab becomes a dashboard
  • Portfolio site — This site: a portfolio and notes in English and Hebrew, with its own admin
  • oci-free — The free-tier ARM VM this site runs on, as code
  • Programming with Yehuda — Lesson pages built while learning React and Node
  • Icaros — A car-listing web app, built while learning React and Node
  • AI — Learning notes on how models train, evaluate and serve.
  • Pipelines and Optimization — Measure first, then make it faster and cheaper.
  • Systems and Networking — Linux, containers, storage and the wire.
  • Thoughts — Lessons from building things, written down.

All projects · Notes