You can configure your node using the command line options below (also called flags).
There are also sub-commands, which can be used to invoke functionality such as the console or blockchain import/export.
op-geth
. op-geth
implements the Execution-Layer, with minimal changes for a secure Ethereum-equivalent application environment.
The following are options from v1.101308.0
Please note that the executable is still named geth
to maintain a minimal diff.
Global options
Account
allow-insecure-unlock
Allows insecure account unlocking when account-related RPCs are exposed by HTTP. The default value isfalse
.
keystore
Directory for the keystore. The default is inside the data directory.lightkdf
Reduce key-derivation RAM & CPU usage at some expense of KDF strength. The default value isfalse
.
password
Password file to use for non-interactive password input.pcscdpath
Path to the smartcard daemon (pcscd) socket file. The default value is"/run/pcscd/pcscd.comm"
.
signer
External signer (url or path to ipc file).unlock
Comma separated list of accounts to unlock.usb
Enable monitoring and management of USB hardware wallets. The default value isfalse
.
API and Console
authrpc.addr
Listening address for authenticated APIs. The default value is"localhost"
.
authrpc.jwtsecret
Path to a JWT secret to use for authenticated RPC endpoints.authrpc.port
Listening port for authenticated APIs. The default value is8551
.
authrpc.vhosts
Comma separated list of virtual hostnames from which to accept requests (server enforced). The default value is"localhost"
. Accepts ’*’ wildcard.
exec
Execute JavaScript statement.graphql
Enable GraphQL on the HTTP-RPC server. Note that GraphQL can only be started if an HTTP server is started as well. The default value isfalse
.
graphql.corsdomain
Comma separated list of domains from which to accept cross origin requests (browser enforced).graphql.vhosts
Comma separated list of virtual hostnames from which to accept requests (server enforced). The default value is"localhost"
. Accepts ’*’ wildcard.
header
Pass custom headers to the RPC server when using--remotedb
or the geth attach console. This flag can be given multiple times.
http
Enable the HTTP-RPC server. The default value isfalse
.
http.addr
HTTP-RPC server listening interface. The default value is"localhost"
.
http.api
API’s offered over the HTTP-RPC interface.http.corsdomain
Comma separated list of domains from which to accept cross origin requests (browser enforced).http.port
HTTP-RPC server listening port. The default value is8545
.
http.rpcprefix`\
HTTP path prefix on which JSON-RPC is served. Use ’/’ to serve on all paths.http.vhosts
Comma separated list of virtual hostnames from which to accept requests (server enforced). The default value is"localhost"
. Accepts ’*’ wildcard.
ipcdisable
Disable the IPC-RPC server. The default value isfalse
.
ipcpath
Filename for IPC socket/pipe within the datadir (explicit paths escape it).jspath
JavaScript root path forloadScript
. The default value is .
(current directory).
preload
Comma separated list of JavaScript files to preload into the console.rpc.allow-unprotected-txs
Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC. The default value isfalse
.
rpc.batch-request-limit
Maximum number of requests in a batch. The default value is1000
.
rpc.batch-response-max-size
Maximum number of bytes returned from a batched call. The default value is25000000
.
rpc.enabledeprecatedpersonal
Enables the (deprecated) personal namespace. The default value isfalse
.
rpc.evmtimeout
Sets a timeout used for eth_call (0=infinite). The default value is5s
.
rpc.gascap
Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite). The default value is50000000
.
rpc.txfeecap
Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap). The default value is1
.
ws
Enable the WS-RPC server. The default value isfalse
.
ws.addr
WS-RPC server listening interface. The default value is"localhost"
.
ws.api
API’s offered over the WS-RPC interface.ws.origins
Origins from which to accept websockets requests.ws.port
WS-RPC server listening port. The default value is8546
.
ws.rpcprefix
HTTP path prefix on which JSON-RPC is served over WS. Use ’/’ to serve on all paths.Developer Chain
dev
Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled. The default value isfalse
.
dev.gaslimit
Initial block gas limit. The default value is11500000
.
dev.period
Block period to use in developer mode (0 = mine only if transaction pending). The default value is0
.
Ethereum
bloomfilter.size
Megabytes of memory allocated to bloom-filter for pruning. The default value is2048
.
config
TOML configuration file.datadir
Data directory for the databases and keystore. The default value is/home/<user>/.ethereum
.
datadir.ancient
Root directory for ancient data (default = inside chaindata).datadir.minfreedisk
Minimum free disk space in MB, once reached triggers auto shut down (default = —cache.gc converted to MB, 0 = disabled).db.engine
Backing database implementation to use (‘pebble’ or ‘leveldb’).eth.requiredblocks
Comma separated block number-to-hash mappings to require for peering (<number>=<hash>
).
exitwhensynced
Exits after block synchronization completes. The default value isfalse
.
goerli
Görli network: pre-configured proof-of-authority test network. The default value isfalse
.
holesky
Holesky network: pre-configured proof-of-stake test network. The default value isfalse
.
mainnet
Ethereum mainnet. The default value isfalse
.
networkid
Explicitly set network id (integer). The default value is1
. For testnets: use —goerli, —sepolia, —holesky instead.
op-network, beta.op-network
Select a pre-configured OP-Stack network (warning: op-mainnet and op-goerli require special sync, datadir is recommended), options: base-devnet-0-goerli-dev-0, base-devnet-0-sepolia-dev-0, base-goerli, base-mainnet, base-sepolia, conduit-devnet-0-goerli-dev-0, lyra-mainnet, mode-mainnet, op-goerli, op-labs-chaosnet-0-goerli-dev-0, op-labs-devnet-0-goerli-dev-0, op-mainnet, op-sepolia, oplabs-devnet-0-sepolia-dev-0, orderly-mainnet, pgn-mainnet, pgn-sepolia, zora-mainnet, zora-sepoliaoverride.cancun
Manually specify the Cancun fork timestamp, overriding the bundled setting. The default value is0
.
override.canyon
Manually specify the Optimism Canyon fork timestamp, overriding the bundled setting. The default value is0
.
override.ecotone
Manually specify the Optimism Ecotone fork timestamp, overriding the bundled setting. The default value is0
.
override.fjord
Manually specify the Optimism Fjord fork timestamp, overriding the bundled setting. The default value is0
.
override.interop
Manually specify the Optimism Interop feature-set fork timestamp, overriding the bundled setting.
The default value is 0
.
override.verkle
Manually specify the Verkle fork timestamp, overriding the bundled setting. The default value is0
.
sepolia
Sepolia network: pre-configured proof-of-work test network. The default value isfalse
.
snapshot
Enables snapshot-database mode. The default value is true
.
Gas Price Oracle
gpo.blocks
Number of recent blocks to check for gas prices. The default value is20
.
gpo.ignoreprice
Gas price below which GPO will ignore transactions. The default value is2
.
gpo.maxprice
Maximum transaction priority fee (or gasprice before London fork) to be recommended by GPO. The default value is500000000000
.
gpo.minsuggestedpriorityfee
Minimum transaction priority fee to suggest. Used on OP chains when blocks are not full. The default value is1000000
.
gpo.percentile
Suggested gas price is the given percentile of a set of recent transaction gas prices. The default value is60
.
Light Client
light.egress
Outgoing bandwidth limit for serving light clients (deprecated). The default value is0
.
light.ingress
Incoming bandwidth limit for serving light clients (deprecated). The default value is0
.
light.maxpeers
Maximum number of light clients to serve, or light servers to attach to (deprecated). The default value is100
.
light.nopruning
Disable ancient light chain data pruning (deprecated). The default value isfalse
.
light.nosyncserve
Enables serving light clients before syncing (deprecated) The default value isfalse
.
light.serve
Maximum percentage of time allowed for serving LES requests (deprecated). The default value is0
.
Logging and Debugging
log.compress
Compress the log files. The default value isfalse
.
log.file
Write logs to a file.log.format
Log format to use (json|logfmt|terminal).log.maxage
Maximum number of days to retain a log file. The default value is30
.
log.maxbackups
Maximum number of log files to retain. The default value is10
.
log.maxsize
Maximum size in MBs of a single log file. The default value is100
.
log.rotate
Enables log file rotation. The default value is false
.
log.vmodule
Per-module verbosity: comma-separated list of<pattern>=<level>
(e.g. eth/*=5,p2p=4).
nocompaction
Disables database compaction after import. The default value isfalse
.
pprof
Enable the pprof HTTP server. The default value isfalse
.
pprof.addr
pprof HTTP server listening interface. The default value is"127.0.0.1"
.
pprof.blockprofilerate
Turn on block profiling with the given rate. The default value is0
.
pprof.cpuprofile
Write CPU profile to the given file.pprof.memprofilerate
Turn on memory profiling with the given rate. The default value is524288
.
pprof.port
pprof HTTP server listening port. The default value is6060
.
remotedb
URL for remote database.trace
Write execution trace to the given file.verbosity
Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail. The default value is3
.
Metrics and Stats
ethstats
Reporting URL of an ethstats service (nodename:secret@host:port).metrics
Enable metrics collection and reporting. The default value isfalse
.
metrics.addr
Enable stand-alone metrics HTTP server listening interface.metrics.expensive
Enable expensive metrics collection and reporting. The default value isfalse
.
metrics.influxdb
Enable metrics export/push to an external InfluxDB database. The default value isfalse
.
metrics.influxdb.bucket
InfluxDB bucket name to push reported metrics to (v2 only). The default value is"geth"
.
metrics.influxdb.database
InfluxDB database name to push reported metrics to. The default value is"geth"
.
metrics.influxdb.endpoint
InfluxDB API endpoint to report metrics to. The default value is"http://localhost:8086"
.
metrics.influxdb.organization
InfluxDB organization name (v2 only). The default value is"geth"
.
metrics.influxdb.password
Password to authorize access to the database. The default value is"test"
.
metrics.influxdb.tags
Comma-separated InfluxDB tags (key/values) attached to all measurements. The default value is"host=localhost"
.
metrics.influxdb.token
Token to authorize access to the database (v2 only). The default value is"test"
.
metrics.influxdb.username
Username to authorize access to the database. The default value is"test"
.
metrics.influxdbv2
Enable metrics export/push to an external InfluxDB v2 database. The default value isfalse
.
metrics.port
Metrics HTTP server listening port. The default value is6060
.
Please note that --metrics.addr
must be set to start the server.
Miner
mine
Enable mining. The default value isfalse
.
miner.etherbase
0x prefixed public address for block mining rewards.miner.extradata
Block extra data set by the miner (default = client version).miner.gaslimit
Target gas ceiling for mined blocks. The default value is30000000
.
miner.gasprice
Minimum gas price for mining a transaction. The default value is0
.
miner.newpayload-timeout
Specify the maximum time allowance for creating a new payload. The default value is2s
.
miner.recommit
Time interval to recreate the block being mined. The default value is2s
.
Miscellaneous
help
Show help. This is typically used to display command-line options and usage information.synctarget
Hash of the block to full sync to (dev testing feature).version
Nodes built from source do not output the correct version numbers that are reported on
the GitHub release page.
Networking
bootnodes
Comma separated enode URLs for P2P discovery bootstrap.discovery.dns
Sets DNS discovery entry points (use "" to disable DNS).discovery.port
Use a custom UDP port for P2P discovery. The default value is30303
.
discovery.v4
Enables the V4 discovery mechanism. The default value isfalse
.
discovery.v5
Enables the V5 discovery mechanism. The default value istrue
.
identity
Custom node name.maxpeers
Maximum number of network peers (network disabled if set to 0). The default value is50
.
maxpendpeers
Maximum number of pending connection attempts (defaults used if set to 0). The default value is0
.
nat
NAT port mapping mechanism (any|none|upnp|pmp|pmp:<IP>|extip:<IP>
). The default value is "any"
.
netrestrict
Restricts network communication to the given IP networks (CIDR masks).nodekey
P2P node key file.nodekeyhex
P2P node key as hex (for testing).nodiscover
Disables the peer discovery mechanism (manual peer addition). The default value isfalse
.
port
Network listening port. The default value is30303
.
Performance Tuning
cache
Megabytes of memory allocated to internal caching.
The default is 4096
MB for mainnet full node and 128
MB for light mode.
cache.blocklogs
Size (in number of blocks) of the log cache for filtering. The default value is32
.
cache.database
Percentage of cache memory allowance to use for database I/O. The default value is50
.
cache.gc
Percentage of cache memory allowance to use for trie pruning. The default is25%
for full mode
and 0%
for archive mode.
cache.noprefetch
Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data). The default value isfalse
.
cache.preimages
Enable recording the SHA3/keccak preimages of trie keys. The default value isfalse
.
cache.snapshot
Percentage of cache memory allowance to use for snapshot caching. The default is10%
for full mode and 20%
for archive mode.
cache.trie
Percentage of cache memory allowance to use for trie caching. The default is15%
for full mode and 30%
for archive mode.
crypto.kzg
KZG library implementation to use; gokzg (recommended) or ckzg. The default value is"gokzg"
.
fdlimit
Raise the open file descriptor resource limit. The default is the system fd limit.Rollup Node
rollup.computependingblock
By default, the pending block equals the latest block to save resources and not leak transactions from the tx-pool. This flag enables computing of the pending block from the tx-pool instead. The default value isfalse
.
rollup.disabletxpoolgossip
Disable transaction pool gossip. The default value isfalse
.
rollup.halt
Opt-in option to halt on incompatible protocol version requirements of the given level (major/minor/patch/none), as signaled through the Engine API by the rollup node.rollup.historicalrpc
RPC endpoint for historical data.rollup.historicalrpctimeout
Timeout for historical RPC requests. The default value is5s
.
rollup.sequencerhttp
HTTP endpoint for the sequencer mempool.rollup.superchain-upgrades
Apply superchain-registry config changes to the local chain-configuration. The default value istrue
.
State History Management
gcmode
Blockchain garbage collection mode, only relevant instate.scheme=hash
.
Options are “full” and “archive”. The default value is "full"
.
history.state
Number of recent blocks to retain state history for. The default is90000
blocks, with 0
representing the entire chain.
history.transactions
Number of recent blocks to maintain transactions index for. The default is about two months (2350000
blocks), with 0
representing the entire chain.
state.scheme
Scheme to use for storing Ethereum state. Options are ‘hash’ or ‘path’.syncmode
Blockchain sync mode. Options are “snap”, or “full”. The default value is"snap"
.
Transaction Pool (Blob)
blobpool.datacap
Disk space to allocate for pending blob transactions (soft limit). The default value is10737418240
.
blobpool.pricebump
Price bump percentage to replace an already existing blob transaction. The default value is100
.
Transaction Pool (EVM)
txpool.accountqueue
Maximum number of non-executable transaction slots permitted per account. The default value is64
.
txpool.accountslots
Minimum number of executable transaction slots guaranteed per account. The default value is16
.
txpool.globalqueue
Maximum number of non-executable transaction slots for all accounts. The default value is1024
.
txpool.globalslots
Maximum number of executable transaction slots for all accounts. The default value is5120
.
txpool.journal
Disk journal for local transactions to survive node restarts. The default value is"transactions.rlp"
.
txpool.journalremotes
Includes remote transactions in the journal. The default value isfalse
.
txpool.lifetime
Maximum amount of time non-executable transactions are queued. The default value is3h0m0s
.
txpool.locals
Comma-separated accounts to treat as locals (no flush, priority inclusion).txpool.nolocals
Disables price exemptions for locally submitted transactions. The default value isfalse
.
txpool.pricebump
Price bump percentage to replace an already existing transaction. The default value is10
.
txpool.pricelimit
Minimum gas price tip to enforce for acceptance into the pool. The default value is1
.
txpool.rejournal
Time interval to regenerate the local transaction journal. The default value is1h0m0s
.
Virtual machine
vmdebug
Record information useful for VM and contract debugging. The default value isfalse
.