KERIA + witness + signify-ts on NixOS: packaging, footprint, and the version pins matou-app runs #727

Closed
opened 2026-08-24 01:17:56 +00:00 by ben · 1 comment
Owner

Parent

Map: IDIP as a core identity alternative to kanidm (#725)

Question

The IDIP gateway stack adds KERIA, at least one witness, and a schema server; the operator app adds signify-ts. Establish: the exact versions/commits matou-app pins (Matou/matou-app package.json, docker/compose, config server); whether keripy/KERIA/witness are packaged in nixpkgs (and at what versions) or need a flake/derivation; memory/CPU/disk footprint of KERIA + witness at idle and during AID creation on a s-2vcpu-4gb-class box (the gateway floor, ADR 0038's concern); persistent-state paths (LMDB dirs) that backup must cover; and the reverse-proxy/TLS shape (Caddy vhosts for admin/boot/CESR/witness endpoints). Report what's ready vs what must be built.

## Parent Map: [IDIP as a core identity alternative to kanidm](https://git.matou.nz/Matou/idss/issues/725) (#725) ## Question The IDIP gateway stack adds KERIA, at least one witness, and a schema server; the operator app adds signify-ts. Establish: the exact versions/commits matou-app pins (`Matou/matou-app` package.json, docker/compose, config server); whether keripy/KERIA/witness are packaged in nixpkgs (and at what versions) or need a flake/derivation; memory/CPU/disk footprint of KERIA + witness at idle and during AID creation on a `s-2vcpu-4gb`-class box (the gateway floor, ADR 0038's concern); persistent-state paths (LMDB dirs) that backup must cover; and the reverse-proxy/TLS shape (Caddy vhosts for admin/boot/CESR/witness endpoints). Report what's ready vs what must be built.
Author
Owner

Research done — docs/research/2026-08-24-keria-stack-on-nixos.md on branch research/keria-stack-nixos (commit on top of 28d0dff).

  1. matou-app pins: signify-ts 0.3.0-rc2 (ESM, WASM libsodium); KERIA image weboftrust/keria:0.2.0-rc1 = keria 0.2.0rc1 / keripy 1.2.2 / py3.12, runtime-monkey-patched (matou-infrastructure/keria-patches, escrow/notification for registration); witnesses = keri-witness-demo:1.1.0 (keripy 1.1.0rc2, one kli witness demo process, the six world-shared demo AIDs, HTTP 5642–5647 + TCP 5632–5637); schema server = a 150-line Python script on 7723 (not vLEI-server); config-server on 3904 publishes admin/boot/cesr URLs + witness OOBIs. Upstream now: keripy 1.3.6, KERIA 0.4.0 (needs keri 1.2.13–<1.3), signify-ts 0.4.0 — matou is five KERIA tags behind.
  2. nixpkgs: keri, keria, hio, multicommand, signify-py, vLEI-server all absent; every other dep (pysodium 0.7.18, lmdb, blake3, falcon, hjson, cbor2, msgpack, …, libsodium, liblmdb) present. Build = 4 pure-Python buildPythonPackages (hio, multicommand, keri, keria) with pythonRelaxDeps + a NixOS module; no community flake found.
  3. Footprint (measured on the pinned images, laptop): KERIA idle ~40 MiB / ~1% CPU, peak ~105–120 MiB / one core during back-to-back inception+registry+credential; 6-witness demo process ~35–40 MiB but 5–20% CPU at idle (hio poll loop — run 1–2 witnesses, not 6). Inception w/ 3 witnesses 1.3–1.7 s, credential issue ~3 s. Disk ≈ 3 MiB LMDB per agent (member). No published sizing exists upstream. Fits s-2vcpu-4gb.
  4. Backup: the whole keripy root /usr/local/var/keri/ (adb/ agency + per-agent cf/*.json, db/, ks/, reg/, rks/, mbx/, not/, opr/, exndb/, seekdb/) and the witness's own db/ks/mbx/reg; LMDB single-writer → quiesce-then-snapshot; no member keys inside; witness state is the more precious copy.
  5. Ingress: admin 3901 / CESR 3902 / boot 3903 / witness 5642 / schema all go through Caddy 443 as subdomains of the apex (path-prefix routing breaks signify's absolute paths), exempt from the ADR 0074 browser gate (signify signs every request); boot must be gated (no auth in KERIA; 0.4.0 only has a testing-only Basic-auth flag) — invite-token forward_auth on /boot; witness TCP stays private; no new firewall ports. Gotcha: keripy opens its config read-write — a read-only config mount silently yields an empty config (KERIA 0.4.0 accepts KERIA_CURLS/IURLS/DURLS env instead).

Ready: signify-ts. Build: keri/keria derivations + module, Caddy routes, backup port, config-server replacement (schema server = Caddy file_server).

**Research done** — `docs/research/2026-08-24-keria-stack-on-nixos.md` on branch `research/keria-stack-nixos` (commit on top of `28d0dff`). 1. **matou-app pins:** signify-ts `0.3.0-rc2` (ESM, WASM libsodium); KERIA image `weboftrust/keria:0.2.0-rc1` = keria 0.2.0rc1 / keripy 1.2.2 / py3.12, **runtime-monkey-patched** (`matou-infrastructure/keria-patches`, escrow/notification for registration); witnesses = `keri-witness-demo:1.1.0` (keripy 1.1.0rc2, one `kli witness demo` process, the six world-shared demo AIDs, HTTP 5642–5647 + TCP 5632–5637); schema server = a 150-line Python script on 7723 (not vLEI-server); config-server on 3904 publishes admin/boot/cesr URLs + witness OOBIs. Upstream now: keripy 1.3.6, KERIA 0.4.0 (needs keri 1.2.13–<1.3), signify-ts 0.4.0 — matou is five KERIA tags behind. 2. **nixpkgs:** keri, keria, hio, multicommand, signify-py, vLEI-server all **absent**; every other dep (pysodium 0.7.18, lmdb, blake3, falcon, hjson, cbor2, msgpack, …, libsodium, liblmdb) **present**. Build = 4 pure-Python `buildPythonPackage`s (hio, multicommand, keri, keria) with `pythonRelaxDeps` + a NixOS module; no community flake found. 3. **Footprint (measured on the pinned images, laptop):** KERIA idle ~40 MiB / ~1% CPU, peak ~105–120 MiB / one core during back-to-back inception+registry+credential; 6-witness demo process ~35–40 MiB but **5–20% CPU at idle** (hio poll loop — run 1–2 witnesses, not 6). Inception w/ 3 witnesses 1.3–1.7 s, credential issue ~3 s. Disk ≈ 3 MiB LMDB per agent (member). No published sizing exists upstream. Fits `s-2vcpu-4gb`. 4. **Backup:** the whole keripy root `/usr/local/var/keri/` (`adb/` agency + per-agent `cf/*.json`, `db/`, `ks/`, `reg/`, `rks/`, `mbx/`, `not/`, `opr/`, `exndb/`, `seekdb/`) and the witness's own `db/ks/mbx/reg`; LMDB single-writer → quiesce-then-snapshot; no member keys inside; witness state is the more precious copy. 5. **Ingress:** admin 3901 / CESR 3902 / boot 3903 / witness 5642 / schema all go through Caddy 443 as **subdomains** of the apex (path-prefix routing breaks signify's absolute paths), exempt from the ADR 0074 browser gate (signify signs every request); **boot must be gated** (no auth in KERIA; 0.4.0 only has a testing-only Basic-auth flag) — invite-token `forward_auth` on `/boot`; witness TCP stays private; no new firewall ports. Gotcha: keripy opens its config read-write — a read-only config mount silently yields an empty config (KERIA 0.4.0 accepts `KERIA_CURLS/IURLS/DURLS` env instead). **Ready:** signify-ts. **Build:** keri/keria derivations + module, Caddy routes, backup port, config-server replacement (schema server = Caddy `file_server`).
ben closed this issue 2026-08-24 01:48:26 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#727
No description provided.