Quickstart
Start by downloading and verifying the Linux x86-64 archive. Run these commands from the extracted knock-linux-amd64 directory or a source checkout built with make build.
1. Initialize and fund identities
Section titled “1. Initialize and fund identities”Create encrypted identity profiles in 0700 directories for each actor: owner, Door, approver, and requester (plus an optional auditor).
bin/knock --profile owner.age identity initbin/knock --profile door.age identity initbin/knock --profile approver.age identity initbin/knock --profile requester.age identity initEach command prints a qor1... address. Fund each address with test QOR from the Diana faucet, then register its ML-DSA-87 signing key and ML-KEM-1024 recipient key on Diana:
bin/knock --profile owner.age identity registerbin/knock --profile door.age identity registerbin/knock --profile approver.age identity registerbin/knock --profile requester.age identity register2. Select the Diana registry
Section titled “2. Select the Diana registry”Use the shared KnockRegistry on Diana. The included configuration pins its address and bytecode hash.
cp deploy/network.diana.json network.jsonTo deploy your own registry, follow the deployment instructions in the README, then use the generated network.json for the remaining steps.
3. Configure and register an Approval Door
Section titled “3. Configure and register an Approval Door”Copy deploy/door.example.json to door.json. Fill in:
registryfromnetwork.json- A random 32-byte
doorId(0x$(openssl rand -hex 32)) owner,account(Door address),ownerProfile, anddoorProfileapproverssorted in ascending order of EVM address byteswireGuardEndpointreachable from the requestermailboxorigin andstatepath (on a0700directory)
Commit policy version 1 on Diana and publish the signed Door Card:
bin/knockd register --config door.jsonDoor Cards expire after 24 hours. Copy network.json and the generated cards/ directory to the requester and approver machines, then have the requester verify and save the Door account as a local alias:
bin/knock --network network.json --cards cards door trust qor1door... --alias validator-opsbin/knock --network network.json --cards cards door show validator-ops4. Start the Mailbox and Door
Section titled “4. Start the Mailbox and Door”Start the opaque Mailbox relay on loopback (for separate machines, tunnel via SSH or place behind an HTTPS reverse proxy matching --origin):
bin/knockd mailbox --state "$HOME/.config/knock/mailbox/mailbox.db"On the Door host (see Host setup for systemd unit installation and knockssh slot creation), start knockd serve. Have the approver publish their recipient card to the Mailbox:
bin/knock --profile approver.age --mailbox http://127.0.0.1:8180 identity publish5. Request, approve, and revoke SSH access
Section titled “5. Request, approve, and revoke SSH access”The requester submits an encrypted request (--reason - prompts privately so the reason stays out of shell history):
bin/knock --profile requester.age --network network.json --cards cards \ validator-ops --ssh --role logs --for 5m --reason -In a separate terminal, the approver lists verified requests, inspects the intent, and grants or denies the exact scope:
bin/knock --profile approver.age --network network.json --cards cards \ --mailbox http://127.0.0.1:8180 requests listbin/knock --profile approver.age --network network.json --cards cards \ --mailbox http://127.0.0.1:8180 requests show "$request_id"bin/knock --profile approver.age --network network.json --cards cards \ --mailbox http://127.0.0.1:8180 approve "$request_id"Once the Door verifies the Entry Pass, it provisions the WireGuard peer, timed nftables permit, OpenSSH certificate, and systemd unit, then seals connection details to the requester’s ephemeral reply key. The requester connects straight into the logs menu (status, help, quit).
To end an active session early, publish a revocation on Diana and wait for confirmed host cleanup:
bin/knock --profile approver.age --network network.json --cards cards \ --mailbox http://127.0.0.1:8180 sessions list --door validator-opsbin/knock --profile approver.age --network network.json --cards cards \ revoke --door validator-ops "$session_id"bin/knock --profile approver.age --network network.json --cards cards \ --mailbox http://127.0.0.1:8180 sessions show --door validator-ops "$session_id"6. Run the local operator console
Section titled “6. Run the local operator console”Approvers, owners, and auditors can also review requests, active sessions, and decrypted receipts in a local browser:
bin/knock --profile approver.age --network network.json --cards cards consoleUnlock the profile in the terminal and open the printed one-time loopback URL. Press Ctrl+C in the terminal to stop the console.
7. Try a Metered Door
Section titled “7. Try a Metered Door”Configure a second Door from deploy/door.metered.example.json (roles: [], approvers: [], approversCanRevoke: false, maxDurationSeconds <= 3600, and an offer with unique 32-byte id, lowercase service, positive priceUqor where 1 test QOR = 1,000,000 uqor, and beneficiary).
Trust the metered Door, request a paid pass, and reconcile interrupted purchases if needed:
bin/knock --network network.json --cards cards door trust qor1metered... --alias private-statusbin/knock --profile requester.age --network network.json --cards cards \ private-status --tunnel --pay 2mbin/knock --profile requester.age payment show "$pass_reference"