Skip to content

Node Daemon

The node daemon is the main production binary that runs your service as a persistent process.


Building

Enable the node binary at CMake configure time:

bash
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_BUILD_NODE=ON
make -j$(nproc)

The -DENABLE_BUILD_NODE=ON flag produces the node executable.

Typical Workflow

  1. Build the node binary.
  2. Create a config.json with your service settings.
  3. Run ./node --config config.json.
  4. The node listens for client connections and participates in the mesh.

Running

bash
./node --config /etc/my-service/config.json

The daemon reads its configuration from the JSON file specified via --config. Additional command-line flags can override specific config values (e.g., --port 8080).

Command-line Options

OptionDescription
--config <path>Path to JSON configuration file.
--port <port>Override the client port.
--node-port <port>Override the inter-node port.
--seed <host:port>Override the seed node address.

Configuration

The node loads its full configuration from the JSON file. See the Configuration page for the complete reference.