The config repo
Your cluster’s entire configuration lives in one git repository: a shared anastro.toml, one short
file per node, and an encrypted secrets.age bundle. Every config key is documented in the
configuration reference.
Layout
Section titled “Layout”prod/ # your config repo├── anastro.toml # cluster-wide config├── nodes/│ ├── cp1.toml # one file per node│ ├── cp2.toml│ ├── cp3.toml│ └── w1.toml└── secrets.age # age-encrypted secrets bundle (safe to commit)Start from anastroctl cluster init (single node) or copy examples/prod from the Anastro repo.
Config files never contain raw secrets—credential fields take references like
"secret:storage/backups/access_key_id", and literal values are rejected.
anastroctl reads the config repo from the current directory, or from -C <dir>.
Your keys
Section titled “Your keys”anastroctl stores your personal keys in ~/.config/anastro/. Back them up and never commit them.
| File | Command to inspect / create | Purpose |
|---|---|---|
operator.key |
anastroctl cluster key operator |
Signs configs and releases; admin access to every node API |
age.key |
anastroctl cluster key age |
Decrypts secrets.age |
device.key |
anastroctl account device id |
Authenticates this computer to the cluster API |
anastro.toml
Section titled “anastro.toml”The core cluster settings:
[cluster]name = "prod"id = "c_prod" # stable cluster ID; immutable after installcontrol_plane = ["cp1", "cp2", "cp3"] # 1, 3, or 5 node namesoperator_keys = ["GENERATE_WITH_ANASTROCTL_CLUSTER_KEY_OPERATOR"]
[network.private]cidr = "10.10.0.0/24" # private LAN for Postgres, etcd, and relays
[postgres]mode = "auto" # single for 1 node, ha for 3 or 5max_connections = 200
[iroh]run_relay = true # each control-plane node runs a relay
[secrets]recipients = ["age1…"] # output of `anastroctl cluster key age`Other sections have dedicated guides:
| Section | Guide |
|---|---|
[storage.<name>], [filesystem] |
Object storage |
[backup] |
Backups |
[secrets], [integrations.onepassword] |
Secrets |
[iroh], [network.private], [cloudflare] |
Networking |
[machines.drain] |
Hosts |
[machines.package_firewall] |
Package firewall |
[observability] |
Observability |
Node files
Section titled “Node files”Each nodes/<name>.toml describes one server. Run anastroctl node inspect <ticket> while the
node is in maintenance mode to get its disk IDs and MAC addresses
(Install nodes).
[node]name = "cp1"roles = ["controlplane"] # add "worker" for machines, "storage" for in-cluster Garageinstall_disk = "/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_S6Z1NJ0W123456"
[[node.network.interfaces]]match = { mac = "a8:a1:59:12:34:56" } # or { name = "eno1" }dhcp = falseaddresses = ["10.10.0.11/24"]gateway = "10.10.0.1"dns = ["1.1.1.1"]
[node.iroh]relay_url = "http://10.10.0.11:3340" # this node's own relay
[node.boot]secure_boot = trueEach node runs anastro.toml merged with its own file (node values win). Every node discovers the
control plane’s private IPs from the first address on each control-plane node’s first interface, so
always assign static IPs there on multi-node clusters. Unconfigured interfaces default to DHCP. For
[node.worker] options, see Hosts.
Validate and preview
Section titled “Validate and preview”anastroctl cluster validate # schema and cross-field checks across the repoanastroctl cluster config render -n cp1 # preview the merged config for cp1anastroctl cluster config get -n cp1 # inspect what cp1 is currently runningvalidate checks syntax, odd control-plane counts, store references, bucket isolation, and relay
URLs. Secret presence is checked by nodes when you apply.
Apply changes
Section titled “Apply changes”anastroctl cluster apply signs each node’s merged config with your operator key and rolls it out
one node at a time, updating the Postgres primary last. Omit -n to apply to every node in your
active context.
anastroctl cluster apply --dry-run # diff each node and show how changes take effectanastroctl cluster apply # apply live and restart changesanastroctl cluster apply -n cp2 --reboot # also allow changes requiring a rebootEvery node validates its config before anything is applied—if one node would reject it, the rollout aborts cleanly. Each changed field falls into one of four apply modes:
| Mode | Examples | Behavior |
|---|---|---|
live |
backup, storage, observability, machines, node.worker, cluster.operator_keys |
Applied in place without restarting Postgres or rebooting |
restart |
postgres.max_connections, postgres.memory, postgres.settings |
Rolling service restart (in HA, replicas first, then switchover) |
reboot |
node.network, node.boot, and anything else |
Refused unless --reboot is passed |
immutable |
cluster.id, cluster.name, cluster.control_plane, postgres.mode, node.name, node.install_disk |
Always refused on a running cluster |
With --reboot, each affected worker is drained before rebooting and uncordoned once healthy
(Hosts). Pass --allow-stop if you want machines that can’t live-move to stop
instead of pausing the rollout.
If a node rejects the config because a referenced secret is missing, run
anastroctl cluster unseal first (Secrets).
Signing and key rotation: nodes only accept configs signed by a key in their current
cluster.operator_keys, and reject configs older than the one they already run. To rotate an
operator key, add the new key and apply with the old key, then remove the old key and apply with
the new one.
Who may change what
Section titled “Who may change what”Keep operator keys with humans (ideally on hardware keys) since they can change anything. Give CI two narrower keys instead:
- Deploy key: applies safe operational tuning on push, cordons/drains hosts during rollouts, and rolls out releases already signed by an operator key. Its allowed fields are hardcoded in Anastro—nodes reject any config it signs that touches anything else.
- Plan key: read-only access to diff running configs on pull requests.
| Key | Allowed changes |
|---|---|
| Deploy key (CI) | [upgrade] (except image), [upgrade.download], [filesystem.gc], [filesystem.repack], [filesystem.leases], [backup.policy], [machines.drain] |
| Plan key (CI) | None (read-only) |
| Operator key (human) | Everything |
Generate the CI keys and add their public halves to anastro.toml:
anastroctl cluster key deploy # prints public key for cluster.deploy_keysanastroctl cluster key plan # prints public key for cluster.plan_keysanastroctl cluster key deploy --secret # prints hex secret for CI's secret store[cluster]operator_keys = ["3b6a27bc…"]deploy_keys = ["9f1c04aa…"]plan_keys = ["5d2e8b10…"]Apply that change with your operator key once. Then CI runs with ANASTRO_DEPLOY_KEY (or
--deploy-key <file>) and ANASTRO_PLAN_KEY (or --plan-key <file>). Every --dry-run tells you
per node whether a deploy key is sufficient or a human operator key is required.
Example GitHub Actions workflow using a protected production environment (requiring a reviewer so
a modified workflow can’t silently use the deploy key):
on: pull_request: push: branches: [main]jobs: plan: if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: anastroctl cluster apply --dry-run --anastroconfig anastro-client.toml env: ANASTRO_PLAN_KEY: ${{ secrets.ANASTRO_PLAN_KEY }} apply: if: github.event_name == 'push' runs-on: ubuntu-latest environment: production steps: - uses: actions/checkout@v4 - run: anastroctl cluster apply --anastroconfig anastro-client.toml env: ANASTRO_DEPLOY_KEY: ${{ secrets.ANASTRO_DEPLOY_KEY }}Commit anastro-client.toml alongside the repo (it holds only node IDs and addresses, no secrets),
and install anastroctl on the runner. Fork pull requests don’t receive secrets, so they won’t run
plan.
The client file
Section titled “The client file”anastroctl locates your cluster’s nodes through ~/.config/anastro/config.toml (override with
--anastroconfig or ANASTROCONFIG). Add the node entries printed by
anastroctl cluster apply -n <node> --maintenance <ticket>, including worker-only nodes so apply
can pin every node’s endpoint ID:
current = "prod"
[contexts.prod]nodes = [ { name = "cp1", node_id = "<endpoint id>", relay = "http://10.10.0.11:3340", addrs = ["10.10.0.11:7444"] }, { name = "cp2", node_id = "<endpoint id>", relay = "http://10.10.0.12:3340", addrs = ["10.10.0.12:7444"] }, { name = "cp3", node_id = "<endpoint id>", relay = "http://10.10.0.13:3340", addrs = ["10.10.0.13:7444"] }, { name = "w1", node_id = "<endpoint id>", addrs = ["10.10.0.21:7444"] },]org = "acme"| Field | Meaning |
|---|---|
node_id |
Pinned iroh endpoint ID (the part of the maintenance ticket before @) |
relay |
The node’s node.iroh.relay_url, if configured |
addrs |
Direct IP:7444 addresses to try first |
Switch clusters with --context or ANASTRO_CONTEXT.