Skip to main content
This page documents the .env variables and the key client flags used by the celo-l2-node-docker-compose setup. For the exhaustive command-line flag references, see the Optimism op-reth config and op-node config docs.
Execution client: op-rethThe variables below configure op-reth, Celo’s primary execution client. The op-geth equivalents remain valid until your network’s switch date — see the op-geth variables accordion below and End of Support for op-geth.

Node type and sync

VariableValuesDescription
NODE_TYPEfull (default), archiveA full node stores historical state only for recent blocks. An archive node stores historical state for the entire chain (roughly 10x the storage).
OP_RETH__SNAPSHOTtrue, false (default)When true, an empty datadir is bootstrapped from a published snapshot (snapshots.celo.org). Required on mainnet, which needs the pre-L2 history; optional on Celo Sepolia, which can sync from genesis. Ignored once the datadir holds data.
op-reth syncs by executing every block. A new node starts from an empty datadir (see Run a node with Docker); datadirs written by op-geth cannot be reused. For archive nodes, see Running an archive node.

L1 connection

VariableDescription
OP_NODE__RPC_ENDPOINTLayer 1 RPC endpoint. For reliability, use a paid plan or a self-hosted node.
OP_NODE__L1_BEACONLayer 1 beacon endpoint. For reliability, use a paid plan or a self-hosted node.
OP_NODE__RPC_TYPEProvider type for the L1 RPC endpoint: alchemy, quicknode (ETH only), erigon, or basic for other providers.
HEALTHCHECK__REFERENCE_RPC_PROVIDERPublic L2 RPC endpoint to compare against in the healthcheck (defaults to https://forno.celo.org).

Historical state (pre-hardfork)

An L2 archive node serves pre-hardfork state by proxying to a legacy Celo L1 archive node.
VariableDescription
HISTORICAL_RPC_DATADIR_PATHPath to a pre-hardfork archive datadir. If set, a Celo L1 node runs in archive mode and op-reth proxies pre-migration requests to it.
OP_RETH__HISTORICAL_RPCRPC endpoint of a running legacy archive node. If set, this overrides HISTORICAL_RPC_DATADIR_PATH and no local Celo L1 node is started.
See Running an archive node for the full setup.

Networking (P2P)

Configure these so other nodes can discover and reach yours. If they are wrong, your node may fail to stay connected and synced.
VariableDescription
OP_NODE__P2P_ADVERTISE_IPPublic IP that op-node advertises via discovery. If unset, other nodes cannot discover yours.
OP_RETH__NATHow op-reth determines its public IP for discovery. One of any, none, upnp, publicip, extip:<IP>, stun:<IP:PORT>. The default any auto-detects; the most reliable option is extip:<your-public-ip>.

Ports

Each PORT__* variable overrides a default exposed in docker-compose.yml. Defaults:
VariableDefaultService
PORT__OP_RETH_HTTP9993op-reth JSON-RPC (HTTP)
PORT__OP_RETH_WS9994op-reth JSON-RPC (WebSocket)
PORT__OP_RETH_P2P30303op-reth P2P
PORT__OP_NODE_HTTP9545op-node RPC
PORT__OP_NODE_P2P9222op-node P2P
PORT__HEALTHCHECK_METRICS7300Healthcheck metrics
PORT__PROMETHEUS9090Prometheus
PORT__GRAFANA3000Grafana
PORT__INFLUXDB8086InfluxDB
PORT__HISTORICAL_RPC_NODE_HTTP9991Legacy L1 archive node (HTTP)
PORT__HISTORICAL_RPC_NODE_WS9992Legacy L1 archive node (WebSocket)
PORT_EIGENDA_PROXY4242EigenDA proxy

Data directory

VariableDescription
DATADIR_PATHDatadir location (defaults to ./envs/<network>/datadir). Must be empty on first start — op-reth initialises a new datadir there and cannot reuse one written by op-geth.

Key client flags

These flags are set for you by the compose start scripts; they are listed here because they are the Celo-specific ones operators most often need to know about.
  • --rollup.sequencer (op-reth, set via OP_RETH__SEQUENCER_URL) — the sequencer that transactions submitted to your node are forwarded to. Mainnet: https://cel2-sequencer.celo.org; Celo Sepolia: https://sequencer.celo-sepolia.celo-testnet.org. If this is wrong, transactions submitted to your node are not executed.
  • --syncmode=execution-layer (op-node) — op-node syncs via the execution client rather than the deprecated consensus-layer req/resp path. See Deprecation of Req/Res CL P2P Sync.
  • --l2.enginekind=reth (op-node) — tells op-node which execution client it is driving. It is set to reth for op-reth.
  • --metrics.enabled (op-node) — exposes Prometheus metrics on port 7300. See Monitoring & metrics.
For every other op-reth/op-node flag, see the Optimism op-reth config and op-node config references.
If you are still running op-geth from an older checkout of celo-l2-node-docker-compose, use these equivalents in place of their OP_RETH__ counterparts. They stop working once your network reaches its switch date.
VariableDescription
OP_GETH__SYNCMODEsnap or full. If unset, a full node defaults to snap and an archive node to full. full requires a migrated pre-hardfork datadir.
OP_GETH__NATHow op-geth determines its public IP for discovery. One of any, none, upnp, pmp, pmp:<IP>, extip:<IP>, stun:<IP:PORT>.
OP_GETH__HISTORICAL_RPCRPC endpoint of a running legacy archive node for pre-hardfork state.
PORT__OP_GETH_HTTP / PORT__OP_GETH_WS / PORT__OP_GETH_P2Pop-geth JSON-RPC (HTTP 9993, WebSocket 9994) and P2P (30303) ports.
IPC_PATHAlternative location for the geth IPC file, if the datadir disk does not support unix domain sockets.
IMAGE_TAG__OP_GETHPin a specific op-geth image version.
Key op-geth flags: --rollup.sequencerhttp (sequencer endpoint), --history.transactions=0 (index the full transaction history), and --l2.enginekind=geth on op-node.

Monitoring

Set MONITORING_ENABLED=true to start the Grafana, Prometheus, InfluxDB, and healthcheck stack. See Monitoring & metrics.