Client configuration
All client state lives in one file: ~/.config/moira/config.json (or
$XDG_CONFIG_HOME/moira/config.json), mode 600. Commands edit it for you; you rarely need to
open it.
{ "servers": { "edge": { "url": "https://192.0.2.10:7443", "fp": "sha256:…", "token": "moira_…" }, "nas": { "url": "https://192.0.2.20:7443", "fp": "sha256:…", "token": "moira_…" } }, "pins": { "shop-prod": "edge" }, "hidden": ["nas/shop-migrate"], "showUnmanaged": false, "ui": { "port": 7444 }}| Field | Meaning | Set by |
|---|---|---|
servers.<host>.url |
The daemon URL from the invite | server add |
servers.<host>.fp |
The pinned certificate SHA-256 | server add |
servers.<host>.token |
This client’s bearer token | server add |
pins |
Bare name → host | pin, unpin, web UI |
hidden |
Exact host/container selectors left out of ls and the board |
hide, show, web UI |
showUnmanaged |
Show unmanaged containers by default | edit by hand |
ui.port |
Default port for moira ui |
edit by hand |
- Server keys are the host names from the invites (or the
--namealias). They are the prefixes in targets. - The file holds every daemon token. Keep it private; anyone who can read it controls those hosts.
- Each machine enrolls separately. Pins and hidden lists are not synced.
- Writers take
config.json.lock, reload the latest file, and replace it atomically, so the CLI and a runningmoira uican change it at the same time.
Completion cache
Section titled “Completion cache”Shell completion reads targets from ${XDG_CACHE_HOME:-~/.cache}/moira/index/<host>.json.
moira ls and target resolution refresh these files, and server rm deletes them. They contain
only host-qualified target names. Commands never read them, so a stale cache only affects
suggestions.
Transport
Section titled “Transport”- Each server gets its own HTTPS connection pool that pins
fpand fails closed. The pin, the certificate SAN and its validity dates are checked before any HTTP bytes are sent. - Redirects are never followed.
- List calls go to every server in parallel with a 2-second timeout. A slow server is reported as unreachable and doesn’t hold up the others.
- The client refuses a daemon with a different API major version and warns when the daemon’s minor version is newer.