Skip to content

Install & First Run

Both binaries — merod (the node daemon) and meroctl (the operator CLI) — live in this repository and build together.

The repository pins a Rust toolchain in rust-toolchain.toml (channel 1.88.0). With rustup installed, the toolchain is selected automatically.

Terminal window
git clone https://github.com/calimero-network/core
cd core
cargo build --locked --release -p merod -p meroctl

The binaries land in target/release/merod and target/release/meroctl. Add them to your PATH, or invoke them by path.

The flow is always the same: initialize a node’s home directory, run the daemon, then point meroctl at it.

  1. Initialize the node. This creates the home directory, generates the node’s identity keypair, writes config.toml, and opens the datastore.

    Terminal window
    merod --node node1 init

    It prints a single confirmation line naming the node home it created:

    INFO Initialized a node in "<home>/node1"

    By default merod stores nodes under CALIMERO_HOME (override with --home). The node listens on the swarm port 2428 and RPC port 2528 unless you pass --swarm-port / --server-port. To place data under a project directory:

    Terminal window
    mkdir data
    merod --home data/ --node node1 init --server-port 2528 --swarm-port 2428
  2. Run the node. This loads config.toml, validates it, and starts the daemon (swarm + RPC server). It runs in the foreground.

    Terminal window
    merod --node node1 run

    On startup the daemon logs its swarm listen address (which ends in the node’s peer id) and one line per HTTP service it brings up:

    INFO Listening on: /ip4/0.0.0.0/tcp/2428/p2p/12D3KooW…<peer-id>
    INFO Admin API listening on /ip4/127.0.0.1/tcp/2528/http{/admin-api}
    INFO JSON RPC server listening on /ip4/127.0.0.1/tcp/2528/http{/jsonrpc}
    INFO WebSocket server listening on /ip4/127.0.0.1/tcp/2528/ws{/ws}
    INFO SSE server listening on /ip4/127.0.0.1/tcp/2528/http{/sse}

    The /p2p/... suffix on the swarm address is this node’s peer id — the identity generated during init. The admin, JSON-RPC, WebSocket, and SSE services all share the RPC port (2528); the swarm uses 2428.

    run has the alias up. Use --auth-mode <proxy|embedded> to override the authentication mode from config.toml for this run.

  3. Verify with meroctl. In a second terminal, talk to the running node. With no node configured, meroctl targets http://127.0.0.1:2528:

    Terminal window
    meroctl --node node1 peers
    meroctl --node node1 app ls
    meroctl --node node1 namespace ls

    peers returns the connected-peer count; the ls commands return empty lists on a fresh node. Any successful response confirms the RPC server is up.

So you don’t pass connection details every time, register the node once and set it active:

Terminal window
meroctl node add node1 /path/to/home
meroctl node use node1
meroctl node ls

node add accepts a local home directory path or a remote http(s):// URL; see the meroctl reference for authentication options.