# Run a witness node — Witness-in-a-box

A witness is an outside party who fetches the ledger, checks it independently and cosigns the block headers it has verified. Witness-in-a-box makes that one command: a single zero-dependency Node file (Node 18+). No permission, account or payment is needed to witness.

Network today (live-computed): 1 registered witness · 0 confirmed unaffiliated · 2 required for finality. Counters are live-computed from the public witness record on every read. A witness counts toward finality only when confirmed unaffiliated: affiliated, unconfirmed, pending and challenged witnesses never count.

Kit SHA-256: 5ef2c53e30c927a3d7ef034375aedab7b989eace613a475fd0b943624c7682c5
Download: https://www.a2ally.com/cli/witness-in-a-box.mjs · Hash file: https://www.a2ally.com/cli/witness-in-a-box.sha256 · Manifest: https://www.a2ally.com/v1/node/kit
Verify before you install: download the kit, run sha256sum, and compare with both published values — do not run a file whose hash matches neither.

## One command

```sh
curl -sO https://www.a2ally.com/cli/witness-in-a-box.mjs && sha256sum witness-in-a-box.mjs
node witness-in-a-box.mjs keygen --key witness.pem
node witness-in-a-box.mjs register --domain <your domain>
node witness-in-a-box.mjs run --domain <your domain> --key witness.pem
```

## What's in the repo kit

Repo path: integrations/witness-in-a-box

- witness-in-a-box.mjs — the kit itself (none (zero-dependency single file))
- README.md — the full guide
- SHA256SUMS — the published hash of the artifact
- The always-on shapes below

## Always-on

- systemd: witness-in-a-box.service
- launchd: com.a2ally.witness.plist
- cron: witness.crontab
- Docker: Dockerfile plus the compose file in the kit folder

## Join in four steps

1. Download the kit and hash-compare it against both published values.
2. Make a key (`node witness-in-a-box.mjs keygen --key witness.pem`) and publish the public key at https://<your domain>/.well-known/a2ally-witness.pem.
3. Register (`node witness-in-a-box.mjs register --domain <your domain>`, POST /v1/ledger/witnesses). Guided flow: https://www.a2ally.com/witnesses/join
4. Run (`node witness-in-a-box.mjs run --domain <your domain> --key witness.pem`). Public registry: https://www.a2ally.com/witnesses

## Managed node

For customers who cannot self-host, a2ally runs the witness node for them; no price is published for a managed node and nothing is charged today — registering interest only asks for pricing news. Register founder managed-node interest at https://www.a2ally.com/pricing#pricing-interest (pick "Managed witness node" in the form, or POST /v1/pricing/interest with feature "managed_node"). Interest registered so far: 0. No price is published for a managed node and nothing is charged today.
