Secrets
Cluster-level credentials—storage keys, backup encryption keys, Postgres passwords, and signing
keys—live in secrets.age, an encrypted file in your config repo. anastroctl decrypts it on
your workstation and pushes each node only the secrets its config needs.
Project secrets for machines (API keys, .env files) don’t go here—those come from
1Password.
The secrets.age bundle
Section titled “The secrets.age bundle”secrets.age maps secret paths (lowercase/with_underscores-and-dashes) to values, encrypted with
age to the keys listed in [secrets] recipients. Because it’s
ASCII-armored ciphertext, it’s safe to commit to git.
[secrets]recipients = ["age1…", "age1…"] # everyone authorized to decrypt the bundleanastroctl cluster key age # print your recipient (creates age.key)anastroctl cluster bundle init # generate built-in cluster secretsanastroctl cluster bundle set backup/encryption_key # hidden prompt or stdinopenssl rand -hex 32 | anastroctl cluster bundle set backup/encryption_keyanastroctl cluster bundle list # paths only, never valuesanastroctl cluster bundle delete old/thingConfig files reference secrets as "secret:<path>".
cluster bundle init generates every internal key that isn’t already present: Postgres passwords
(postgres/*), workspace keys (dwfs/root_key, dwfs/lease_signing_key), inference and
integration keys, the admin recovery key (auth/recovery_key), and the secret store’s KEK
(secrets/kek). Any init, set, or delete re-encrypts the bundle to the current recipients
list, so newly added recipients take effect on the next edit.
Send secrets to nodes
Section titled “Send secrets to nodes”anastroctl cluster unseal # all nodes in your active contextanastroctl cluster unseal -n cp2unseal pushes each node the secrets referenced by its config (plus HA Postgres passwords and
enabled feature keys; worker-only nodes only receive OTLP header secrets). Each node seals its
secrets to its TPM with systemd-creds under /var, injects them into services as systemd
credentials, and automatically restarts any service whose secret changed—no cluster apply needed.
- Rotating a secret: update it with
cluster bundle set, then runcluster unseal. - Adding a secret for a new config change: run
cluster unsealbeforecluster apply, because nodes reject a config referencing a secret they don’t hold yet.
Sealed nodes
Section titled “Sealed nodes”If a node’s config requires a secret it doesn’t have, it stays sealed: its node API answers
(reporting secrets failing in anastroctl node status), while all other services wait.
In a 3- or 5-node cluster, a sealed control-plane node asks its peers every 5 seconds. A peer hands
over the secrets if the requesting node’s config is signed by a trusted operator key, belongs to the
same control_plane, and is pinned to that peer’s endpoint ID. That means a replaced node unseals
itself automatically after anastroctl cluster apply.
Configs signed offline with anastroctl cluster config sign (for ANASTROCFG disks) aren’t pinned
to an endpoint ID, so peers won’t auto-unseal them—run anastroctl cluster unseal manually. Single
nodes have no peers and always unseal via unseal or bootstrap.
Rotate the keys that wrap data keys
Section titled “Rotate the keys that wrap data keys”anastroctl cluster bundle rekey --kek # secrets/kek: the cluster secret storeanastroctl cluster bundle rekey --dwfs-root # dwfs/root_key: every org's workspace keyanastroctl cluster bundle rekey --integrations # integrations/kek: GitHub, MCP servers, Linear, …anastroctl cluster bundle rekey --onepassword # onepassword/kek: 1Password service account tokensanastroctl cluster bundle rekey --inference # inference/kek: inference account credentialsEach writes a fresh key to secrets.age with the old one beside it (<key>_previous), pushes both to
every control-plane node that holds the key, waits for each node to re-wrap everything under the new
key, and drops the old one. Values only get a new wrapped data key, so nothing that compares them
sees a change. If interrupted, simply re-run it to finish, then commit the updated secrets.age.
The cluster secret store
Section titled “The cluster secret store”Control-plane nodes also run an encrypted secret store in Postgres (secretd), wrapped by
secrets/kek. Cluster admins manage it with:
anastroctl cluster secret listanastroctl cluster secret set <path> # stdin or hidden promptanastroctl cluster secret get <path> --reveal # requires recent device sign-in; auditedanastroctl cluster secret rotate <path> # generates 32 random bytes nobody seesanastroctl cluster secret delete <path>Every write, read, and reveal is audited.
Deliver store secrets to services
Section titled “Deliver store secrets to services”You can attach service consumers to a non-bootstrap secret in the cluster store so new versions deliver directly as systemd credentials:
anastroctl cluster secret set storage/workspaces/secret_access_key --consumer apidanastroctl cluster secret get storage/workspaces/secret_access_keyanastroctl cluster secret rotate storage/workspaces/secret_access_key --value--consumer(repeatable) sets the list of services receiving that secret; removing a consumer or deleting the secret removes its delivered credential.rotate --valueprompts or reads a replacement from stdin; omitting--valuegenerates 32 random bytes. Useget <path> --reveal --version <n>to inspect a retained previous version.- Nodes roll out updated credentials and restart consumers one node at a time. If a restart fails or stalls, that node holds the rollout lock until it succeeds on retry so two nodes never restart at once. (If that node is permanently lost, verify its restart job has stopped before clearing the lock—see the storage secrets validation notes.)
Bootstrap keys—Postgres passwords, DWFS keys, inference/integration keys, the recovery key, and
secrets/kek—always stay in secrets.age, and store delivery excludes secretd, keyd,
Postgres, and etcd. Keep secrets.age up to date for reinstalls and disaster recovery.
1Password
Section titled “1Password”To let orgs connect 1Password for project secrets, enable the integration in
anastro.toml:
[integrations.onepassword]enabled = trueconnect_url = "" # optional: point at an org's 1Password Connect server instead of the SDKIf your bundle predates onepassword/kek or integrations/kek, run anastroctl cluster bundle init, then cluster unseal and cluster apply. Nothing extra needs to be installed—the node image
bundles the 1Password SDK (op-sdk) alongside opd, which seals org service-account tokens.
Control-plane nodes need outbound HTTPS to *.1password.com (or your connect_url).
When disabled, 1Password settings stay hidden in the UI and org 1password commands report it’s
off.
Object storage: configure the buckets for backups and workspaces.