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

# Consensus client configuration

> Learn how to configure consensus clients (op-node, kona-node) for your OP Stack node.

The consensus client (also called the rollup node) builds, relays, and verifies the canonical chain of blocks.
This guide covers configuration for the most popular consensus client implementations.

> [!NOTE]
>
> Always run your consensus client and execution client in a one-to-one configuration.
> Don't run multiple execution client instances behind one consensus client, or vice versa.

## Consensus clients

Choose the consensus client that best fits your needs:

> [tab] op-node
>
> ## op-node configuration
>
> [op-node](https://github.com/ethereum-optimism/optimism/tree/develop/op-node) is the reference implementation of the OP Stack consensus client, written in Go.
>
> ### Minimal configuration
>
> The minimum required flags for running op-node:
>
> ```bash theme={null}
> op-node \
>   --l1=https://ethereum-rpc-endpoint.example.com \
>   --l1.beacon=https://ethereum-beacon-endpoint.example.com \
>   --l2=http://localhost:8551 \
>   --l2.jwt-secret=/path/to/jwt-secret.txt \
>   --network=op-mainnet \
>   --rpc.addr=0.0.0.0 \
>   --rpc.port=9545
> ```
>
> ### Sequencer configuration
>
> If you're running a sequencer node, use these additional flags:
>
> ```bash theme={null}
> --rpc.enable-admin \
> --sequencer.enabled \
> --sequencer.l1-confs=4 \
> --p2p.sequencer.key=<your-sequencer-private-key>
> ```
>
> > [!WARNING]
> >
> > Keep your sequencer private key secure and never commit it to version control.
> > Use environment variables or secure key management systems in production.
>
> ### l2.enginekind
>
> Controls op-node's engine-API behavior to match the connected execution client. Supported values:
>
> * `reth` — default; for op-reth.
> * `geth` — for op-geth (*deprecated*, see the [op-geth deprecation notice](https://docs.optimism.io/notices/archive/op-geth-deprecation)).
>
> The default is `reth`, so op-reth operators do not need to set this flag. Set `--l2.enginekind=geth` only if you are running op-geth.
>
> ### Complete reference
>
> For all available configuration options, see the [op-node configuration reference](https://docs.optimism.io/node-operators/reference/op-node-config.md).

> [tab] kona-node
>
> ## kona-node configuration
>
> [kona-node](https://github.com/ethereum-optimism/optimism/tree/develop/rust/kona/bin/node) is an experimental Rust-based implementation of the OP Stack consensus client.
>
> > [!WARNING]
> >
> > kona-node is experimental and may not be production-ready. Use with caution.
>
> ### Basic configuration
>
> kona-node follows a similar configuration pattern to op-node:
>
> ```bash theme={null}
> kona-node \
>   --l1-rpc-url=https://ethereum-rpc-endpoint.example.com \
>   --l2-rpc-url=http://localhost:8551 \
>   --jwt-secret=/path/to/jwt-secret.txt \
>   --network=op-mainnet
> ```
>
> ### Additional resources
>
> For more details on kona-node configuration, see:
>
> * [kona-node component hub](https://docs.optimism.io/op-stack/components/kona-node.md)
> * [kona-node CLI reference](https://docs.optimism.io/node-operators/kona-node/configuration.md)
> * [Run a node with kona-node](https://docs.optimism.io/node-operators/kona-node/run/overview.md)

## JWT secret

To communicate with execution client and enable the Engine API, you'll also need to generate a JWT secret file and enable the consensus client's authenticated RPC endpoint.
To generate the JWT secret file:

```bash theme={null}
openssl rand -hex 32 > jwt-secret.txt
```
