shc node
Cluster Operations
Section titled “Cluster Operations”shc node token
Section titled “shc node token”Generate a join token for adding new nodes to the cluster:
shc node token# Output: eyJ...base64-encoded-token...The token includes:
- Leader address
- Bootstrap address list
- CA certificate
- Encrypted join credentials
With --swarm, show the Docker Swarm manager/worker join tokens
instead (requires platform:manage) — for manually rejoining a host
to the swarm layer. A cluster has exactly one swarm, so the tokens
are cluster-wide; run this on a swarm manager:
shc node token --swarm# MANAGER_TOKEN SWMTKN-1-...# WORKER_TOKEN SWMTKN-1-...# MANAGER_ADDR 10.0.0.5:2377# hint: join a worker with `docker swarm join --token SWMTKN-1-... 10.0.0.5:2377`shc node join
Section titled “shc node join”Join an existing cluster using a token:
shc node join eyJ...token...Options:
| Flag | Description |
|---|---|
--nic | Network interface for ALL cluster-internal traffic — enroll address, raft (rqlited), internal API bind, nebula underlay (auto-detected by default) |
NIC selection (auto-detect):
- Deterministic: candidates sorted by interface name
- Private (RFC1918) addresses preferred over public
- Within the preferred class, the default-route interface wins
- Use
--nicto override auto-detection (a nic that fails to resolve aborts the join)
# Auto-detect nicshc node join eyJ...token...
# Pin the cluster-internal nic explicitlyshc node join eyJ...token... --nic eth1On join, the node:
- Receives cluster CA and node certificate
- Joins the raft cluster (as voter or non-voter)
- Starts SHC server with mTLS-authenticated internal API
Mesh membership is orchestrator-driven: after a join on a
mesh-enabled cluster, re-run shc cluster mesh enable (additive +
idempotent) to extend the overlay to the new node.
shc node leave
Section titled “shc node leave”Gracefully leave the cluster:
shc node leaveThis:
- Drains workloads (if Swarm)
- Syncs pending writes
- Notifies other nodes
- Converts back to SQLite
shc node status
Section titled “shc node status”View cluster status:
shc node statusShows:
- Cluster mode (single/cluster)
- Leader node
- All node states
- Quorum status
Node Management
Section titled “Node Management”shc node ls
Section titled “shc node ls”List nodes:
shc node lsshc node ls -v # Verbose output with extra detailsshc node ls --output jsonshc node show
Section titled “shc node show”View node details:
shc node show node01Shows:
- Node ID and address
- Role (leader/voter/non-voter)
- Health status
- Resource usage (CPU, memory, disk)
shc node health
Section titled “shc node health”Check the health of a specific node:
shc node health node01Shows:
- Node connectivity status
- Resource usage
- Service health
shc node drain
Section titled “shc node drain”Drain workloads before maintenance:
shc node drain node01Drain is an SHC-level deployment migration, not Docker Swarm’s
native drain. Each running deployment on the node is relocated through
the same path as shc move — backup, cross-node transfer,
bring-up on the target, source teardown — and the node’s availability
flips to drained only once every one of them has landed. With
--force, a deployment that has nowhere to go is stopped in place
instead of aborting the drain.
Because relocation is real work, budget accordingly: a node hosting
several data-bearing stacks can exceed the default 300s timeout. Raise
it with the request’s timeout field.
Candidate nodes are matched on runtime (a swarm deployment moves to
another swarm node, a compose deployment to a compose node) and filtered
by the deployment’s placement constraints. A service hard-pinned to
the node being drained has no eligible target and is reported as failed
with no node satisfies the deployment's placement constraints — unpin
it, or pass --force to stop it in place.
If any deployment fails to migrate, the drain stops there and reports
the per-stack reasons; the node is left draining, not drained,
because it still hosts the workload. Fix the cause and re-run. The
common case is the ingress entry point, which is refused by design —
see the entry point section.
shc node forget
Section titled “shc node forget”Remove an unreachable node:
shc node forget node01Use when a node cannot gracefully leave.
shc node swarm-tokens
Section titled “shc node swarm-tokens”Show the Docker Swarm join tokens held by a swarm manager node:
shc node swarm-tokens node01Prints the manager and worker join tokens plus the manager address —
for a manual docker swarm join. SHC-managed membership goes through
shc node join.
Quorum-loss recovery moved. The emergency “force leader election” operation is now
shc cluster repair --force— seecluster repair.
Initialization
Section titled “Initialization”shc init
Section titled “shc init”Initialize a new SHC cluster on the first node:
shc initOptions:
| Flag | Description |
|---|---|
--nic | Network interface for ALL cluster-internal traffic (auto-detected by default) |
--nebula | Bring the Nebula mesh overlay up after bootstrap |
NIC selection (auto-detect):
- Deterministic: candidates sorted by interface name
- Private (RFC1918) addresses preferred over public
- Within the preferred class, the default-route interface wins
- Use
--nicto override auto-detection
# Auto-detect nicshc init
# Pin the cluster-internal nic explicitly (e.g., for dual-homed servers)shc init --nic eth1
# Bring the Nebula mesh overlay up for cross-network connectivityshc init --nebulaOn init, SHC:
- Generates cluster CA and node certificate
- Initializes the state database
- Starts SHC server with internal API
- Installs system tenant apps (Traefik, OpenObserve)
See Also
Section titled “See Also”- Cluster Commands - Cluster health and diagnostics
- Mesh Architecture - Service mesh overview
- Node Management