Skip to main content

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

--network=<NETWORK>

The predefined network configuration. The default is mainnet.

Only supported Optimism Sepolia Testnet for Optimism Stack.

data-path

--data-path=<PATH>

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

--engine-rpc-enabled[=<true|false>]

Enables or disables the Engine API. The default is false.

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

--engine-rpc-port=<PORT>

The listening port for the Engine API calls (ENGINE, ETH) for JSON-RPC over HTTP and WebSocket. The default is 8551.

engine-host-allowlist

--engine-host-allowlist=<hostname>[,<hostname>...]... or "*"

A comma-separated list of hostnames to allow for Engine API access (applies to both HTTP and WebSocket).

rpc-http-enabled

--rpc-http-enabled[=<true|false>]

Enables or disables the HTTP JSON-RPC service. The default is false.

rpc-http-port

--rpc-http-port=<PORT>

The port (TCP) on which HTTP JSON-RPC listens. The default is `8545. You must expose ports appropriately.

host-allowlist

--host-allowlist=<hostname>[,<hostname>...]... or "*"

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

--p2p-enabled[=<true|false>]

Enables or disables all P2P communication. The default is true.

p2p-port

--p2p-port=<PORT>

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.