Skip to main content

Resolution order

Settings come from three layers, highest priority first:
  1. Environment variable SANDKILN_<KEY>, for example SANDKILN_VCPU_COUNT.
  2. A config file, sandkiln.toml.
  3. Built-in default.
scripts/setup.sh writes a starter sandkiln.toml at the repo root and never overwrites an existing one. sandkiln.example.toml lists every key with its default and a one-line description. The daemon looks for the file in this order: --config <file>, $SANDKILN_CONFIG, ./sandkiln.toml, ~/.config/sandkiln/sandkiln.toml. Once set up, scripts/sandkilnd-ctl.sh start needs no environment variables at all.

Inspecting it

The daemon validates everything at startup and reports all problems at once, including unknown keys with a “did you mean” hint. Three flags make the configuration inspectable without starting anything:
A config file containing auth_token should be chmod 600; the daemon warns if other users can read it. scripts/sandkilnd-ctl.sh runs --check-config before starting, so a typo fails immediately with the real error rather than as a dead daemon and a log line. The table below is the same data as sandkilnd --config-reference. The code is authoritative: core/crates/daemon/src/config/settings.rs.

Environment variables and defaults

The environment variable for a key is SANDKILN_ plus the upper-cased key. Paths accept a leading ~/ and are expanded against $HOME at startup, useful when scripting. This means $HOME must be correct for whichever user actually runs the process; plain sudo resets it to /root, which is why checks that need root use sudo -E (see Troubleshooting). The clone-method counter rootfs_clone_total{method="reflink"|"copy"} on /metrics makes a silent fallback to full copies visible.