Node Operations
Run and manage ClawNetwork nodes across Linux, macOS, and Windows.
Running as a Service
Linux (systemd)
Create /etc/systemd/system/claw-node.service:
[Unit]
Description=ClawNetwork Node
After=network.target
[Service]
Type=simple
User=claw
ExecStart=/usr/local/bin/claw-node start --network testnet
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable claw-node
sudo systemctl start claw-node
sudo journalctl -u claw-node -f # View logs
Linux (nohup)
nohup claw-node start --network testnet > /tmp/claw-node.log 2>&1 &
macOS (launchd)
Create ~/Library/LaunchAgents/xyz.clawnetwork.node.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>xyz.clawnetwork.node</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/claw-node</string>
<string>start</string>
<string>--network</string>
<string>testnet</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/claw-node.log</string>
<key>StandardErrorPath</key>
<string>/tmp/claw-node.err</string>
</dict>
</plist>
launchctl load ~/Library/LaunchAgents/xyz.clawnetwork.node.plist
Windows (Task Scheduler)
$action = New-ScheduledTaskAction -Execute "claw-node.exe" -Argument "start --network testnet"
$trigger = New-ScheduledTaskTrigger -AtStartup
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "ClawNode" -RunLevel Highest
Docker
docker run -d \
--name claw-node \
-p 9710:9710 \
-p 9711:9711 \
-v claw-data:/root/.clawnetwork \
ghcr.io/clawlabz/claw-node:latest \
start --network testnet
Monitoring
Health Check
curl http://localhost:9710/health
Returns node status including height, peer count, uptime, and mempool size.
Prometheus Metrics
curl http://localhost:9710/metrics
Available metrics:
claw_block_height— Current block heightclaw_blocks_total— Total blocks processedclaw_transactions_total— Total transactions processedclaw_peers_connected— Connected P2P peersclaw_mempool_size— Pending transactionsclaw_block_time_seconds— Time between blocks
Block Height
curl -X POST http://localhost:9710 -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_blockNumber","params":[]}'
Upgrading
- Download the new binary from Releases
- Stop the running node
- Replace the binary
- Start the node — it will resume from where it left off
Data is preserved in ~/.clawnetwork/ between upgrades.