Skip to content
On this page

ochk.app · Operator Runbook

Run the guardian binary on hardware you control.

The portal handles your operator-key custody and every state-changing envelope (apply, charter-sign, incident-publish, etc.). The guardian binary — the process that participates in DKG and threshold-signing with the rest of the federation — has to run on a host with a stable network address. This page is the runbook for that piece.

The operator program is not open, and there are no guardian seats yet: while the system is in testing, orangecheck holds every role (ochk.app/custody (opens in a new tab)). This runbook describes how a seat is run.

If you'd rather not manage a host, the hosted-hardware option (opens in a new tab) on the dashboard lets orangecheck run the binary on its hardware. Your operator key still stays in your browser or kit, but a hosted guardian is only as independent as orangecheck, which runs the machine.

PrerequisitesLink to this section

  • An operator key provisioned at ochk.app/me/operator (opens in a new tab) (or via oc-guardian init on the kit). You'll need the public half for the guardian's settings.
  • An accepted application — your operator_id appears in the registry at /api/operator/registry (opens in a new tab).
  • A federation membership — your operator key has signed at least one federation's charter at /me/operator/ceremonies (opens in a new tab).
  • A host. Linux, kernel ≥ 5.15, x86_64 (the image is linux/amd64 only). 4 GB RAM minimum (8 GB recommended). 80 GB SSD. Reachable on a stable IP, ideally with a DNS name. Ports 9000/tcp and 9001/tcp open to federation peers (the federation directory tells you the peer list).

01 · SettingsLink to this section

The guardian reads its settings from the environment; there is no config file. Put them in an env file on the host, say /etc/oc-guardian/guardian.env:

Shell
# /etc/oc-guardian/guardian.env: one setting per line, comments on their own line
OC_OPERATOR_ID=op-<your-id>
OC_OPERATOR_PUBKEY_HEX=<64 hex chars>
OC_FEDERATION_SLUG=<federation slug>
# bitcoin, testnet, testnet4, signet or regtest; there is no default
OC_BITCOIN_NETWORK=bitcoin
# or OC_BITCOIND_URL, OC_BITCOIND_USERNAME and OC_BITCOIND_PASSWORD
OC_ESPLORA_URL=<esplora url>
OC_PUBLIC_HOST=<the name peers reach this host at>
# keeps setup closed to other machines until DKG is done
OC_GUARDIAN_SETUP_PASSWORD=<a password>
OC_ATTESTATION_POST_URL=https://me.ochk.io/api/operator/attestation

No private key in these settings. Your operator key signs the program's envelopes in your browser or kit. fedimintd signs for the federation with its own key share, which it keeps in its data directory. Until DKG has run, whoever reaches the setup API first sets the guardian's password, so set OC_GUARDIAN_SETUP_PASSWORD, or bind the API to 127.0.0.1 until DKG is done. Every setting is listed in the kit's README (opens in a new tab).

02 · Pull the signed imageLink to this section

The guardian is shipped as a linux/amd64 Docker image (debian:bookworm-slim, with a pinned, hash-checked fedimintd). Verify its cosign signature before running. The release archives, not the image, also carry SLSA build provenance (gh attestation verify).

Shell
docker pull ghcr.io/orangecheck/oc-guardian:latest

cosign verify ghcr.io/orangecheck/oc-guardian:latest \
  --certificate-identity-regexp 'https://github.com/orangecheck/oc-guardian-kit' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

If verify fails, abort. The binary signing identity is the oc-guardian-kit GitHub Actions runner; anything else is a tampered image.

03 · RunLink to this section

Pass the settings in and keep /data on a volume. Bind 9000 (P2P) and 9001 (API) to the host's public interface (or behind a reverse proxy that terminates TLS).

Shell
docker run -d --name oc-guardian --restart unless-stopped \
  --env-file /etc/oc-guardian/guardian.env \
  -v oc-guardian-data:/data \
  -p 9000:9000 \
  -p 9001:9001 \
  ghcr.io/orangecheck/oc-guardian:latest

