Access the Hyperledger Besu API
Access the Hyperledger Besu API using:
The following sections provide information about JSON-RPC, RPC Pub/Sub, and GraphQL.
Enabling API access
To allow remote connections, set the host to
Setting the host to
0.0.0.0 exposes the API service connection on your node to any remote
connection. In a production environment, ensure you use a firewall to avoid exposing your node
to the internet.
The default ports are:
- 8545 for JSON-RPC over HTTP
- 8546 for JSON-RPC over WebSockets
- 8547 for GraphQL over HTTP.
Ports must be exposed appropriately.
To prevent DNS rebinding, Besu accepts incoming HTTP requests, WebSockets connections, and GraphQL
requests only from hostnames specified using the
--host-whitelist option. Besu accepts
incoming requests and connections from
127.0.0.1 by default.
If your application publishes RPC ports, specify the hostnames when starting Besu.
Specify “*” for
--host-whitelist to effectively disable host protection.
Specifying “*” for
--host-whitelist is not recommended for production code.
Not supported by Besu
Account management relies on private key management in the client, which is not supported by Besu.
To send signed transactions, use
eth_sendTransaction is not implemented.
For account management, use third-party wallets.
Besu does not support the Whisper and Swarm protocols.