Skip to main content
Start, stop, restart. Status, logs, and the live TUI dashboard.

Shortest commands

mxnode start --all          # bring everything up
mxnode status               # one-shot per-node health snapshot
mxnode logs --node 0 -f     # tail node-0 logs
Every lifecycle command takes the same selector grammar so muscle memory transfers.

Selectors

SelectorMeaning
--allEvery node in state.toml (and the proxy, if installed)
--node NJust node N. Repeat for multiple: --node 0 --node 2
--shard <0|1|2|metachain>Every node assigned to that shard
--validators-onlyAll validator-role nodes
--observers-onlyAll observer- and multikey-role nodes
--select '<expr>'Free-form: role=validator AND shard=0
Selectors are mutually exclusive — clap rejects more than one at parse time.

Start / stop / restart

mxnode start --all
mxnode stop --node 1
mxnode restart --shard 0
start maps to systemctl enable --now <unit>, stop to systemctl stop, restart to a stop+start cycle.

Restart strategy

FlagDefaultEffect
--strategy rolling|parallelrollingRolling: one at a time, wait for is-active. Parallel: up to --max-parallel concurrent.
--max-parallel N1Cap when --strategy parallel.
# Rolling (default)
mxnode restart --all

# Parallel up to 2
mxnode restart --all --strategy parallel --max-parallel 2

Status

mxnode status
mxnode 0.8.1 │ mainnet │ 4 nodes │ tags: config v1.11.5.0 binary v1.11.5
H │ idx │ unit                    │ shard      │ nonce      │ pubkey       │ port
──┼─────┼─────────────────────────┼────────────┼────────────┼──────────────┼──────
✓ │ 0   │ elrond-node-0.service   │ 0          │ 21345678   │ erd1...      │ 8080
✓ │ 1   │ elrond-node-1.service   │ 1          │ 21345679   │ erd1...      │ 8081
✗ │ 2   │ elrond-node-2.service   │ 2          │ -          │ -            │ 8082
✓ │ 3   │ elrond-node-3.service   │ metachain  │ 21345670   │ erd1...      │ 8083

health: 3 ok, 0 lagging, 1 failed, 0 unknown

Options

FlagDefaultEffect
--watchoffRepaint until Ctrl+C.
--interval <SECS>5Refresh interval with --watch.
--format table|jsontableOutput shape.
mxnode status --watch --interval 3
mxnode --json status

Logs

mxnode logs --node 0 --follow

Options

FlagDefaultEffect
--node NrequiredNode index. Repeatable for combined stream.
--followoffTail new lines. Conflicts with --save-archive.
--since <SPEC>noneAnything journalctl --since accepts (1h, 30min, 2024-01-01).
--save-archiveoffTarball logs from every node into <custom_home>/mx-chain-logs/.
# Last hour, no follow
mxnode logs --node 0 --since 1h

# Combined tail of two nodes
mxnode logs --node 0 --node 1 --follow

# Archive everything
mxnode logs --save-archive

Dashboard

mxnode dashboard
Live TUI (built on ratatui). Press q to quit.

Options

FlagDefaultEffect
--node NallLimit to a subset (repeatable).
--interval <ms>1000REST poll cadence per node.
--host <H>127.0.0.1Override the host the dashboard talks to.
--ws-logsoffStream logs via the node’s /log WebSocket instead of tailing the file.

Metrics

mxnode metrics --port 9090
Prometheus scrape endpoint with per-node nonce, lag, and active state. Add it to your scrape config:
scrape_configs:
  - job_name: mxnode
    static_configs:
      - targets: ["host.example.com:9090"]
The metrics server runs in the foreground until Ctrl+C. Wrap it in your own systemd unit for production use.

What gets recorded

ActionRecorded where
Every state-changing op~/.local/state/mxnode/state.toml
In-flight upgrades~/.local/state/mxnode/inflight.toml (cleared on completion or auto-cleared on next run)
Migration audit logstate.toml migrations.entries[]