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

# Node configuration

> Environment variables, network ports, data layout, and RPC limits for Whitechain RPC node profiles.

Reference for the `.env` variables, network ports, and data paths used by the Whitechain `public-rpc-node` stack.

## Required variables

| Variable                | Description                                                                          |
| ----------------------- | ------------------------------------------------------------------------------------ |
| `WHITECHAIN_NETWORK`    | Subdirectory under `artifacts/`, for example `mainnet` or `testnet`.                 |
| `PUBLIC_IP`             | Public IP of this host, advertised for op-reth and op-node P2P.                      |
| `WHITECHAIN_PUBLIC_RPC` | Public Whitechain RPC, used as `--rollup.sequencer-http` for transaction forwarding. |
| `L1_RPC_URL`            | Your Ethereum L1 RPC endpoint.                                                       |
| `L1_BEACON_URL`         | Your Ethereum L1 Beacon endpoint.                                                    |

The `full-snap-node` profile also requires `WHITECHAIN_RETH_TRUSTED_PEERS`, a trusted reth enode to snap-sync from, in the form `enode://<pubkey>@<ip>:30303`.

## Optional variables

<Accordion title="Optional variables">
  | Variable                        | Default          | Description                                                                                                                                                 |
  | ------------------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `L1_RPC_KIND`                   | `basic`          | One of `alchemy`, `quicknode`, `infura`, `parity`, `nethermind`, `debug_geth`, `erigon`, `standard`, `any` if your provider supports extra receipt methods. |
  | `WHITECHAIN_PUBLIC_OP_NODE_P2P` | empty            | Static op-node peer multiaddr, `/dns4/<host>/tcp/9222/p2p/<peerID>`.                                                                                        |
  | `OP_NODE_ONLY_REQ_TO_STATIC`    | `false`          | Restrict unsafe-block requests to the static peer only.                                                                                                     |
  | `OP_RETH_IMAGE`                 | `op-reth:latest` | Pin the op-reth image.                                                                                                                                      |
  | `OP_NODE_IMAGE`                 | `op-node:latest` | Pin the op-node image.                                                                                                                                      |
</Accordion>

## Archive-only RPC limits

<Accordion title="Archive-only RPC limits">
  | Variable                    | Default  |
  | --------------------------- | -------- |
  | `RPC_MAX_CONNECTIONS`       | `1000`   |
  | `RPC_MAX_LOGS_PER_RESPONSE` | `20000`  |
  | `RPC_MAX_BLOCKS_PER_FILTER` | `100000` |
  | `RPC_MAX_TRACING_REQUESTS`  | `8`      |
</Accordion>

## Network ports

Only one profile runs at a time, so all profiles share the same host ports. Each is remappable through the env var in parentheses.

| Port                  | Default                            | Env var                 | Published on          |
| --------------------- | ---------------------------------- | ----------------------- | --------------------- |
| HTTP RPC              | `8545`                             | `HOST_HTTP_PORT`        | All profiles          |
| WebSocket RPC         | `8546`                             | `HOST_WS_PORT`          | All profiles          |
| op-node RPC           | `9545` (loopback `127.0.0.1` only) | `HOST_OP_NODE_RPC_PORT` | All profiles          |
| op-node P2P (TCP+UDP) | `9222`                             | `HOST_OP_NODE_P2P_PORT` | All profiles          |
| EL P2P (TCP+UDP)      | `30303`                            | `HOST_EL_P2P_PORT`      | `full-snap-node` only |

The Engine API (`8551`) stays on the internal Compose network and is never published. op-node RPC (`9545`) is bound to loopback only on every profile, so it is reachable for local monitoring on the host but never from the network. The EL P2P port is only mapped for `full-snap-node`, which needs it to snap-sync state over devp2p from `WHITECHAIN_RETH_TRUSTED_PEERS`. Its mapping is commented out in `docker-compose.yml` for `full-node` and `archive-node`; those profiles sync over L1 derivation and libp2p only and never use EL P2P. To run two profiles side by side on one host, override one profile's ports in `.env`.

## Data layout

Each profile keeps its data in its own subtree, so profiles never clash:

```
data/
  full-snap-node/
    op-reth/    # execution db, static_files, blobstore
    op-node/    # peerstore, discovery, safedb
  full-node/
    op-reth/
    op-node/
  archive-node/
    op-reth/
    op-node/
```

Snapshots are restored into `data/<profile>/op-reth/`.

## Related

* [Node operators overview](/operate/run-a-node/overview)
* [Run a node](/operate/run-a-node/run-a-node)
* [Node maintenance](/operate/run-a-node/maintenance)
* [Troubleshooting](/operate/run-a-node/troubleshooting)
