> ## Documentation Index
> Fetch the complete documentation index at: https://docs.celo.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration Reference

> Reference for the environment variables and client flags used by celo-l2-node-docker-compose

This page documents the `.env` variables and the key client flags used by the [celo-l2-node-docker-compose](https://github.com/celo-org/celo-l2-node-docker-compose) setup. For the exhaustive command-line flag references, see the Optimism [op-reth config](https://docs.optimism.io/node-operators/reference/op-reth-config) and [op-node config](https://docs.optimism.io/node-operators/reference/op-node-config) docs.

<Info>
  **Execution client: op-reth**

  The variables below configure `op-reth`, Celo's supported execution client. Support for `op-geth` has ended; see [End of Support for op-geth](/operate/notices/op-geth-deprecation).
</Info>

## Node type and sync

| Variable | Values | Description |
| - | - | - |
| `NODE_TYPE` | `minimal`, `full` (default), `archive` | Sets the prune profile and the snapshot tier downloaded. A `minimal` node prunes transaction lookups fully and keeps only the most recent receipts, so it serves latest-state RPC on the smallest disk but little history. A `full` node stores historical state only for recent blocks. An `archive` node stores historical state for the entire chain (roughly 10x the storage). All three execute every block. |
| `OP_RETH__SNAPSHOT` | `true`, `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](/operate/operators/run-node)); datadirs written by `op-geth` cannot be reused. For archive nodes, see [Running an archive node](/operate/operators/archive-node).

## L1 connection

| Variable | Description |
| - | - |
| `OP_NODE__RPC_ENDPOINT` | Layer 1 RPC endpoint. For reliability, use a paid plan or a self-hosted node. |
| `OP_NODE__L1_BEACON` | Layer 1 beacon endpoint. For reliability, use a paid plan or a self-hosted node. |
| `OP_NODE__RPC_TYPE` | Provider type for the L1 RPC endpoint: `alchemy`, `quicknode` (ETH only), `erigon`, or `basic` for other providers. |
| `HEALTHCHECK__REFERENCE_RPC_PROVIDER` | Public 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.

| Variable | Description |
| - | - |
| `HISTORICAL_RPC_DATADIR_PATH` | Path 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_RPC` | RPC 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](/operate/operators/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.

| Variable | Description |
| - | - |
| `OP_NODE__P2P_ADVERTISE_IP` | Public IP that op-node advertises via discovery. If unset, other nodes cannot discover yours. |
| `OP_RETH__NAT` | How 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:

| Variable | Default | Service |
| - | - | - |
| `PORT__OP_RETH_HTTP` | `9993` | op-reth JSON-RPC (HTTP) |
| `PORT__OP_RETH_WS` | `9994` | op-reth JSON-RPC (WebSocket) |
| `PORT__OP_RETH_P2P` | `30303` | op-reth P2P |
| `PORT__OP_NODE_HTTP` | `9545` | op-node RPC |
| `PORT__OP_NODE_P2P` | `9222` | op-node P2P |
| `PORT__HEALTHCHECK_METRICS` | `7300` | Healthcheck metrics |
| `PORT__PROMETHEUS` | `9090` | Prometheus |
| `PORT__GRAFANA` | `3000` | Grafana |
| `PORT__INFLUXDB` | `8086` | InfluxDB |
| `PORT__HISTORICAL_RPC_NODE_HTTP` | `9991` | Legacy L1 archive node (HTTP) |
| `PORT__HISTORICAL_RPC_NODE_WS` | `9992` | Legacy L1 archive node (WebSocket) |
| `PORT_EIGENDA_PROXY` | `4242` | EigenDA proxy |

## Data directory

| Variable | Description |
| - | - |
| `DATADIR_PATH` | Datadir 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](/operate/notices/req-resp-cl-sync-deprecation).
* **`--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](/operate/operators/monitoring).

For every other op-reth/op-node flag, see the Optimism [op-reth config](https://docs.optimism.io/node-operators/reference/op-reth-config) and [op-node config](https://docs.optimism.io/node-operators/reference/op-node-config) references.

## Monitoring

Set `MONITORING_ENABLED=true` to start the Grafana, Prometheus, InfluxDB, and healthcheck stack. See [Monitoring & metrics](/operate/operators/monitoring).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.