Command line options
This reference describes the syntax of the Hyperledger Besu command line interface (CLI) options.
This reference contains options that apply to both public and private networks. For private-network-specific options, see the private network options reference.
Specify 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 theBESU_MINER_COINBASE
environment variable. -
In a configuration file.
If you specify an option in more than one place, the order of priority is command line, environment variable, configuration file.
If using Bash or Z shell, you can view option suggestions by entering --
and pressing the Tab key twice.
besu --Tab+Tab
Characters such as smart quotes and long (em) hyphens don't work in Besu command line options. Ensure quotes aren't automatically converted to smart quotes, or double hyphens combined into em hyphens.
Options
api-gas-price-blocks
- Syntax
- Example
- Environment variable
- Example configuration file
--api-gas-price-blocks=<INTEGER>
--api-gas-price-blocks=50
BESU_API_GAS_PRICE_BLOCKS=50
api-gas-price-blocks=50
Number of blocks back from the head block to examine for eth_gasPrice
. The default is 100
.
api-gas-price-max
- Syntax
- Example
- Environment variable
- Example configuration file
--api-gas-price-max=<INTEGER>
--api-gas-price-max=20000
BESU_API_GAS_PRICE_MAX=20000
api-gas-price-max=20000
Maximum gas price to return for eth_gasPrice
, regardless of the percentile value measured. The default is 500000000000
(500 GWei).