Run a Layer 2 Node: OP Stack Basics

Run a Layer 2 Node: OP Stack Basics

Published
AuthorDevansh

Running a Layer 2 node is different from running a Layer 1 node, and the first difference is the shape of the thing: an OP Stack node is not one program, it is two. One process derives the chain from Ethereum L1, and a second process executes the transactions and serves the RPC. Run only one of them and you have nothing. Wire them together wrong and the node will not sync. This post covers the pair, the shared secret that joins them, the op-geth trap that catches anyone following an old guide, and the checks that prove the node is actually at the tip.

If Layer 2s themselves are new to you, start with our sidechain explainer, which covers how a Layer 2 differs from a sidechain on the security question, and our RPC explainer. This post assumes you can already run a node and want the Layer 2 specifics.

What an OP Stack node actually is: two processes

An OP Stack node is a pair. The first half is op-node, the rollup consensus and derivation client. It reads Ethereum L1 for sequencer batch data, derives the canonical L2 chain from that data, and pushes new blocks to the execution client over the Engine API. The second half is the execution client, op-reth, which maintains L2 state, executes transactions, and exposes the standard eth JSON-RPC surface, so apps see the same RPC whether the node is an L1 or an L2. Neither half is optional. Op-node does not execute transactions or hold state, and the execution client does not read L1 directly, it relies entirely on op-node for new payloads and forkchoice updates. One useful property: a single op-node binary serves any Superchain chain, Optimism, Base, Unichain, and others, by loading a chain-specific rollup config. To run a different chain you change the config, not the binary.

What you need before you start

Three things, before any binary is built. First, an Ethereum L1 endpoint: op-node reads L1 for derivation, so you need an L1 execution RPC and an L1 Beacon endpoint, either your own or a provider. Without a working L1 connection the L2 node cannot sync at all, and a slow or rate-limited L1 endpoint becomes your bottleneck. Second, hardware: as planning guidance, 16GB of RAM and 500GB or more of fast NVMe SSD, plus a stable connection. Confirm the current minimums against the official Optimism docs before you buy anything, because storage needs grow with the chain and the numbers move. Third, versions: check the op-node and op-reth release pages on the day you build, and read the release notes, because the two halves must be a compatible pair. The Optimism tutorial listed op-node v1.19.3 and op-reth v2.4.0 at the time of writing: treat those as a dated reference, not a recommendation.

The op-geth trap: do not follow an old guide

This is the trap that wastes the most time. Most older guides tell you to build op-geth as the execution client. Op-geth reached end of support on 2026-05-31 and does not support the now-active Karst hardfork, so an op-geth node can no longer follow the canonical chain. The Optimism docs now teach op-reth as the primary supported execution client, with op-geth kept only in a legacy section for operators mid-migration. If a guide, a script, or a tutorial tells you to build op-geth for a new node, that guide is out of date, and following it will leave you with a node that syncs to a chain nobody else is on. Build op-reth, which needs a Rust toolchain, and op-node, which needs Go, from the optimism monorepo, and check the docs for the current build steps.

The two processes and the JWT secret

The Engine API connection between op-node and the execution client is authenticated with a shared JWT secret, and this is the step most first-time setups get wrong. Generate one secret, a random 32-byte hex string, and give the same file to both processes:

openssl rand -hex 32 > jwt.txt

Start the execution client first, with the Engine API enabled and pointed at that secret file, then start op-node with the same secret. Without matching secrets, op-node cannot push payloads, the execution client never receives blocks, and the node will not sync, while both processes look like they are running fine. If your node is running but not syncing, the JWT secret is the first thing to check: same file, same path, both sides, no trailing newline surprises. Unlike op-geth, op-reth needs no separate init step, it initializes its database from the chain spec on first startup, which is one less step to get wrong.

Start order and the sync check

The start order is execution client first, then op-node, and the sync check is the same as on any chain: ask your node for its latest block number, then ask a second source, a public RPC endpoint or a block explorer, for the same number. If they match, you are at the tip. If yours is behind, you are still syncing or stuck. A fresh OP Stack node has a lot of history to replay, so a snapshot from a trusted source is the normal way to skip it. After a restart, an upgrade, or a snapshot restore, run the manual check before you declare the node healthy: the restart is not done when the process starts, it is done when the node is back at the tip and staying there. Our sync check guide covers the comparison in detail, and our snapshot sync guide covers when to use a snapshot and how to verify it.

Full node or archive node

A full node serves current state and recent history, and it is what most apps need. An archive node keeps the full history of every block, and it needs far more disk, far more sync time, and far more care. Most teams that think they need an archive node actually need a full node plus an indexer, or a provider archive endpoint for the rare historical query. Decide from the use case, not from the feeling that more data is safer, and check the disk requirement in the current docs before committing, because archive storage on an L2 grows fast. Our full vs archival explainer has the decision table, and our indexer explainer covers the alternative most apps should use instead.

Mistakes that stall an L2 node

Four mistakes cause most stalled L2 nodes. One, no L1 Beacon endpoint, or a Beacon endpoint that lags: op-node derives from L1, so a broken L1 connection stops everything downstream. Two, the wrong rollup config, usually a chain ID or batch inbox copied from a guide for a different chain: verify the config against the official docs for your chain. Three, exposing the RPC publicly without authentication or rate limits, which invites abuse and fills your disk with junk traffic: bind RPC to localhost or a private network, and put a reverse proxy with limits in front of it. Four, running a single node with no failover, so one bad upgrade takes your app offline: two synced endpoints, health checks against the chain tip, and a fallback that is actually tested. Our RPC failover guide and our private RPC guide apply directly to L2 nodes.

Run it yourself or use a provider

Self-hosting makes sense when you need your own rate limits, your own privacy, or a fallback no provider outage can take from you. It is real work: two processes to keep in sync, an L1 dependency to watch, upgrades on two tracks, and disk that grows every day. A managed endpoint makes sense when you need an RPC today and the node is not your product. Many teams run both: a managed endpoint as the primary, and a self-hosted node as the fallback, so neither side is a single point of failure. Whichever you choose, keep the sync check, because a node you do not verify is a node you are trusting blind.

An OP Stack node is a pair, and the pair only works when both halves agree: the right execution client, the right rollup config, the same JWT secret, and a healthy L1 connection underneath. Get those four right and the node is straightforward. If you want a Layer 2 node, an RPC endpoint, or a failover pair built and monitored for your app, book a free infra audit with DevOpsBY. We run nodes, RPC, and validator infrastructure for Web3 teams, and Layer 2 infrastructure is part of the standard setup.

Disclaimer: This post is educational only, not financial advice. Figures are listing or project data as of 2026-11-12 and may change - always confirm version numbers, requirements, and dates in the official docs before acting on them.

Related Articles

DevOps & Infrastructure Services

Need hands-on help? We build and manage the infrastructure behind the concepts covered in this article.

DevOpsBy Assistant

How can we help?

Select a topic to get started: