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).
api-gas-price-percentile
- Syntax
- Example
- Environment variable
- Example configuration file
--api-gas-price-percentile=<DOUBLE>
--api-gas-price-percentile=75
BESU_API_GAS_PRICE_PERCENTILE=75
api-gas-price-percentile=75
Percentile value to measure for eth_gasPrice
. The default is 50.0
.
For eth_gasPrice
, to return the:
- Highest gas price in
--api-gas-price-blocks
, set to100
. - Lowest gas price in
--api-gas-price-blocks
, set to0
.
auto-log-bloom-caching-enabled
- Syntax
- Example
- Environment variable
- Example configuration file
--auto-log-bloom-caching-enabled[=<true|false>]
--auto-log-bloom-caching-enabled=false
BESU_AUTO_LOG_BLOOM_CACHING_ENABLED=false
auto-log-bloom-caching-enabled=false
Enables or disables automatic log bloom caching. APIs such as eth_getLogs
and eth_getFilterLogs
use the cache for improved performance. The default is true
.
If automatic log bloom caching is enabled and a log bloom query reaches the end of the cache, Besu performs an uncached query for logs not yet written to the cache.
Automatic log bloom caching has a small impact on performance. If you are not querying logs blooms for a large number of blocks, you might want to disable automatic log bloom caching.
banned-node-ids
- Syntax
- Example
- Environment variable
- Configuration file
--banned-node-ids=<bannedNodeId>[,<bannedNodeId>...]...
--banned-node-ids=0xc35c3...d615f,0xf42c13...fc456
BESU_BANNED_NODE_IDS=0xc35c3...d615f,0xf42c13...fc456
banned-node-ids=["0xc35c3...d615f","0xf42c13...fc456"]
A list of node IDs with which this node will not peer. The node ID is the public key of the node. You can specify the banned node IDs with or without the 0x
prefix.
The singular --banned-node-id
and plural --banned-node-ids
are available and are two names for the same option.
block-txs-selection-max-time
- Syntax
- Example
- Environment variable
- Example configuration file
--block-txs-selection-max-time=<INTEGER>
--block-txs-selection-max-time=1700
BESU_BLOCK_TXS_SELECTION_MAX_TIME=1700
block-txs-selection-max-time=1700
The maximum time, in milliseconds, that can be spent selecting transactions to be included in a block.
This value must be less than or equal to the default, 5000
.
This option only applies to proof-of-stake and proof-of-work networks.
For proof-of-authority networks, see
--poa-block-txs-selection-max-time
.
bonsai-historical-block-limit
- Syntax
- Example
- Environment variable
- Example configuration file
--bonsai-historical-block-limit=<INTEGER>
--bonsai-historical-block-limit=256
BESU_BONSAI_HISTORICAL_BLOCK_LIMIT=256
bonsai-historical-block-limit=256
When using Bonsai Tries, the maximum number of previous blocks for which Bonsai can reconstruct a historical state. The default is 512.
If you plan on querying historical blocks or state using the JSON-RPC API, you might need to adjust the default value or your configured value to avoid errors.
bootnodes
- Syntax
- Example
- Environment variable
- Example configuration file
--bootnodes[=<enode://id@host:port>[,<enode://id@host:port>...]...]
--bootnodes=enode://c35c3...d615f@1.2.3.4:30303,enode://f42c13...fc456@1.2.3.5:30303
BESU_BOOTNODES=enode://c35c3...d615f@1.2.3.4:30303,enode://f42c13...fc456@1.2.3.5:30303
bootnodes=["enode://c35c3...d615f@1.2.3.4:30303","enode://f42c13...fc456@1.2.3.5:30303"]
A list of comma-separated enode URLs for P2P discovery bootstrap.
When connecting to Mainnet or public testnets, the default is a predefined list of enode URLs.
In private networks defined using --genesis-file
or when using --network=dev
, the default is an empty list of bootnodes.
color-enabled
- Syntax
- Example
- Environment variable
- Example configuration file
--color-enabled[=<true|false>]
--color-enabled=false
BESU_COLOR_ENABLED=false
color-enabled=false
Enables or disables color output to console. The default is true
.
compatibility-eth64-forkid-enabled
- Syntax
- Example
- Environment variable
- Example configuration file
--compatibility-eth64-forkid-enabled[=<true|false>]
--compatibility-eth64-forkid-enabled=true
BESU_COMPATIBILITY_ETH64_FORKID_ENABLED=true
compatibility-eth64-forkid-enabled=true
Enables or disables the legacy Eth/64 fork ID. For any networks with nodes using Besu v1.4 or earlier and nodes using Besu v20.10.1 or later, either:
- All nodes must be upgraded to v20.10.1 or later.
- All nodes using v20.10.1 or later must have
--compatibility-eth64-forkid-enabled
set totrue
.
The default is false
.
If networks have Besu nodes using v1.4 or earlier and other Besu nodes using v20.10.1 or later, the nodes on different versions cannot communicate unless --compatibility-eth64-forkid-enabled
is set to true
.
config-file
- Syntax
- Example
- Environment variable
--config-file=<FILE>
--config-file=/home/me/me_node/config.toml
BESU_CONFIG_FILE=/home/me/me_node/config.toml
The path to the TOML configuration file. The default is none
.
data-path
- Syntax
- Example
- Environment variable
- Configuration file
--data-path=<PATH>
--data-path=/home/me/me_node
BESU_DATA_PATH=/home/me/me_node
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 Besu Docker image.
data-storage-format
- Syntax
- Example
- Environment variable
- Configuration file
--data-storage-format=<FORMAT>
--data-storage-format=FOREST
BESU_DATA_STORAGE_FORMAT=FOREST
data-storage-format="BONSAI"
The data storage format to use. Set to BONSAI
for Bonsai Tries or FOREST
for Forest of Tries. The default is BONSAI
.
discovery-dns-url
- Syntax
- Environment variable
- Example configuration file
--discovery-dns-url=<enrtree URL>
BESU_DISCOVERY_DNS_URL=enrtree://AM5FCQLWIZX2QFPNJAP7VUERCCRNGRHWZG3YYHIUV7BVDQ5FDPRT2@nodes.example.org
discovery-dns-url="enrtree://AM5FCQLWIZX2QFPNJAP7VUERCCRNGRHWZG3YYHIUV7BVDQ5FDPRT2@nodes.example.org"
The enrtree
URL of the DNS node list for node discovery via DNS. The default is null
.
discovery-enabled
- Syntax
- Example
- Environment variable
- Example configuration file
--discovery-enabled[=<true|false>]
--discovery-enabled=false
BESU_DISCOVERY_ENABLED=false
discovery-enabled=false
Enables or disables P2P discovery. The default is true
.
You can override the default DNS server if it's unreliable or doesn't serve TCP DNS requests, using the early access option --Xp2p-dns-discovery-server=<HOST>
.
engine-host-allowlist
- Syntax
- Example
- Environment variable
- Configuration file
--engine-host-allowlist=<hostname>[,<hostname>...]... or "*"
--engine-host-allowlist=localhost,127.0.0.1
BESU_ENGINE_HOST_ALLOWLIST=localhost,127.0.0.1
engine-host-allowlist=["localhost","127.0.0.1"]
A comma-separated list of hostnames to allow for Engine API access (applies to both HTTP and WebSocket).
To allow all hostnames, use "*"
. We don't recommend allowing all hostnames in production environments.
engine-jwt-disabled
- Syntax
- Example
- Environment variable
- Configuration file
--engine-jwt-disabled[=<true|false>]
--engine-jwt-disabled=true
BESU_ENGINE_JWT_DISABLED=true
engine-jwt-disabled=true
Disables or enables authentication for Engine APIs. The default is false
(authentication is enabled by default).
engine-jwt-secret
- Syntax
- Example
- Environment variable
- Configuration file
--engine-jwt-secret=<FILE>
--engine-jwt-secret=jwt.hex
BESU_ENGINE_JWT_SECRET="jwt.hex"
engine-jwt-secret="jwt.hex"
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-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--engine-rpc-enabled[=<true|false]>
--engine-rpc-enabled
BESU_ENGINE_RPC_ENABLED=true
engine-rpc-enabled=true
Enables or disables the Engine API. The default is true
.
engine-rpc-port
- Syntax
- Example
- Environment variable
- Configuration file
--engine-rpc-port=<PORT>
--engine-rpc-port=8551
BESU_ENGINE_RPC_PORT=8551
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
.
ethstats
- Syntax
- Example
- Environment variable
- Configuration file
--ethstats=<[ws://|wss://]nodename:secret@host:[port]>
--ethstats=Dev-Node-1:secret@127.0.0.1:3001
BESU_ETHSTATS=Dev-Node-1:secret@127.0.0.1:3001
ethstats="Dev-Node-1:secret@127.0.0.1:3001"
Reporting URL of an Ethstats server. If specified without a port, the default port is 443 for SSL connections and 80 for non-SSL connections.
You can optionally specify ws://
or wss://
in the Ethstats URL.
If you specify this scheme, the connection doesn't need to switch from SSL to non-SSL on each retry logic.
ethstats-cacert-file
- Syntax
- Example
- Environment variable
- Configuration file
--ethstats-cacert-file=<FILE>
--ethstats-cacert-file=./root.cert
BESU_ETHSTATS_CACERT_FILE=./root.cert
ethstats-cacert-file="./root.cert"
Path to the root certificate authority (CA) certificate file of the Ethstats server specified by --ethstats
. This option is useful in non-production environments.
ethstats-contact
- Syntax
- Example
- Environment variable
- Configuration file
--ethstats-contact=<CONTACT>
--ethstats-contact=contact@mail.com
BESU_ETHSTATS_CONTACT=contact@mail.com
ethstats-contact="contact@mail.com"
Contact email address to send to the Ethstats server specified by --ethstats
.
genesis-file
- Syntax
- Example
- Environment variable
- Configuration file
--genesis-file=<FILE>
--genesis-file=/home/me/me_node/customGenesisFile.json
BESU_GENESIS_FILE=/home/me/me_node/customGenesisFile.json
genesis-file="/home/me/me_node/customGenesisFile.json"
The path to the genesis file.
You can't use the --genesis-file
and --network
options at the same time.
graphql-http-cors-origins
- Syntax
- Example
- Environment variable
- Configuration file
--graphql-http-cors-origins=<graphQLHttpCorsAllowedOrigins>
--graphql-http-cors-origins="http://medomain.com","https://meotherdomain.com"
BESU_GRAPHQL_HTTP_CORS_ORIGINS="http://medomain.com","https://meotherdomain.com"
graphql-http-cors-origins=["http://medomain.com","https://meotherdomain.com"]
A list of comma-separated origin domain URLs for CORS validation. The default is none.
graphql-http-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--graphql-http-enabled[=<true|false>]
--graphql-http-enabled
BESU_GRAPHQL_HTTP_ENABLED=true
graphql-http-enabled=true
Enables or disables the GraphQL HTTP service. The default is false
.
The default GraphQL HTTP service endpoint is http://127.0.0.1:8547/graphql
if set to true
.
graphql-http-host
- Syntax
- Example
- Environment variable
- Configuration file
--graphql-http-host=<HOST>
# to listen on all interfaces
--graphql-http-host=0.0.0.0
# to listen on all interfaces
BESU_GRAPHQL_HTTP_HOST=0.0.0.0
graphql-http-host="0.0.0.0"
The host on which GraphQL HTTP listens. The default is 127.0.0.1
.
To allow remote connections, set to 0.0.0.0
.
graphql-http-port
- Syntax
- Example
- Environment variable
- Configuration file
--graphql-http-port=<PORT>
# to listen on port 6175
--graphql-http-port=6175
# to listen on port 6175
BESU_GRAPHQL_HTTP_PORT=6175
graphql-http-port="6175"
The port (TCP) on which GraphQL HTTP listens. The default is 8547
. Ports must be exposed appropriately.
help
- Syntax
-h, --help
Show the help message and exit.
host-allowlist
- Syntax
- Example
- Environment variable
- Configuration file
--host-allowlist=<hostname>[,<hostname>...]... or "*"
--host-allowlist=medomain.com,meotherdomain.com
BESU_HOST_ALLOWLIST=medomain.com,meotherdomain.com
host-allowlist=["medomain.com", "meotherdomain.com"]
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
.
This isn't a permissioning feature. To restrict access to the API, we recommend using the Besu authentication mechanism with username and password authentication or JWT public key authentication.
If using Prometheus to pull metrics from a node, you must specify all the other nodes you want to pull metrics from in the list of allowed hostnames.
To allow all hostnames, use "*"
. We don't recommend allowing all hostnames for production environments.
identity
- Syntax
- Example
- Environment variable
- Configuration file
--identity=<String>
--identity=MyNode
BESU_IDENTITY=MyNode
identity="MyNode"
The name for the node. If specified, it's the second section of the client ID provided by some Ethereum network explorers. For example, in the client ID besu/MyNode/v1.3.4/linux-x86_64/oracle_openjdk-java-11
, the node name is MyNode
.
If a name is not specified, the name section is not included in the client ID. For example, besu/v1.3.4/linux-x86_64/oracle_openjdk-java-11
.
json-pretty-print-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--json-pretty-print-enabled[=<true|false>]
--json-pretty-print-enabled=true
BESU_JSON_PRETTY_PRINT_ENABLED=true
json-pretty-print-enabled=true
Enables or disables the pretty-print output for HTTP and WebSocket responses. The default is false
.
key-value-storage
- Syntax
- Example
- Environment variable
- Configuration file
--key-value-storage=<keyValueStorageName>
--key-value-storage=rocksdb
BESU_KEY_VALUE_STORAGE=rocksdb
key-value-storage="rocksdb"
The key-value storage to use. Use this option only if using a storage system provided with a plugin. The default is rocksdb
.
For development use only, the memory
option provides ephemeral storage for sync testing and debugging.
kzg-trusted-setup
- Syntax
- Example
- Environment variable
- Configuration file
--kzg-trusted-setup=<PATH>
--kzg-trusted-setup=/etc/besu/kzg-trusted-setup.txt
BESU_KZG_TRUSTED_SETUP=/etc/besu/kzg-trusted-setup.txt
kzg-trusted-setup=/etc/besu/kzg-trusted-setup.txt
The path to the C-KZG-4844 trusted setup file. Use this option to pass a custom setup file for custom networks or to override the default setup file for named networks.
logging
- Syntax
- Example
- Environment variable
- Example configuration file
-l, --logging=<LEVEL>
--logging=DEBUG
BESU_LOGGING=DEBUG
logging="DEBUG"
Sets logging verbosity. Log levels are OFF
, FATAL
, ERROR
, WARN
, INFO
, DEBUG
, TRACE
, ALL
. The default is INFO
.
max-peers
- Syntax
- Example
- Environment variable
- Configuration file
--max-peers=<INTEGER>
--max-peers=42
BESU_MAX_PEERS=42
max-peers=42
The maximum number of P2P connections you can establish. The default is 25.
metrics-category
- Syntax
- Example
- Environment variable
- Configuration file
--metrics-category=<metrics-category>[,metrics-category...]...
--metrics-category=BLOCKCHAIN,PEERS,PROCESS
BESU_METRICS_CATEGORY=BLOCKCHAIN,PEERS,PROCESS
metrics-category=["BLOCKCHAIN","PEERS","PROCESS"]
A comma-separated list of categories for which to track metrics. The defaults are BLOCKCHAIN
, ETHEREUM
, EXECUTORS
, JVM
, NETWORK
, PEERS
, PERMISSIONING
, PROCESS
, PRUNER
, RPC
, STRATUM
, SYNCHRONIZER
, and TRANSACTION_POOL
.
Other categories are KVSTORE_ROCKSDB
, KVSTORE_PRIVATE_ROCKSDB
, KVSTORE_ROCKSDB_STATS
, and KVSTORE_PRIVATE_ROCKSDB_STATS
.
Categories containing PRIVATE
track metrics when you enable private transactions.
metrics-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--metrics-enabled[=<true|false>]
--metrics-enabled
BESU_METRICS_ENABLED=true
metrics-enabled=true
Enables or disables the metrics exporter. The default is false
.
You can't specify --metrics-enabled
with --metrics-push-enabled
. That is, you can enable either Prometheus polling or Prometheus push gateway support, but not both at once.
metrics-host
- Syntax
- Example
- Environment variable
- Configuration file
--metrics-host=<HOST>
--metrics-host=127.0.0.1
BESU_METRICS_HOST=127.0.0.1
metrics-host="127.0.0.1"
The host on which Prometheus accesses Besu metrics. The metrics server respects the --host-allowlist
option.
The default is 127.0.0.1
.
metrics-port
- Syntax
- Example
- Environment variable
- Configuration file
--metrics-port=<PORT>
--metrics-port=6174
BESU_METRICS_PORT=6174
metrics-port="6174"
The port (TCP) on which Prometheus accesses Besu metrics. The default is 9545
. Ports must be exposed appropriately.
metrics-protocol
- Syntax
- Example
- Environment variable
- Configuration file
--metrics-protocol=<metrics-protocol>
--metrics-protocol=OPENTELEMETRY
BESU_METRICS_PROTOCOL=OPENTELEMETRY
metrics-protocol="OPENTELEMETRY"
Metrics protocol to use: PROMETHEUS
, OPENTELEMETRY
, or NONE
. The default is PROMETHEUS
.
metrics-push-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--metrics-push-enabled[=<true|false>]
--metrics-push-enabled=true
BESU_METRICS_PUSH_ENABLED=true
metrics-push-enabled=true
Enables or disables push gateway integration.
You can't specify --metrics-push-enabled
with --metrics-enabled
. That is, you can enable either Prometheus polling or Prometheus push gateway support, but not both at once.
metrics-push-host
- Syntax
- Example
- Environment variable
- Configuration file
--metrics-push-host=<HOST>
--metrics-push-host=127.0.0.1
BESU_METRICS_PUSH_HOST=127.0.0.1
metrics-push-host="127.0.0.1"
The host of the Prometheus Push Gateway. The default is 127.0.0.1
. The metrics server respects the --host-allowlist
option.
When pushing metrics, ensure you set --metrics-push-host
to the machine on which the push gateway is. Generally, this is a different machine to the machine on which Besu is running.
metrics-push-interval
- Syntax
- Example
- Environment variable
- Configuration file
--metrics-push-interval=<INTEGER>
--metrics-push-interval=30
BESU_METRICS_PUSH_INTERVAL=30
metrics-push-interval=30
The interval, in seconds, to push metrics when in push
mode. The default is 15.
metrics-push-port
- Syntax
- Example
- Environment variable
- Configuration file
--metrics-push-port=<PORT>
--metrics-push-port=6174
BESU_METRICS_PUSH_PORT=6174
metrics-push-port="6174"
The port (TCP) of the Prometheus Push Gateway. The default is 9001
. Ports must be exposed appropriately.
metrics-push-prometheus-job
- Syntax
- Example
- Environment variable
- Configuration file
--metrics-push-prometheus-job=<metricsPrometheusJob>
--metrics-push-prometheus-job="my-custom-job"
BESU_METRICS_PUSH_PROMETHEUS_JOB="my-custom-job"
metrics-push-prometheus-job="my-custom-job"
The job name when in push
mode. The default is besu-client
.
min-block-occupancy-ratio
- Syntax
- Example
- Environment variable
- Configuration file
--min-block-occupancy-ratio=<minBlockOccupancyRatio>
--min-block-occupancy-ratio=0.5
BESU_MIN_BLOCK_OCCUPANCY_RATIO=0.5
min-block-occupancy-ratio="0.5"
Minimum occupancy ratio for a mined block if the transaction pool is not empty. When filling a block during mining, the occupancy ratio indicates the threshold at which the node stops waiting for smaller transactions to fill the remaining space. The default is 0.8.
Besu ignores the --min-block-occupancy-ratio
option for proof of stake networks (for example, Mainnet).
miner-coinbase
- Syntax
- Example
- Environment variable
- Configuration file
--miner-coinbase=<Ethereum account address>
--miner-coinbase=fe3b557e8fb62b89f4916b721be55ceb828dbd73
BESU_MINER_COINBASE=fe3b557e8fb62b89f4916b721be55ceb828dbd73
miner-coinbase="0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"
The account you pay mining rewards to. You must specify a valid coinbase when you enable mining using the --miner-enabled
option or the miner_start
JSON-RPC API method.
miner-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--miner-enabled[=<true|false>]
--miner-enabled=true
BESU_MINER_ENABLED=true
miner-enabled=true
Enables or disables mining when you start the node. The default is false
.
miner-extra-data
- Syntax
- Example
- Environment variable
- Configuration file
--miner-extra-data=<Extra data>
--miner-extra-data=0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C2021
BESU_MINER_EXTRA_DATA=0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C2021
miner-extra-data="0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C2021"
A hex string representing the 32 bytes included in the extra data field of a mined block. The default is 0x.
miner-stratum-enabled
- Syntax
- Environment variable
- Configuration file
--miner-stratum-enabled
BESU_MINER_STRATUM_ENABLED=true
miner-stratum-enabled=true
Enables a node to perform stratum mining. The default is false
.
miner-stratum-host
- Syntax
- Example
- Environment variable
- Configuration file
--miner-stratum-host=<HOST>
--miner-stratum-host=192.168.1.132
BESU_MINER_STRATUM_HOST=192.168.1.132
miner-stratum-host="192.168.1.132"
The host of the stratum mining service. The default is 0.0.0.0
.
miner-stratum-port
- Syntax
- Example
- Environment variable
- Configuration file
--miner-stratum-port=<PORT>
--miner-stratum-port=8010
BESU_MINER_STRATUM_PORT=8010
miner-stratum-port="8010"
The port of the stratum mining service. The default is 8008
. You must expose ports appropriately.
min-gas-price
- Syntax
- Example
- Environment variable
- Configuration file
--min-gas-price=<minTransactionGasPrice>
--min-gas-price=1337
BESU_MIN_GAS_PRICE=1337
min-gas-price=1337
The minimum price a transaction offers to include it in a mined block. The minimum gas price is the lowest value eth_gasPrice
can return. The default is 1000 Wei.
In a free gas network, ensure the minimum gas price is set to zero for every node. Any node with a minimum gas price set higher than zero will silently drop transactions with a zero gas price. You can query a node's gas configuration using eth_gasPrice
.
min-priority-fee
- Syntax
- Example
- Environment variable
- Configuration file
--min-priority-fee=<minPriorityFeePerGas>
--min-gas-price=7
BESU_MIN_PRIORITY_FEE=7
min-priority-fee=7
The minimum priority fee per gas (in Wei) offered by a transaction to be included in a block. The default is 0
.
For a running node, use:
miner_getMinPriorityFee
to get the value.miner_setMinPriorityFee
to change the value.
nat-method
- Syntax
- Example configuration file
--nat-method=UPNP
nat-method="UPNP"
Specify the method for handling NAT environments. The options are:
The default is AUTO
. NONE
disables NAT functionality.
UPnP support is often disabled by default in networking firmware. If disabled by default, explicitly enable UPnP support.
Use UPNPP2PONLY
if you wish to enable UPnP for p2p traffic but not JSON-RPC.
Specifying UPNP
might introduce delays during node startup, especially on networks without a UPnP gateway device.
You must specify DOCKER
when using the Besu Docker image.
network
- Syntax
- Example
- Environment variable
- Configuration file
--network=<NETWORK>
--network=goerli
BESU_NETWORK=goerli
network="goerli"
The predefined network configuration. The default is mainnet
.
Possible values are:
Network | Chain | Type | Default Sync Mode | Description |
---|---|---|---|---|
mainnet | ETH | Production | FAST | The main network |
goerli | ETH | Test | FAST | A PoS network |
holesky | ETH | Test | FAST | A PoS network |
sepolia | ETH | Test | FAST | A PoS network |
dev | ETH | Development | FULL | A PoW network with a low difficulty to enable local CPU mining |
classic | ETC | Production | FAST | The main Ethereum Classic network |
mordor | ETC | Test | FAST | A PoW network |
Values are case insensitive, so either mainnet
or MAINNET
works.
-
You can't use the
--network
and--genesis-file
options at the same time. -
The Ropsten, Rinkeby, and Kiln testnets are deprecated.
network-id
- Syntax
- Example
- Environment variable
- Configuration file
--network-id=<INTEGER>
--network-id=8675309
BESU_NETWORK_ID=8675309
network-id="8675309"
Use this option to override the default network ID. The default value is the same as the chain ID defined in the genesis file.
node-private-key-file
- Syntax
- Example
- Environment variable
- Configuration file
--node-private-key-file=<FILE>
--node-private-key-file=/home/me/me_node/myPrivateKey
BESU_NODE_PRIVATE_KEY_FILE=/home/me/me_node/myPrivateKey
node-private-key-file="/home/me/me_node/myPrivateKey"
The private key file for the node. The default is the key file in the data directory. If no key file exists, Besu creates a key file containing the generated private key, otherwise, the existing key file specifies the node private key.
The private key is not encrypted.
This option is ignored if --security-module
is set to a non-default value.
p2p-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--p2p-enabled[=<true|false>]
--p2p-enabled=false
BESU_P2P_ENABLED=false
p2p-enabled=false
Enables or disables all P2P communication. The default is true
.
p2p-host
- Syntax
- Example
- Environment variable
- Configuration file
--p2p-host=<HOST>
# to listen on all interfaces
--p2p-host=0.0.0.0
# to listen on all interfaces
BESU_P2P_HOST=0.0.0.0
p2p-host="0.0.0.0"
The advertised host that can be used to access the node from outside the network in P2P communication. The default is 127.0.0.1
.
If --nat-method
is set to NONE
, --p2p-host
is not overridden and must be specified for the node to be accessed from outside the network.
p2p-interface
- Syntax
- Example
- Environment variable
- Configuration file
--p2p-interface=<HOST>
--p2p-interface=192.168.1.132
BESU_P2P_INTERFACE=192.168.1.132
p2p-interface="192.168.1.132"
The network interface on which the node listens for P2P communication. Use the option to specify the required network interface when the device that Besu is running on has multiple network interfaces. The default is 0.0.0.0 (all interfaces).
p2p-port
- Syntax
- Example
- Environment variable
- Configuration file
--p2p-port=<PORT>
# to listen on port 1789
--p2p-port=1789
# to listen on port 1789
BESU_P2P_PORT=1789
p2p-port="1789"
The P2P listening ports (UDP and TCP). The default is 30303
. You must expose ports appropriately.
profile
- Syntax
- Example
- Environment variable
- Configuration file
--profile=<PROFILE>
--profile=staker
BESU_PROFILE=staker
profile="staker"
Loads a pre-configured TOML file containing custom settings for a specific user profile. Possible values are:
minimalist_staker
staker
enterprise
orprivate
(aliases for the same profile)
random-peer-priority-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--random-peer-priority-enabled[=<true|false>]
--random-peer-priority-enabled=true
BESU_RANDOM_PEER_PRIORITY_ENABLED=true
random-peer-priority-enabled=true
Enables or disables random prioritization of incoming connections. Enable in small, stable networks to prevent closed groups of peers forming. The default is false
.
remote-connections-limit-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--remote-connections-limit-enabled[=<true|false>]
--remote-connections-limit-enabled=false
BESU_REMOTE_CONNECTIONS_LIMIT_ENABLED=false
remote-connections-limit-enabled=false
Enables or disables using the --remote-connections-max-percentage
option to limit the percentage of remote P2P connections initiated by peers. The default is true
.
In private and permissioned networks with a level of trust between peers, disabling the remote connection limits may increase the speed at which nodes can join the network.
To prevent eclipse attacks, ensure you enable the remote connections limit when connecting to any public network, and especially when using --sync-mode
and --fast-sync-min-peers
.
remote-connections-max-percentage
- Syntax
- Example
- Environment variable
- Configuration file
--remote-connections-max-percentage=<DOUBLE>
--remote-connections-max-percentage=25
BESU_REMOTE_CONNECTIONS_MAX_PERCENTAGE=25
remote-connections-max-percentage=25
The percentage of remote P2P connections you can establish with the node. Must be between 0 and 100, inclusive. The default is 60.
reorg-logging-threshold
- Syntax
- Example
- Environment variable
- Configuration file
--reorg-logging-threshold=<INTEGER>
--reorg-logging-threshold=3
BESU_REORG_LOGGING_THRESHOLD=3
reorg-logging-threshold=3
Minimum depth of chain reorganizations to log. The default is 6.
required-block
- Syntax
- Example
- Environment variable
- Configuration file
--required-block, --required-blocks[=BLOCK=HASH[,BLOCK=HASH...]...]
--required-block=6485846=0x43f0cd1e5b1f9c4d5cda26c240b59ee4f1b510d0a185aa8fd476d091b0097a80
BESU_REQUIRED_BLOCK=6485846=0x43f0cd1e5b1f9c4d5cda26c240b59ee4f1b510d0a185aa8fd476d091b0097a80
required-block=["6485846=0x43f0cd1e5b1f9c4d5cda26c240b59ee4f1b510d0a185aa8fd476d091b0097a80"]
Requires a peer with the specified block number to have the specified hash when connecting, or Besu rejects that peer.
revert-reason-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--revert-reason-enabled[=<true|false>]
--revert-reason-enabled=true
BESU_REVERT_REASON_ENABLED=true
revert-reason-enabled=true
Enables or disables including the revert reason in the transaction receipt, eth_estimateGas
error response, eth_call
error response, and trace
response. The default is false
.
Enabling revert reason may use a significant amount of memory. We don't recommend enabling revert reason when connected to public Ethereum networks.
rpc-gas-cap
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-gas-cap=<INTEGER>
--rpc-gas-cap=50000000
BESU_RPC_GAS_CAP=50000000
rpc-gas-cap=50000000
Sets a limit on the amount of gas for transaction simulation RPC methods. Its value must be greater than or equal to 0
. The default is 0
, which indicates there is no limit. This cap prevents eth_call
requests from using excessive resources.
rpc-http-api
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-api=<api name>[,<api name>,...]
--rpc-http-api=ETH,NET,WEB3
BESU_RPC_HTTP_API=ETH,NET,WEB3
rpc-http-api=["ETH","NET","WEB3"]
A comma-separated list of APIs to enable on the JSON-RPC HTTP channel. When you use this option you must also specify the --rpc-http-enabled
option. The available API options are: ADMIN
, CLIQUE
, DEBUG
, EEA
, ETH
, IBFT
, MINER
, NET
, PERM
, PLUGINS
, PRIV
, QBFT
, TRACE
, TXPOOL
, and WEB3
. The default is: ETH
, NET
, WEB3
.
The singular --rpc-http-api
and plural --rpc-http-apis
are available and are two names for the same option.
rpc-http-api-methods-no-auth
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-api-methods-no-auth=<api method>[,<api method>,...]
--rpc-http-api-methods-no-auth=admin_peers,eth_getWork
BESU_RPC_HTTP_API_METHODS_NO_AUTH=admin_peers,eth_getWork
rpc-http-api-methods-no-auth=["admin_peers","eth_getWork"]
A comma-separated list of JSON-RPC API methods to exclude from authentication services.
You must enable JSON-RPC HTTP authentication using --rpc-http-authentication-enabled
.
rpc-http-authentication-credentials-file
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-authentication-credentials-file=<FILE>
--rpc-http-authentication-credentials-file=/home/me/me_node/auth.toml
BESU_RPC_HTTP_AUTHENTICATION_CREDENTIALS_FILE=/home/me/me_node/auth.toml
rpc-http-authentication-credentials-file="/home/me/me_node/auth.toml"
The credentials file for JSON-RPC API authentication.
rpc-http-authentication-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-authentication-enabled[=<true|false>]
--rpc-http-authentication-enabled=true
BESU_RPC_HTTP_AUTHENTICATION_ENABLED=true
rpc-http-authentication-enabled=true
Enables or disables authentication for the JSON-RPC HTTP service.
rpc-http-authentication-jwt-algorithm
- Syntax
- Example
- Environment variable
- Configuration file
---rpc-http-authentication-jwt-algorithm=<algorithm>
--rpc-http-authentication-jwt-algorithm=ES256
BESU_RPC_HTTP_AUTHENTICATION_JWT_ALGORITHM=ES256
rpc-http-authentication-jwt-algorithm="ES256"
The JWT key algorithm
used to generate the keypair for JSON-RPC HTTP authentication.
Possible values are RS256
, RS384
, RS512
, ES256
, ES384
, and ES512
.
The default is RS256
.
rpc-http-authentication-jwt-public-key-file
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-authentication-jwt-public-key-file=<FILE>
--rpc-http-authentication-jwt-public-key-file=publicKey.pem
BESU_RPC_HTTP_AUTHENTICATION_JWT_PUBLIC_KEY_FILE="publicKey.pem"
rpc-http-authentication-jwt-public-key-file="publicKey.pem"
The JWT provider's public key file used for JSON-RPC HTTP authentication with an external JWT.
rpc-http-cors-origins
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-cors-origins=<url>[,<url>...]... or all or "*"
--rpc-http-cors-origins=http://medomain.com,http://remix.ethereum.org
BESU_RPC_HTTP_CORS_ORIGINS=http://medomain.com,https://meotherdomain.com
rpc-http-cors-origins=["http://medomain.com","https://meotherdomain.com"]
A comma-separated list of domain URLs for CORS validation.
Listed domains can access the node using JSON-RPC. If your client interacts with Besu using a browser app (such as Remix or a block explorer), add the client domain to the list.
The default value is "none"
. If you do not list any domains, browser apps cannot interact with your Besu node.
To run a local Besu node with MetaMask, set --rpc-http-cors-origins
to chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn
.
Remember to also include the dapp domain MetaMask interacts with, for example if your app is deployed on Remix and you're using MetaMask to interact with the contract, use --rpc-http-cors-origins=chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn,http://remix.ethereum.org
For testing and development purposes, use "all"
or "*"
to accept requests from any domain. We don't recommend accepting requests from any domain for production environments.
rpc-http-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-enabled[=<true|false>]
--rpc-http-enabled=true
BESU_RPC_HTTP_ENABLED=true
rpc-http-enabled=true
Enables or disables the JSON-RPC HTTP service. The default is false
.
rpc-http-host
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-host=<HOST>
# to listen on all interfaces
--rpc-http-host=0.0.0.0
BESU_RPC_HTTP_HOST=0.0.0.0
rpc-http-host="0.0.0.0"
The host on which JSON-RPC HTTP listens. The default is 127.0.0.1
.
To allow remote connections, set to 0.0.0.0
.
Setting the host to 0.0.0.0
exposes the RPC connection on your node to any remote connection. In a production environment, ensure you are using a firewall to avoid exposing your node to the internet.
rpc-http-max-active-connections
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-max-active-connections=<INTEGER>
--rpc-http-max-active-connections=100
BESU_RPC_HTTP_MAX_ACTIVE_CONNECTIONS=100
rpc-http-max-active-connections=100
The maximum number of allowed JSON-RPC HTTP connections. Once this limit is reached, incoming connections are rejected. The default is 80.
rpc-http-max-request-content-length
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-max-request-content-length=<LONG>
--rpc-http-max-request-content-length=2097152
BESU_RPC_HTTP_MAX_REQUEST_CONTENT_LENGTH=2097152
rpc-http-max-request-content-length=2097152
The maximum request content length. Besu only accepts JSON-RPC API requests with a body size less than or equal to this value. The default is 5242880 (5 MB).
rpc-http-max-batch-size
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-max-batch-size=<INTEGER>
--rpc-http-max-batch-size=1200
BESU_RPC_HTTP_MAX_BATCH_SIZE=1200
rpc-http-max-batch-size=1200
The maximum number of allowed requests in a RPC batch request. The default limit is 1024
, and -1
specifies no limit.
rpc-http-port
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-port=<PORT>
# to listen on port 3435
--rpc-http-port=3435
BESU_RPC_HTTP_PORT=3435
rpc-http-port="3435"
The port (TCP) on which JSON-RPC HTTP listens. The default is 8545
. You must expose ports appropriately.
rpc-http-tls-ca-clients-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-tls-ca-clients-enabled[=<true|false>]
--rpc-http-tls-ca-clients-enabled=true
BESU_RPC_HTTP_TLS_CA_CLIENTS_ENABLED=true
rpc-http-tls-ca-clients-enabled=true
Enables or disables clients with trusted CA certificates to connect. The default is false
.
You must enable client authentication using the --rpc-http-tls-client-auth-enabled
option.
rpc-http-tls-client-auth-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-tls-client-auth-enabled[=<true|false>]
--rpc-http-tls-client-auth-enabled=true
BESU_RPC_HTTP_TLS_CLIENT_AUTH_ENABLED=true
rpc-http-tls-client-auth-enabled=true
Enables or disables TLS client authentication for the JSON-RPC HTTP service. The default is false
.
You must specify --rpc-http-tls-ca-clients-enabled
and/or rpc-http-tls-known-clients-file
.
rpc-http-tls-cipher-suite
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-tls-cipher-suite=<cipherSuiteName>[, <cipherSuiteName>...]
--rpc-http-tls-cipher-suite=TLS_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
BESU_RPC_HTTP_TLS_CIPHER_SUITE=TLS_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
rpc-http-tls-cipher-suite=["TLS_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"]
A list of comma-separated TLS cipher suites to support.
The singular --rpc-http-tls-cipher-suite
and plural --rpc-http-tls-cipher-suites
are available and are two names for the same option.
rpc-http-tls-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-tls-enabled[=<true|false>]
--rpc-http-tls-enabled=true
BESU_RPC_HTTP_TLS_ENABLED=true
rpc-http-tls-enabled=true
Enables or disables TLS for the JSON-RPC HTTP service. The default is false
.
--rpc-http-enabled
must be enabled.
rpc-http-tls-keystore-file
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-tls-keystore-file=<FILE>
--rpc-http-tls-keystore-file=/home/me/me_node/keystore.pfx
BESU_RPC_HTTP_TLS_KEYSTORE_FILE=/home/me/me_node/keystore.pfx
rpc-http-tls-keystore-file="/home/me/me_node/keystore.pfx"
The Keystore file (in PKCS #12 format) that contains private key and the certificate presented to the client during authentication.
rpc-http-tls-keystore-password-file
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-tls-keystore-password-file=<FILE>
--rpc-http-tls-keystore-password-file=/home/me/me_node/password
BESU_RPC_HTTP_TLS_KEYSTORE_PASSWORD_FILE=/home/me/me_node/password
rpc-http-tls-keystore-password-file="/home/me/me_node/password"
The path to the file containing the password to decrypt the keystore.
rpc-http-tls-known-clients-file
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-tls-known-clients-file=<FILE>
--rpc-http-tls-known-clients-file=/home/me/me_node/knownClients
BESU_RPC_HTTP_TLS_KNOWN_CLIENTS_FILE=/home/me/me_node/knownClients
rpc-http-tls-known-clients-file="/home/me/me_node/knownClients"
The path to the file used to authenticate clients using self-signed certificates or non-public certificates.
Must contain the certificate's Common Name, and SHA-256 fingerprint in the format <CommonName> <hex-string>
.
You must enable client authentication using the --rpc-http-tls-client-auth-enabled
option.
rpc-http-tls-protocol
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-http-tls-protocol=<protocolName>[, <protocolName>...]
--rpc-http-tls-protocol=TLSv1.3,TLSv1.2
BESU_RPC_HTTP_TLS_PROTOCOL=TLSv1.3,TLSv1.2
rpc-http-tls-protocol=["TLSv1.3","TLSv1.2"]
A list of comma-separated TLS protocols to support. The default is DEFAULT_TLS_PROTOCOLS
, a list which includes TLSv1.3
and TLSv1.2
.
The singular --rpc-http-tls-protocol
and plural --rpc-http-tls-protocols
are available and are two names for the same option.
rpc-max-logs-range
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-max-logs-range=<INTEGER>
--rpc-max-logs-range=500
BESU_RPC_MAX_LOGS_RANGE=500
rpc-max-logs-range=500
When using eth_getLogs
, the maximum number of blocks to retrieve logs from. Set to 0 to specify no limit. The default is 5000.
Using eth_getLogs
to get logs from a large range of blocks, especially an entire chain from its genesis block, might cause Besu to hang for an indeterminable amount of time while generating the response.
We recommend setting a range limit or leaving this option at its default value.
rpc-max-trace-filter-range
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-max-trace-filter-range=<INTEGER>
--rpc-max-trace-filter-range=100
--BESU_RPC_MAX_TRACE_FILTER_RANGE=100
rpc-max-trace-filter-range=100
The maximum number of blocks you can supply to the trace_filter
method. The value must be equal to or greater than 0
. Setting this option to 0
indicates there is no limit. The default is 1000
.
rpc-tx-feecap
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-tx-feecap=<MAX_FEE>
--rpc-tx-feecap=1200000000000000000
BESU_RPC_TX_FEECAP=1200000000000000000
rpc-tx-feecap=1200000000000000000
The maximum transaction fee (in Wei) accepted for transactions submitted through the eth_sendRawTransaction
RPC. The default is 1000000000000000000 (1 ether).
If set to 0, then this option is ignored and no cap is applied.
rpc-ws-api
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-ws-api=<api name>[,<api name>...]...
--rpc-ws-api=ETH,NET,WEB3
BESU_RPC_WS_API=ETH,NET,WEB3
rpc-ws-api=["ETH","NET","WEB3"]
A comma-separated list of APIs to enable on the WebSockets channel. When you use this option you must also specify the --rpc-ws-enabled
option. The available API options are: ADMIN
, CLIQUE
, DEBUG
, EEA
, ETH
, IBFT
, MINER
, NET
, PERM
, PLUGINS
, PRIV
, QBFT
, TRACE
, TXPOOL
, and WEB3
. The default is: ETH
, NET
, WEB3
.
The singular --rpc-ws-api
and plural --rpc-ws-apis
options are available and are two names for the same option.
rpc-ws-api-methods-no-auth
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-ws-api-methods-no-auth=<api method>[,<api method>,...]
--rpc-ws-api-methods-no-auth=admin_peers,eth_getWork
BESU_RPC_WS_API_METHODS_NO_AUTH=admin_peers,eth_getWork
rpc-ws-api-methods-no-auth=["admin_peers","eth_getWork"]
A comma-separated list of JSON-RPC API methods to exclude from authentication services.
You must enable JSON-RPC WebSocket authentication using --rpc-ws-authentication-enabled
.
rpc-ws-authentication-credentials-file
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-ws-authentication-credentials-file=<FILE>
--rpc-ws-authentication-credentials-file=/home/me/me_node/auth.toml
BESU_RPC_WS_AUTHENTICATION_CREDENTIALS_FILE=/home/me/me_node/auth.toml
rpc-ws-authentication-credentials-file="/home/me/me_node/auth.toml"
The path to the credentials file for JSON-RPC API authentication.
rpc-ws-authentication-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-ws-authentication-enabled[=<true|false>]
--rpc-ws-authentication-enabled=true
BESU_RPC_WS_AUTHENTICATION_ENABLED=true
rpc-ws-authentication-enabled=true
Enables or disables authentication for the JSON-RPC WebSocket service.
wscat
doesn't support headers. Authentication requires you to pass an authentication token in the request header. To use authentication with WebSockets, you need an app that supports headers.
rpc-ws-authentication-jwt-algorithm
- Syntax
- Example
- Environment variable
- Configuration file
---rpc-ws-authentication-jwt-algorithm=<algorithm>
--rpc-ws-authentication-jwt-algorithm=ES256
BESU_RPC_WS_AUTHENTICATION_JWT_ALGORITHM=ES256
rpc-ws-authentication-jwt-algorithm="ES256"
The JWT key algorithm
used to generate the keypair for JSON-RPC WebSocket authentication.
Possible values are RS256
, RS384
, RS512
, ES256
, ES384
, and ES512
.
The default is RS256
.
rpc-ws-authentication-jwt-public-key-file
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-ws-authentication-jwt-public-key-file=<FILE>
--rpc-ws-authentication-jwt-public-key-file=publicKey.pem
BESU_RPC_WS_AUTHENTICATION_JWT_PUBLIC_KEY_FILE="publicKey.pem"
rpc-ws-authentication-jwt-public-key-file="publicKey.pem"
The JWT provider's public key file used for JSON-RPC WebSocket authentication with an external JWT.
rpc-ws-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-ws-enabled[=<true|false>]
--rpc-ws-enabled=true
BESU_RPC_WS_ENABLED=true
rpc-ws-enabled=true
Enables or disables the WebSocket JSON-RPC service. The default is false
.
rpc-ws-host
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-ws-host=<HOST>
# to listen on all interfaces
--rpc-ws-host=0.0.0.0
BESU_RPC_WS_HOST=0.0.0.0
rpc-ws-host="0.0.0.0"
The host on which WebSocket JSON-RPC listens.
The default is 127.0.0.1
.
To allow remote connections, set to 0.0.0.0
rpc-ws-max-active-connections
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-ws-max-active-connections=<INTEGER>
--rpc-ws-max-active-connections=100
BESU_RPC_WS_MAX_ACTIVE_CONNECTIONS=100
rpc-ws-max-active-connections=100
The maximum number of WebSocket connections allowed for JSON-RPC. Once this limit is reached, incoming connections are rejected. The default is 80.
rpc-ws-max-frame-size
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-ws-max-frame-size=<INTEGER>
--rpc-ws-max-frame-size=65536
BESU_RPC_WS_MAX_FRAME_SIZE=65536
rpc-ws-max-frame-size=65536
The maximum size in bytes for JSON-RPC WebSocket frames. If this limit is exceeded, the WebSocket disconnects. The default is 1048576 (or 1 MB).
rpc-ws-port
- Syntax
- Example
- Environment variable
- Configuration file
--rpc-ws-port=<PORT>
# to listen on port 6174
--rpc-ws-port=6174
BESU_RPC_WS_PORT=6174
rpc-ws-port="6174"
The port (TCP) on which WebSocket JSON-RPC listens. The default is 8546
. You must expose ports appropriately.
security-module
- Syntax
- Example
- Environment variable
- Configuration file
--security-module=<NAME>
--security-module=security_module
BESU_SECURITY_MODULE=security_module
security-module="security_module"
Name of the security module plugin to use. For example, a Hardware Security Module (HSM) or V3 filestore plugin.
The default is the node's local private key file specified using --node-private-key-file
.
static-nodes-file
- Syntax
- Example
- Environment variable
- Configuration file
--static-nodes-file=<FILE>
--static-nodes-file=~/besudata/static-nodes.json
BESU_STATIC_NODES_FILE=~/besudata/static-nodes.json
static-nodes-file="~/besudata/static-nodes.json"
Static nodes JSON file containing the static nodes for this node to connect to. The default is datapath/static-nodes.json
.
strict-tx-replay-protection-enabled
- Syntax
- Example
- Environment variable
- Configuration file
--strict-tx-replay-protection-enabled[=<true|false>]
--strict-tx-replay-protection-enabled=false
STRICT_TX_REPLAY_PROTECTION_ENABLED=false
strict-tx-replay-protection-enabled=false
Enables or disables replay protection, in accordance with EIP-155, on transactions submitted using JSON-RPC. The default is false
.
sync-min-peers
, fast-sync-min-peers
- Syntax
- Example
- Environment variable
- Example configuration file
--sync-min-peers=<INTEGER>
--sync-min-peers=8
BESU_SYNC_MIN_PEERS=8
sync-min-peers=8
The minimum number of peers required before starting sync. The default is 5
. Set to 1
to enable static peers to contribute to the initial sync.
This option does not apply to Proof of Stake networks.
sync-mode
- Syntax
- Example
- Environment variable
- Configuration file
--sync-mode=<MODE>
--sync-mode=SNAP
BESU_SYNC_MODE=SNAP
sync-mode="SNAP"
The synchronization mode. Use SNAP
for snap sync, CHECKPOINT
for checkpoint sync, FAST
for fast sync, and FULL
for full sync.
- The default is
FULL
when connecting to a private network by not using the--network
option and specifying the--genesis-file
option. - The default is
SNAP
when using the--network
option with named networks, except for thedev
development network.SNAP
is also the default if running Besu on the default network (Ethereum Mainnet) by specifying neither network nor genesis file.
If you're running a node with the consensus mechanism IBFT 2.0 or QBFT, your node must use either fast sync or full sync.
- We recommend using snap sync over fast sync because snap sync can be faster by several days.
- It might become impossible to sync Ethereum Mainnet using fast sync in the future, as clients drop support for fast sync. We recommend you update Besu to a version that supports newer sync methods.
- When synchronizing in a mode other than
FULL
, most historical world state data is unavailable. Any methods attempting to access unavailable world state data returnnull
.
target-gas-limit
- Syntax
- Example
- Environment variable
- Configuration file
--target-gas-limit=<INTEGER>
--target-gas-limit=8000000
BESU_TARGET_GAS_LIMIT=8000000
target-gas-limit="8000000"
The gas limit toward which Besu will gradually move on an existing network, if enough miners are in agreement. To change the block gas limit set in the genesis file without creating a new network, use target-gas-limit
. The gas limit between blocks can change only 1/1024th, so the target tells the block creator how to set the gas limit in its block. If the values are the same or within 1/1024th, Besu sets the limit to the specified value. Otherwise, the limit moves as far as it can within that constraint.
If a value for target-gas-limit
is not specified, the block gas limit remains at the value specified in the genesis file.
Use the miner_changeTargetGasLimit
API to update the target-gas-limit
while Besu is running. Alternatively restart Besu with an updated target-gas-limit
value.
tx-pool
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool=<TYPE>
--tx-pool=sequenced
BESU_TX_POOL=sequenced
tx-pool="sequenced"
Type of transaction pool to use.
Set to layered
to use the layered transaction pool implementation.
Set to sequenced
(previously known as legacy
) to opt out of the layered transaction pool.
The default is layered
.
tx-pool-enable-save-restore
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-enable-save-restore[=<true|false>]
--tx-pool-enable-save-restore=true
BESU_TX_POOL_ENABLE_SAVE_RESTORE=true
tx-pool-enable-save-restore=true
Enables or disables saving the transaction pool contents to a
file on shutdown and reloading it at startup.
The default is false
.
You can define a custom path to the transaction pool file using the --tx-pool-save-file
option.
tx-pool-layer-max-capacity
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-layer-max-capacity=<INTEGER>
--tx-pool-layer-max-capacity=20000000
BESU_TX_POOL_LAYER_MAX_CAPACITY=20000000
tx-pool-layer-max-capacity="20000000"
Maximum amount of memory (in bytes) that any layer within the layered transaction
pool can occupy.
The default is 12500000
, or 12.5 MB.
There are two memory-limited layers in the transaction pool, so the expected memory consumption is twice the value specified by this option, or 25 MB by default. Increase this value if you have spare RAM and the eviction rate is high for your network.
tx-pool-limit-by-account-percentage
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-limit-by-account-percentage=<DOUBLE>
--tx-pool-limit-by-account-percentage=0.1
BESU_TX_POOL_LIMIT_BY_ACCOUNT_PERCENTAGE=0.1
tx-pool-limit-by-account-percentage=0.4
The maximum percentage of transactions from a single sender kept in the transaction pool.
Accepted values are in the range (0–1]
.
The default is .001
, or 0.1% of transactions from a single sender to be kept in the pool.
-
With the layered transaction pool implementation, this option is not applicable. Replace this option with
--tx-pool-max-future-by-sender
to specify the maximum number of sequential transactions from a single sender kept in the pool. -
The default value is often unsuitable for private networks. This feature mitigates future-nonce transactions from filling the pool without ever being executable by Besu. This is important for Mainnet, but may cause issues on private networks. Please update this value or set to
1
if you know the nodes gossiping transactions in your network.
tx-pool-max-future-by-sender
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-max-future-by-sender=<INTEGER>
--tx-pool-max-future-by-sender=250
BESU_TX_POOL_MAX_FUTURE_BY_SENDER=250
tx-pool-max-future-by-sender="250"
The maximum number of sequential transactions from a single sender kept in the
layered transaction pool.
The default is 200
.
Increase this value to allow a single sender to fit more transactions in a single block. For private networks, you can set this in the hundreds or thousands if you want to ensure transactions with large nonce gaps remain in the transaction pool.
tx-pool-max-prioritized
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-max-prioritized=<INTEGER>
--tx-pool-max-prioritized=1500
BESU_TX_POOL_MAX_PRIORITIZED=1500
tx-pool-max-prioritized="1500"
The maximum number of transactions that are prioritized in the
layered transaction pool.
The default is 2000
.
For private networks, we recommend setting this value to the maximum number of transactions that fit in a block in your network.
tx-pool-max-size
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-max-size=<INTEGER>
--tx-pool-max-size=2000
BESU_TX_POOL_MAX_SIZE=2000
tx-pool-max-size="2000"
The maximum number of transactions kept in the transaction pool.
The default is 4096
.
With the layered transaction pool
implementation, this option is not applicable because the layered pool is limited by memory size
instead of the number of transactions.
To configure the maximum memory capacity, use --tx-pool-layer-max-capacity
.
tx-pool-min-gas-price
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-min-gas-price=<INTEGER>
--tx-pool-min-gas-price=2000
BESU_TX_POOL_MIN_GAS_PRICE=2000
tx-pool-min-gas-price="2000"
The minimum gas price, in wei, required for a transaction to be accepted into the transaction pool.
tx-pool-no-local-priority
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-no-local-priority[=<true|false>]
--tx-pool-no-local-priority=true
BESU_TX_POOL_NO_LOCAL_PRIORITY=true
tx-pool-no-local-priority=true
If this option is set to true
, senders of transactions submitted via RPC are not prioritized over
remote transactions in the transaction pool.
The default is false
.
tx-pool-price-bump
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-price-bump=<INTEGER>
--tx-pool-price-bump=25
BESU_TX_POOL_PRICE_BUMP=25
tx-pool-price-bump=25
The price bump percentage to replace an existing transaction in the transaction
pool.
For networks with a base fee and priced gas, the default is 10
, or 10%.
For networks with zero base fee, or free gas, the default is 0
.
tx-pool-priority-senders
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-priority-senders=<address>[,<address>,...]
--tx-pool-priority-senders=0x13003d886a7be927d9451c27eb3bc8d3616e26e9
BESU_TX_POOL_PRIORITY_SENDERS=0x13003d886a7be927d9451c27eb3bc8d3616e26e9
tx-pool-priority-senders="0x13003d886a7be927d9451c27eb3bc8d3616e26e9"
A comma-separated list of sender addresses to prioritize in the transaction pool.
Transactions sent from these addresses, from any source, are prioritized and only evicted after all others.
If not specified, only senders submitting transactions via RPC have priority (unless
--tx-pool-no-local-priority
is set to true
).
tx-pool-retention-hours
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-retention-hours=<INTEGER>
--tx-pool-retention-hours=5
BESU_TX_POOL_RETENTION_HOURS=5
tx-pool-retention-hours=5
The maximum period (in hours) to hold pending transactions in the transaction pool.
The default is 13
.
With the layered transaction pool implementation, this option is not applicable because old transactions will expire when the memory cache is full.
tx-pool-save-file
- Syntax
- Example
- Environment variable
- Configuration file
--tx-pool-save-file=<FILE>
--tx-pool-save-file=/home/me/me_node/node_txpool.dump
BESU_TX_POOL_SAVE_FILE=/home/me/me_node/node_txpool.dump
tx-pool-save-file="/home/me/me_node/node_txpool.dump"
The path to the file that stores the transaction pool's
content if the save and restore functionality is enabled using
--tx-pool-enable-save-restore
.
The file is created on shutdown and reloaded during startup.
The default file name is txpool.dump
in the data directory.
version
- Syntax
-V, --version
Prints version information and exits.
version-compatibility-protection
- Syntax
- Example
- Environment variable
- Configuration file
--version-compatibility-protection[=<true|false>]
--version-compatibility-protection=true
BESU_VERSION_COMPATIBILITY_PROTECTION=true
version-compatibility-protection=true
Enables or disables performing version compatibility checks when starting Besu.
If set to true
, it checks that the version of Besu being started is the same
or later than the version of Besu that previously started with the same data directory.
The default is false
for named networks, such as Mainnet or Goerli, and true
for non-named networks.
Xhelp
- Syntax
-X, --Xhelp
Displays the early access options and their descriptions, and exits.
The displayed options are unstable and may change between releases.