Skip to content

Web UI

moira ui serves a web app from the client binary on your own machine. It does everything the CLI does: a board across hosts, actions with live output, logs, and the env editor. The layout works on phone-sized screens.

Terminal window
moira ui # prints a one-time login URL
moira ui --open # opens it in your browser
moira ui --port 7450
http://127.83.17.201:7444/login?code=…
  • The login URL works once and expires after two minutes. Press Enter in the terminal to print a fresh one, for example for a second browser.
  • The port defaults to ui.port in the client config (7444).
  • Stop it with Ctrl-C. Sessions end with the process.
  • Board (/): summary counts and one card per host, with services grouped by stack: state, health, image tag, uptime, drift and locks. Each row has a menu with actions, logs, hide and pin. Unreachable hosts stay visible. It refreshes every five seconds while the tab is visible. ?all=1 includes hidden rows; ?unmanaged=1 or ?unmanaged=0 overrides showUnmanaged.
  • Stack: services and actions, Compose warnings, env files and the services that use them, the read-only Compose file, and RUNBOOK.md if the stack has one.
  • Logs: tail, time bounds, follow, timestamps, stream selection and case-insensitive text search, plus a download of the filtered (non-follow) logs.
  • Jobs: actions open a drawer with live output. Each job also has a standalone page.
  • Env editor: masked values, reveal one key at a time, staged edits, masked review, Save or Save & Apply, history with diffs and restore, and a reconcile view for concurrent edits.

Every stack action, and update, apply and stop on a single target, asks for confirmation.

moira ui holds the tokens for every host, so access is locked to you:

  • It listens on loopback only. On Linux it picks a random 127.x.y.z address per process.
  • The Host header must match that address, which blocks DNS rebinding.
  • Every non-GET request must carry the UI’s own Origin, which blocks cross-site requests.
  • A session needs the single-use login code; the cookie is HttpOnly and SameSite=Strict.
  • Responses send a strict CSP, no CORS headers, and Cache-Control: no-store.
  • Env values appear only after an explicit reveal or in the raw editor. Board pages, reviews and history diffs contain none.

Keep the printed login URL private. Other processes running as your OS user can already read your client config, so the UI doesn’t try to defend against them.