Configuration

ClusterCockpit Node Controller Configuration Option References

Configuration is provided as a flat JSON file. The default path is ./config.json in the working directory; an alternative path can be specified with the -config flag.

Fields

FieldTypeRequiredDefaultDescription
serverstringyesIP address or hostname of the NATS server
portintegeryesPort of the NATS server
requestSubjectstringyesNATS subject to subscribe to for incoming control requests. All cc-node-controller instances in a cluster can share the same subject; each daemon only processes messages directed at its own hostname.
userstringnoUsername for NATS basic authentication
passwordstringnoPassword for NATS basic authentication
credsFilestringnoPath to a NATS credentials file (for NKey/JWT-based authentication)
nkeySeedFilestringnoPath to an NKey seed file
outstandingMessagesInQueueintegerno1000Size of the internal channel buffer for incoming NATS messages

Minimal Example

{
    "server": "127.0.0.1",
    "port": 4222,
    "requestSubject": "cc-control"
}

Full Example

{
    "server": "nats.example.org",
    "port": 4222,
    "requestSubject": "clustercockpit.control",
    "user": "ccnc-user",
    "password": "s3cr3t",
    "outstandingMessagesInQueue": 500
}

Authentication

cc-node-controller supports three NATS authentication methods. Only one should be configured at a time:

Basic authentication (user + password):

{
    "server": "nats.example.org",
    "port": 4222,
    "requestSubject": "cc-control",
    "user": "ccnc-user",
    "password": "s3cr3t"
}

Credentials file (NKey + JWT, generated by nsc):

{
    "server": "nats.example.org",
    "port": 4222,
    "requestSubject": "cc-control",
    "credsFile": "/etc/cc-node-controller/nats.creds"
}

NKey seed file:

{
    "server": "nats.example.org",
    "port": 4222,
    "requestSubject": "cc-control",
    "nkeySeedFile": "/etc/cc-node-controller/nkey.seed"
}

Request Subject and Multi-Cluster Setup

All cc-node-controller instances in a cluster can share the same requestSubject. Each daemon filters incoming messages by hostname and silently ignores messages intended for other nodes.

For multi-cluster deployments, use a different requestSubject per cluster, or use NATS subject namespacing (e.g. cc-control.fritz, cc-control.alex). The cc-energy-manager controller section uses a %c placeholder in its requestSubject to inject the cluster name automatically — the value here must match the expanded form for the respective cluster.