Daemon RPC Overview¶
What the daemon serves, on which listeners, and which options control them.
Implementation: src/rpc/RpcServer.cpp, src/rpc/RpcServer.h
The daemon exposes:
- JSON-RPC at
/json_rpc(GET and POST) - HTTP-style endpoints (
/info,/height, and others) - The same surface over a local AF_UNIX socket when
--rpc-ipc-pathis given, plus/console, which is served only there. See Local IPC and Console - A stratum server for miners, off unless
--stratum-bind-portis given. It is a separate TCP listener, not part of the RPC surface. See Solo Mining
RPC availability depends on the daemon RPC mode, chosen with --daemon-mode <standard|explorer> (RpcMode in src/rpc/RpcServer.h):
Standard— the default. Everything except the block explorer methods.Explorer— additionally serves the explorer routes, which walk database indexes and are not something a plain node should answer for anyone who asks.
Permissions are enforced in middleware before handlers run.
Main runtime options¶
Defined in src/daemon/DaemonConfiguration.h and parsed in src/daemon/DaemonConfiguration.cpp:
rpc-bind-iprpc-bind-portrpc-access-tokenrpc-read-timeoutrpc-write-timeoutrpc-max-body-bytesrpc-max-rpmrpc-max-global-index-rangerpc-max-block-countrpc-sync-cache-sizerpc-trust-proxyrpc-ipc-pathdaemon-mode
The full option list, with every default, is in the Configuration Reference. See the other daemon RPC pages for auth, limits, and method lists.
On a lite node¶
A lite node answers /info with lite and lite_start_height, clamps /getwalletsyncdata and /getrawblocks requests up to that height, and refuses /get_global_indexes_for_range below it. Lite mode and explorer mode cannot be combined.
Quick Examples¶
Set shared environment variables:
Get daemon info:
Get peers with token auth:
Call JSON-RPC (getblockcount):