machine.yaml
A machine spec describes one Ubuntu host. Only four fields are required; everything else has a default. Unknown or wrongly typed fields are refused.
api_version: genesis/v1
machine:
name: node-a
address: 203.0.113.10
ssh:
key_path: ~/.ssh/id_ed25519
bootstrap:
deploy_user:
key_path: ~/.ssh/id_ed25519.pub
Key paths may start with ~/. Paths are on the controller, never on the host.
machine
| Field | Default | Rules |
|---|---|---|
name | (required) | Lowercase DNS-safe label. Unique in the ledger |
address | (required) | Host name or IP that sg SSHes to |
ssh.key_path | (required) | Controller-local SSH private key |
ssh.user | root | The bootstrap user |
distro | ubuntu-24.04 | ubuntu-22.04 or ubuntu-24.04 |
bootstrap
| Field | Default | Rules |
|---|---|---|
packages | [fail2ban, unattended-upgrades] | Replaces the default list when set. Keep fail2ban: SSH hardening checks its jail |
ssh_hardening.password_root_login | false | |
ssh_hardening.password_authentication | false | |
deploy_user.name | deploy | |
deploy_user.key_path | ssh.key_path + .pub | Controller-local public key. Checked before any host contact. A private key here is refused |
firewall.guard | true | The nftables guard in front of LXD |
firewall.lxd_api_allow_from | [] | Individual tailnet IPv4 addresses inside 100.64.0.0/10. No CIDRs. Needs Tailscale enabled |
firewall.lxd_api_allow_all_tailnet | false | Let every tailnet client reach the LXD API and UI on :8444. Conflicts with a non-empty allow list. Needs Tailscale enabled |
tailscale.enabled | true | |
tailscale.auth_key_env | TS_AUTHKEY | The name of the variable holding the auth key. Required while Tailscale is enabled. plan refuses if it's unset or empty |
lxd
| Field | Default | Rules |
|---|---|---|
channel | 5.21/stable | Snap channel. Held, so it doesn't move under you. Cluster members must match |
api_address | tailnet:8444 | One concrete address with a port. Never port 8443, a wildcard or loopback |
storage.driver | zfs | zfs, btrfs or dir |
storage.pool_file_size | 150GiB | NGiB or NMiB. A sparse file on the root disk. Grows, never shrinks |
storage.arc_max | 4GiB | ZFS memory cache cap |
network.bridge | lxdbr0 | A valid interface name, at most 15 characters |
network.subnet | picked once before planning | A CIDR like 10.81.0.1/24. Must avoid 172.16.0.0/12 and 100.64.0.0/10. A clash with an existing bridge is refused, never renumbered |
network.nat | true | |
network.ipv6 | none | Must be none while the guard is on |
profiles | default, and task-vm with 2 CPU and 4GiB | Unique, non-empty names. Each may set cpu and memory |
What sg checks before contacting the host
api_versionis exactlygenesis/v1.- Names are valid labels; the distro is a supported LTS.
- The deploy key is a readable public key, not the private one.
- The LXD API address isn't
8443, a wildcard or loopback. - Allow-list entries are single tailnet addresses, and Tailscale is on if any are set.
- Sizes parse, the subnet avoids reserved ranges, and IPv6 is off under the guard.
A refusal names the field and the rule, for example:
sg machine init: loading spec: machine.name "node-a": lxd.api_address "tailnet:8443": lxd.api_address must never use port 8443