Command line options
This reference describes the syntax of the Hyperledger Besu command line interface (CLI) options.
You can specify Besu options:
- On the command line.
besu [OPTIONS] [SUBCOMMAND]
-
As an environment variable. For each command line option, the equivalent environment variable is:
- Uppercase.
- _ replaces -.
- Has a BESU_ prefix.
For example, set --miner-coinbase using the BESU_MINER_COINBASE environment variable.
Require Options
network
- Syntax
- Example
--network=<NETWORK>
--network=OP_SEPOLIA
The predefined network configuration. The default is mainnet
.
Only supported Optimism Sepolia Testnet for Optimism Stack.
data-path
- Syntax
- Example
--data-path=<PATH>
--data-path=/home/me/me_node
The path to the Besu data directory. The default is the directory you installed Besu in, or /opt/besu/database
if using the Op Besu Docker image.
engine-rpc-enabled
- Syntax
- Example
--engine-rpc-enabled[=<true|false>]
Enables or disables the Engine API. The default is false
.
engine-jwt-secret
- Syntax
- Example
--engine-jwt-secret
--engine-jwt-secret
Shared secret used to authenticate consensus clients when using the Engine JSON-RPC API (both HTTP and WebSocket). Contents of file must be at least 32 hex-encoded bytes and not begin with 0x
. May be a relative or absolute path. See an example of how to generate this.
engine-rpc-port
- Syntax
- Example
--engine-rpc-port=<PORT>
--engine-rpc-port=8551
The listening port for the Engine API calls (ENGINE, ETH) for JSON-RPC over HTTP and WebSocket. The default is 8551
.
engine-host-allowlist
- Syntax
- Example
--engine-host-allowlist=<hostname>[,<hostname>...]... or "*"
--engine-host-allowlist=*
A comma-separated list of hostnames to allow for Engine API access (applies to both HTTP and WebSocket).
rpc-http-enabled
- Syntax
- Example
--rpc-http-enabled[=<true|false>]
--rpc-http-enabled
Enables or disables the HTTP JSON-RPC service. The default is false
.
rpc-http-port
- Syntax
- Example
--rpc-http-port=<PORT>
--rpc-http-port=8545
The port (TCP) on which HTTP JSON-RPC listens. The default is `8545. You must expose ports appropriately.
host-allowlist
- Syntax
- Example
--host-allowlist=<hostname>[,<hostname>...]... or "*"
--host-allowlist="*"
A comma-separated list of hostnames to access the JSON-RPC API and pull Besu metrics. By default, Besu accepts requests from localhost
and 127.0.0.1
.
p2p-enabled
- Syntax
- Example
--p2p-enabled[=<true|false>]
--p2p-enabled
Enables or disables all P2P communication. The default is true
.
p2p-port
- Syntax
- Example
--p2p-port=<PORT>
--p2p-port=30303
The P2P listening ports (UDP and TCP). The default is 30303
. You must expose ports appropriately.
Other Options
The other options in op-besu have the same meaning as in Hyperledger Besu. You can refer to the official Besu documentation for more details.