> ## Documentation Index
> Fetch the complete documentation index at: https://celo-64ac69bd-palango-docs-restructure.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration Reference

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 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](/infra-partners/notices/op-geth-deprecation).
</Info>

## Node type and sync

| Variable            | Values                      | Description                                                                                                                                                                                                                                      |
| ------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `NODE_TYPE`         | `full` (default), `archive` | A `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__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](/infra-partners/operators/run-node)); datadirs written by `op-geth` cannot be reused. For archive nodes, see [Running an archive node](/infra-partners/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](/infra-partners/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](/infra-partners/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](/infra-partners/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.

<Accordion title="op-geth variables (until your switch date)">
  If you are still running `op-geth` from an older checkout of [celo-l2-node-docker-compose](https://github.com/celo-org/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](/infra-partners/notices/op-geth-deprecation).

  | Variable                                                        | Description                                                                                                                                    |
  | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
  | `OP_GETH__SYNCMODE`                                             | `snap` 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__NAT`                                                  | How op-geth determines its public IP for discovery. One of `any`, `none`, `upnp`, `pmp`, `pmp:<IP>`, `extip:<IP>`, `stun:<IP:PORT>`.           |
  | `OP_GETH__HISTORICAL_RPC`                                       | RPC endpoint of a running legacy archive node for pre-hardfork state.                                                                          |
  | `PORT__OP_GETH_HTTP` / `PORT__OP_GETH_WS` / `PORT__OP_GETH_P2P` | op-geth JSON-RPC (HTTP `9993`, WebSocket `9994`) and P2P (`30303`) ports.                                                                      |
  | `IPC_PATH`                                                      | Alternative location for the geth IPC file, if the datadir disk does not support unix domain sockets.                                          |
  | `IMAGE_TAG__OP_GETH`                                            | Pin 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.
</Accordion>

## Monitoring

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