The image runs oc-guardian fedimintd run, which starts fedimintd, restarts it if it stops, and sends liveness reports. The container needs no operator key to run. fedimintd keeps its data in /data/fedimintd; keep that volume across upgrades.

04 · Confirm healthLink to this section

With OC_ATTESTATION_POST_URL set, the guardian posts a signed liveness report there every 300 seconds, when it has a key to sign with: your operator key, if the kit on that machine holds it, or a delegated attestation key (OC_ATTEST_KEY_HEX). Without one it runs but sends no report. Once reports arrive, /me/operator/guardians (opens in a new tab) shows Signed heartbeat, current.

These reports also date your federation, by quorum: its time is when threshold-many distinct signing keys, the keys that signed the reports, had each sent one. If fewer than that many send one for 7 days, its charter check warns; after 30 days it fails, and no project can be rebound to it until enough report again. Each machine with its own delegated attestation key counts on its own, so seats one operator runs in bootstrap can still make a quorum; whether the operators are independent is checked separately.

You can also check locally:

Shell
docker exec oc-guardian oc-guardian fedimintd status

It shows fedimintd's status and setup phase.

05 · UpgradesLink to this section

Each kit release publishes a new signed image, tagged with the release and latest. To upgrade:

Shell
docker pull ghcr.io/orangecheck/oc-guardian:latest

# verify the new image (same cosign command as step 02)

docker stop oc-guardian
docker rm oc-guardian

# re-run step 03 (the new image)

Your guardian is offline during the swap. Coordinate via the federation channel so multiple guardians don't upgrade at the same time.

06 · Leaving or replacing a guardianLink to this section

Until a key ceremony completes, the roster can still change, and a guardian who exits frees the seat for a replacement. After it completes, the seat roster is locked, a ceremony reset included: every guardian holds a key share bound to it. A guardian then leaves by an exit, and the trust posture keeps counting the share it still holds. A failed guardian is replaced by moving to a successor federation.

An exit is a signed exit-handoff envelope sent to POST /api/operator/exits, with your reason in it, and the guardians staying ratify it. It needs the charter threshold's M of them, or all of them when fewer than M stay, counted as distinct operators: one key on two staying seats is one operator and ratifies once. A seat held for an invited operator is no one staying. So before the key ceremony a lone other operator ratifies an exit alone; no key share exists yet to move. Once ratified, the charter's 14-day handover clock runs before the exit can complete. Before the key ceremony, completion counts the operators staying by key. After it, completion counts seats, since every seat staying holds a key share: with fewer than M of them it refuses with threshold_lost, and with none it refuses with sole_guardian_not_retired until the federation has moved to a successor and been retired.

Seat holders and admins, signed in, read a federation's exits at GET /api/operator/exits?federation_slug=<slug>. Each row is the exit as filed, its reason the leaver's own, with ratified_count, required, ratified_by_you and post_dkg. required is null, never 0, when the federation's threshold cannot be read: no number of ratifications moves that exit, and completion is refused while anyone stays. When no ratification can move it, the row adds unratifiable_reason: the federation's threshold cannot be read, or no other seated operator stays to ratify. Such an exit stays requested; with nobody staying, it closes at completion before the key ceremony.

TroubleshootingLink to this section

SymptomLikely causeFix
no signed heartbeat on /me/operator/guardiansOC_ATTESTATION_POST_URL unset, or no key on the host to sign reports withset the URL; keep the operator key on the host or delegate a key
Signed heartbeat, stalereports stopped, or the guardian cannot reach me.ochk.iocheck the container is running; check egress firewall
federation peers cannot reach youport 9000/9001 not opencheck ingress firewall + DNS
fedimintd run refuses to start a guardian before DKGits setup API or UI can be reached from other machinesset OC_GUARDIAN_SETUP_PASSWORD, or bind the API to 127.0.0.1 until DKG
the guardian exits at start, naming a settinga required setting is unsetset it (step 01)

Bypass noteLink to this section

This flow needs no portal: the settings are environment variables you write, and an upgrade is a new image. For every other step's kit-only equivalent, see github.com/orangecheck/oc-guardian-kit/blob/main/BYPASS.md (opens in a new tab).