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
serverstringyes—IP address or hostname of the NATS server
portintegeryes—Port of the NATS server
requestSubjectstringyes—NATS 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.
userstringno—Username for NATS basic authentication
passwordstringno—Password for NATS basic authentication
credsFilestringno—Path to a NATS credentials file (for NKey/JWT-based authentication)
nkeySeedFilestringno—Path 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.