Skip to content
SHC Docs

shc init

initialize a new cluster

Reference for the init command (module modules/cluster). Source: modules/cluster/commands/init.go.

This is a single-action command (no subcommands). Init is pure bootstrap: CA + node cert, runtime detection, daemon start, vault unlock, then the system-app install pass. Provider/LB/connection setup happens post-init (shc connection …).

Read before you run it. Init-time decisions classifies everything this command fixes: what is genuinely irreversible, what only looks that way because no verb exists, and what an estate gets by default because nobody chose it. The expensive ones are --ingress-host, --name and --address-block, plus the backup repository password, which this command does not take a flag for.

FlagTypeRequiredHelp
--name / -nstrnonode name
--runtime / -rstrnocontainer runtime (docker, podman, incus, or apple). swarm is refused (X400422CLSRUN)
--nicstrnonetwork interface for all cluster-internal traffic (raft, internal API, mesh0 underlay). Blank = auto-detect (private-preferred)
--acme-providerstrnoname of a named ACME provider to define + set as the cluster default (acme.providers.<name> + acme.default)
--acme-directorystrnoACME directory URL for --acme-provider (blank = Let’s Encrypt production; e.g. the LE staging URL)
--acme-emailstrnoACME contact email (the global acme.email fallback contact)
--ingress-hoststrnopublic host where Traefik fronts SHC’s apps
--modules-configstrnosystem-app selection + per-app overrides as a compact JSON object keyed by app name, e.g. '{"keycloak":{"host":"auth.example.com"},"traefik":{}}'. The key set is the install selection (traefik is always installed with the selection because nodes join through it on 443, so {} installs traefik alone); each value seeds modules.<name>.{host,base_path,vars.*} before the install pass. Unset falls back to the daemon’s SHC_MODULES default set.
--public-addressstrnopublic IP or stable public hostname internet traffic reaches this node at (recorded on the node row; managed DNS for internet exposure reads it)
--yes / -yboolnoskip confirmation prompt
--vault-passwordstrnoset the vault master password non-interactively
--vault-password-filestrnoread the vault master password from a file (mode 0600 expected); use - to read from stdin. Takes precedence over --vault-password and SHC_VAULT_PASSWORD
--force / -fboolnowipe local cluster state and re-initialize even if this node is already clustered