libcluster strategy that discovers peers by polling the local
NetBird daemon via netbird status --json.
Works with NetBird cloud and self-hosted management alike — peer information comes from the node's own daemon, so no management API token is needed.
Usage
Every node must be a connected NetBird peer (see the README's
Prerequisites). Start each node with a longname built from its NetBird
IPv4 (e.g. myapp@100.94.0.5), then configure:
config :libcluster,
topologies: [
netbird: [
strategy: Cluster.Strategy.Netbird,
config: [
node_basename: "myapp",
hostnames: ["myapp-"]
]
]
]Options
node_basename(required) — node name part before@, shared by all nodeshostnames(required) — list of NetBird hostname prefixes (matched against the first label of each peer's FQDN) that identify cluster memberscli— path to thenetbirdbinary (default"netbird")polling_interval— poll interval in milliseconds (default5_000)cmd_timeout— CLI timeout in milliseconds (default10_000)runner—LibclusterMesh.Runnerimplementation (default runs the CLI)