Skip to content

merod CLI Reference

merod is the node daemon. Every invocation takes two global arguments, then a subcommand.

FlagTypeDefaultNotes
--home <PATH>pathplatform node directoryDirectory for config and data. Env: CALIMERO_HOME.
-n, --node <NAME>name— (required)Name of the node; its home is <home>/<NAME>.
Terminal window
merod --home data/ --node node1 <subcommand>

Subcommands: init, config, run (alias up), kms.

Initialize node configuration: creates the home directory, generates an ed25519 identity keypair, writes config.toml, and opens the datastore.

FlagType / valuesDefaultPurpose
--boot-nodes <ADDR>multiaddr (repeatable)Explicit bootstrap node multiaddrs.
--boot-network <NETWORK>calimero-dev, ipfscalimero-devUse a known network’s bootstrap nodes.
--swarm-host <HOST>IP list0.0.0.0,::Hosts to listen on for the libp2p swarm.
--swarm-port <PORT>u162428Swarm (peer-to-peer) port.
--server-host <HOST>IP list127.0.0.1,::1Hosts to listen on for the RPC server.
--server-port <PORT>u162528RPC / admin / JSON-RPC / WS / SSE port.
--auth-mode <MODE>proxy, embeddedproxyAuthentication mode for server endpoints.
--auth-storage <KIND>persistent, memorypersistentEmbedded-auth storage backend (only with --auth-mode embedded).
--auth-storage-path <PATH>pathauthEmbedded-auth storage path (persistent storage only).
--mdnsbooltrueEnable mDNS local discovery.
--advertise-addressboolfalseAdvertise the node’s observed address.
--external-address <MULTIADDR>multiaddr (repeatable)Static external multiaddrs to advertise. Pair with --advertise-address for them to be advertised.
--rendezvous-registrations-limit <N>usize3Max rendezvous registrations.
--relay-registrations-limit <N>usize3Max relay registrations.
--autonat-probe-interval <SECS>u6410Interval between AutoNAT probes, in seconds.
--autonat-max-candidates <N>usize5Max untested address candidates to probe with AutoNAT.
--forceboolfalseWipe and re-initialize even if the directory already exists.
--mode <MODE>standard, read-onlystandardNode operation mode (read-only disables JSON-RPC execution).
Terminal window
# Initialize with the default network and ports
merod --node node1 init
# Initialize with custom ports
merod --node node1 init --server-port 2528 --swarm-port 2428

Update keys in the node’s config.toml. Arguments are key=value pairs where the key is a dotted TOML path. The change is validated by reloading the resulting config before it is written.

Terminal window
# Quote the argument so your shell does not glob the brackets
merod --node node1 config "server.listen=['/ip4/127.0.0.2/tcp/3000', '/ip6/::1/tcp/3000']"

There are no flags — only positional key=value arguments (repeatable).

Run the node: loads and validates config.toml, then starts the swarm and RPC server. Foreground process. Alias: up.

FlagType / valuesDefaultPurpose
--auth-mode <MODE>proxy, embeddedOverride the authentication mode from config.toml for this run.
--mock-teeboolfalseDEV/TEST ONLY. Produce/accept mock TEE attestation quotes. Env: MEROD_MOCK_TEE.
Terminal window
merod --node node1 run
merod --node node1 up --auth-mode embedded

KMS (key management service) operations for TEE-enabled nodes.

Probe the KMS attestation and storage-key fetch flow against the node’s configured TEE/KMS settings.

FlagTypeDefaultPurpose
--kms-url <URL>URLOverride the configured KMS URL for this probe.
--jsonboolfalseEmit the probe result as machine-readable JSON.
Terminal window
merod --node node1 kms probe
merod --node node1 kms probe --json

A hosted node that should rejoin the network across restarts is initialized once with a persistent home, has its config.toml adjusted for the deployment, then runs as a foreground service (under your process supervisor).

  1. Initialize under a stable home directory. Keep the RPC server on loopback so it is only reachable through a local reverse proxy:

    Terminal window
    merod --home /var/lib/calimero --node node1 init \
    --server-port 2528 --swarm-port 2428
  2. Edit config.toml for a datacenter deployment — turn off LAN discovery, dial known peers on startup, and advertise a stable public swarm address instead of relying on AutoNAT. These keys live in the file init wrote (<home>/node1/config.toml):

    [bootstrap]
    nodes = [
    "/ip4/198.51.100.7/tcp/2428/p2p/12D3KooW…<peer-id>",
    ]
    [discovery]
    mdns = false
    advertise_address = true
    external_address = ["/ip4/203.0.113.10/tcp/2428"]

    You can apply individual keys without hand-editing using the config subcommand, which validates the result before writing:

    Terminal window
    merod --home /var/lib/calimero --node node1 config "discovery.mdns=false"
  3. Run the node. It reloads and validates config.toml, then stays in the foreground:

    Terminal window
    merod --home /var/lib/calimero --node node1 run