Skip to content

Deployment

Scripts

Run them from src/support. build.sh, up.sh and down.sh take any of witness, watcher and notary, or all if none is given.

Script Purpose
deploy/scripts/build.sh Build images
deploy/scripts/up.sh Build, generate secrets, start, and wire services to each other
deploy/scripts/logs.sh SERVICE Follow logs
deploy/scripts/test.sh Static checks and tests
deploy/scripts/e2e.sh End-to-end checks. Needs the keri-agent image
deploy/scripts/down.sh Stop. Keeps data
deploy/scripts/purge.sh --yes Delete keys and logs

Start witnesses before watchers, and watchers before notaries. up.sh without arguments uses this order.

Services

Service Local port
witness-0 to witness-3 7610 to 7613
watcher-0, watcher-1 7620, 7621
notary-0, notary-1 7630, 7631

deploy/.state/secrets.env holds the administration tokens, and deploy/.state/ids.env the identifiers and addresses. Both are created on first start. Services share the Docker network support, which NETWORK renames.

Containers

All services run as an unprivileged user with a read-only root file system, without capabilities, and with no-new-privileges. Only /data is writable.

Production notes

  • Run witnesses, watchers and notaries of one network with different operators, in different places.
  • Terminate TLS in front of the services or set TLS_CERT and TLS_KEY, and set PUBLIC_URL.
  • Set METRICS_TOKEN, and keep administration endpoints away from the public network.
  • Back up every seed and database. Losing a seed means losing the identity.