Running a Node¶
The daemon binary is Wrkzd. Run it with no arguments and it syncs the full chain, serves RPC on 127.0.0.1:17856 and P2P on 0.0.0.0:17855, with no authentication and no stratum server.
Every option is listed with its default in the Configuration Reference.
A reasonable public node¶
./Wrkzd \
--rpc-bind-ip 0.0.0.0 \
--rpc-bind-port 17856 \
--rpc-access-token "strong-token" \
--rpc-max-body-bytes 2097152 \
--rpc-max-rpm 240 \
--rpc-max-global-index-range 5000 \
--rpc-max-block-count 1000 \
--log-level 3 \
--no-console
- Bind RPC to localhost unless you intend to expose it.
- Set
--rpc-access-tokenfor any non-local use. - Keep the request and rate limits on.
- Use
--no-consoleunder a process manager, and reach the console withattachwhen you need it.
Fuller advice is in Security Hardening and Rate Limits and Performance.
Choosing a storage mode¶
| When | |
|---|---|
| Full (default) | Public nodes, seed nodes, explorers, anything other people sync against |
Pruned (--prune) | Disk is tight but the node still serves others. Old block bodies are dropped; everything a wallet rescan needs is kept. Reversible |
Lite (--lite --lite-height H) | A node for your own wallets. Full block data only from H upward. Much smaller, permanent for the database, and a poor public node |
See Lite Nodes before choosing lite, and Lite Node Snapshots to skip the index-only sync.
--prune and --lite cannot be combined, and --lite cannot be combined with --daemon-mode explorer.
Explorer mode¶
Explorer mode additionally serves f_blocks_list_json, f_block_json, f_transaction_json, f_on_transactions_pool_json, f_transactions_by_payment_id_json and /queryblocksdetailed. These walk database indexes and are not something a plain node should answer for anyone who asks — put a token or a proxy in front of it.
Mining¶
The daemon can serve stratum directly, so a stock miner needs no pool:
It is a separate TCP listener with no authentication of its own, so it stays on loopback unless you change it. Full notes in Solo Mining.
Local socket and console¶
The socket serves the whole RPC surface, plus /console, which is registered only there. See Local IPC and Console.
Push notifications¶
See Notification Hooks, or use the ZMQ publisher described in Networking.
Smoke tests¶
curl -s -H "X-API-Key: strong-token" http://127.0.0.1:17856/info
curl -s -H "X-API-Key: strong-token" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"getblockcount","params":{}}' \
http://127.0.0.1:17856/json_rpc
/info answers {"status":"BUSY"} for the whole of a heavy initial sync — the handler tries to lock the chain and gives up rather than blocking it. That is expected; poll again once sync settles.
Check that the build has zlib, without which every syncing wallet pulls several times as many bytes:
"none" means the build found no zlib. See Rate Limits and Performance.