merod CLI Reference
merod is the node daemon. Every invocation takes two global arguments, then a
subcommand.
Global arguments
Section titled “Global arguments”| Flag | Type | Default | Notes |
|---|---|---|---|
--home <PATH> | path | platform node directory | Directory for config and data. Env: CALIMERO_HOME. |
-n, --node <NAME> | name | — (required) | Name of the node; its home is <home>/<NAME>. |
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.
| Flag | Type / values | Default | Purpose |
|---|---|---|---|
--boot-nodes <ADDR> | multiaddr (repeatable) | — | Explicit bootstrap node multiaddrs. |
--boot-network <NETWORK> | calimero-dev, ipfs | calimero-dev | Use a known network’s bootstrap nodes. |
--swarm-host <HOST> | IP list | 0.0.0.0,:: | Hosts to listen on for the libp2p swarm. |
--swarm-port <PORT> | u16 | 2428 | Swarm (peer-to-peer) port. |
--server-host <HOST> | IP list | 127.0.0.1,::1 | Hosts to listen on for the RPC server. |
--server-port <PORT> | u16 | 2528 | RPC / admin / JSON-RPC / WS / SSE port. |
--auth-mode <MODE> | proxy, embedded | proxy | Authentication mode for server endpoints. |
--auth-storage <KIND> | persistent, memory | persistent | Embedded-auth storage backend (only with --auth-mode embedded). |
--auth-storage-path <PATH> | path | auth | Embedded-auth storage path (persistent storage only). |
--mdns | bool | true | Enable mDNS local discovery. |
--advertise-address | bool | false | Advertise 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> | usize | 3 | Max rendezvous registrations. |
--relay-registrations-limit <N> | usize | 3 | Max relay registrations. |
--autonat-probe-interval <SECS> | u64 | 10 | Interval between AutoNAT probes, in seconds. |
--autonat-max-candidates <N> | usize | 5 | Max untested address candidates to probe with AutoNAT. |
--force | bool | false | Wipe and re-initialize even if the directory already exists. |
--mode <MODE> | standard, read-only | standard | Node operation mode (read-only disables JSON-RPC execution). |
# Initialize with the default network and portsmerod --node node1 init
# Initialize with custom portsmerod --node node1 init --server-port 2528 --swarm-port 2428config
Section titled “config”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.
# Quote the argument so your shell does not glob the bracketsmerod --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.
| Flag | Type / values | Default | Purpose |
|---|---|---|---|
--auth-mode <MODE> | proxy, embedded | — | Override the authentication mode from config.toml for this run. |
--mock-tee | bool | false | DEV/TEST ONLY. Produce/accept mock TEE attestation quotes. Env: MEROD_MOCK_TEE. |
merod --node node1 runmerod --node node1 up --auth-mode embeddedKMS (key management service) operations for TEE-enabled nodes.
kms probe
Section titled “kms probe”Probe the KMS attestation and storage-key fetch flow against the node’s configured TEE/KMS settings.
| Flag | Type | Default | Purpose |
|---|---|---|---|
--kms-url <URL> | URL | — | Override the configured KMS URL for this probe. |
--json | bool | false | Emit the probe result as machine-readable JSON. |
merod --node node1 kms probemerod --node node1 kms probe --jsonExample: a long-lived node
Section titled “Example: a long-lived node”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).
-
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 -
Edit
config.tomlfor 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 fileinitwrote (<home>/node1/config.toml):[bootstrap]nodes = ["/ip4/198.51.100.7/tcp/2428/p2p/12D3KooW…<peer-id>",][discovery]mdns = falseadvertise_address = trueexternal_address = ["/ip4/203.0.113.10/tcp/2428"]You can apply individual keys without hand-editing using the
configsubcommand, which validates the result before writing:Terminal window merod --home /var/lib/calimero --node node1 config "discovery.mdns=false" -
Run the node. It reloads and validates
config.toml, then stays in the foreground:Terminal window merod --home /var/lib/calimero --node node1 run