Prerequisites
- At least three Linux hosts with network connectivity between them. ARM hosts are supported.
- A production NATS cluster with JetStream, TLS and credentials, reachable from every host.
- A production Consul cluster reachable from every host.
gitandmkcert(or your own CA) for TLS material;ageif you encrypt identity keys.- The citadel-core binaries from Blockops, installed to
/usr/local/bin/citadel-coreand/usr/local/bin/citadel-core-cli.
Install
1
Create the service user and directories (every host)
2
Generate the peer registry (one host only)
peers.json, mapping node0, node1 and node2 to random IDs. Copy the same file to /opt/citadel-core/peers.json on every host; the registry must be identical everywhere.3
Generate the event initiator key (one host only)
event_initiator.identity.json (public key) and event_initiator.key.age (encrypted private key). The private key goes to the system that initiates MPC operations, citadel-api. The public key goes into every node’s configuration in the next step.4
Write the configuration (every host)
Copy the production template to The configuration reference explains each key.
/etc/citadel-core/config.yaml and set:nats.url,nats.username,nats.passwordand thenats.tlscertificate pathsconsul.addressand its credentialsmpc_threshold:2for a three-node clusterevent_initiator_pubkey: thepublic_keyfromevent_initiator.identity.jsonchain_code: one value generated withopenssl rand -hex 32, identical on every nodeenvironment: production
5
Register peers and generate the node identity (every host)
generate-identity writes identity/node0_identity.json and identity/node0_private.key.age. Copy every node’s *_identity.json (never the private key) into /opt/citadel-core/identity/ on every host, so each node can verify its peers.6
Install TLS certificates
Place the NATS client certificate, key and CA under
/opt/citadel-core/certs/ (client-cert.pem, client-key.pem, rootCA.pem) and reference them from nats.tls in the configuration.7
Provide the share-store password
The share store is encrypted under a password that is supplied to the service through systemd’s encrypted credentials, not written to the configuration file. Blockops’
setup-citadel-core-cred.sh prompts for the password and seals it for the unit.8
Install and start the service
Connected to badger kv store, Loaded peers from consul, [READY] Node is ready, Starting consumers.The service unit
The unit installed bysetup-config.sh runs the node as the unprivileged citadel-core user with the configuration directory read-only and the data directory writable, and applies systemd hardening:
CITADEL_CORE_NODE_NAME is set in /opt/citadel-core/.env on each host (node0, node1, node2).

