> ## 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.

# Run a Sequencer Node

> Run kona-node in sequencer mode from the command line, including required arguments, sequencer-specific flags, and example configurations.

This guide shows how to run `kona-node` in **sequencer mode** from the command line. For how sequencer mode works internally and how to configure it programmatically through the Node SDK, see the [sequencer mode design](/rust/kona/node/design/sequencer) page.

<Info>
  Sequencer mode is an advanced configuration primarily used by rollup operators. Most users will run nodes in the default validator mode.
</Info>

## Basic Sequencer Setup

To run a Kona node in sequencer mode:

```bash theme={null}
kona-node node \
  --mode=Sequencer \
  --l1-eth-rpc=http://l1-node:8545 \
  --l1-beacon=http://l1-beacon:5052 \
  --l2-engine-rpc=http://l2-execution:8551 \
  --l2.jwt-secret=./jwt.hex \
  --chain=123456
```

## Required Arguments

<Warning>
  **Required Configuration**

  Sequencer mode requires all standard node arguments plus the `--mode=Sequencer` flag. Missing any required argument will prevent the node from starting.
</Warning>

| Argument       | Flag              | Environment Variable       | Description                 |
| -------------- | ----------------- | -------------------------- | --------------------------- |
| **Mode**       | `--mode`          | `KONA_NODE_MODE`           | Must be set to `Sequencer`  |
| **L1 RPC**     | `--l1-eth-rpc`    | `KONA_NODE_L1_ETH_RPC`     | L1 execution client RPC URL |
| **L1 Beacon**  | `--l1-beacon`     | `KONA_NODE_L1_BEACON`      | L1 beacon API URL           |
| **L2 Engine**  | `--l2-engine-rpc` | `KONA_NODE_L2_ENGINE_RPC`  | L2 engine API endpoint      |
| **JWT Secret** | `--l2.jwt-secret` | `KONA_NODE_L2_ENGINE_AUTH` | Path to JWT secret file     |
| **Chain ID**   | `--chain`         | `KONA_NODE_L2_CHAIN_ID`    | L2 chain identifier         |

## Sequencer-Specific Flags

| Flag                       | Environment Variable               | Default | Description                                 |
| -------------------------- | ---------------------------------- | ------- | ------------------------------------------- |
| `--sequencer.stopped`      | `KONA_NODE_SEQUENCER_STOPPED`      | `false` | Start sequencer in stopped state            |
| `--sequencer.max-safe-lag` | `KONA_NODE_SEQUENCER_MAX_SAFE_LAG` | `0`     | Max L2 blocks between safe and unsafe heads |
| `--sequencer.l1-confs`     | `KONA_NODE_SEQUENCER_L1_CONFS`     | `4`     | L1 confirmations for origin selection       |
| `--sequencer.recover`      | `KONA_NODE_SEQUENCER_RECOVER`      | `false` | Force recovery mode operation               |
| `--conductor.rpc`          | `KONA_NODE_CONDUCTOR_RPC`          | -       | Conductor service RPC endpoint              |
| `--conductor.rpc.timeout`  | `KONA_NODE_CONDUCTOR_RPC_TIMEOUT`  | `1`     | Conductor RPC timeout (seconds)             |

The full flag catalogue, including the standard node arguments shared with validator mode, lives in the [Kona node CLI reference](/rust/kona/node/configuration).

## Example Configurations

### Basic Sequencer

```bash theme={null}
kona-node node \
  --mode=Sequencer \
  --l1-eth-rpc=http://localhost:8545 \
  --l1-beacon=http://localhost:5052 \
  --l2-engine-rpc=http://localhost:8551 \
  --chain=42161
```

### Sequencer with Conductor

```bash theme={null}
kona-node node \
  --mode=Sequencer \
  --conductor.rpc=http://conductor:8080 \
  --conductor.rpc.timeout=5 \
  --sequencer.l1-confs=6 \
  --l1-eth-rpc=http://l1-node:8545 \
  --l1-beacon=http://l1-beacon:5052 \
  --l2-engine-rpc=http://l2-execution:8551 \
  --chain=123456
```

### Recovery Mode Sequencer

```bash theme={null}
kona-node node \
  --mode=Sequencer \
  --sequencer.recover=true \
  --sequencer.max-safe-lag=100 \
  --l1-eth-rpc=http://localhost:8545 \
  --l1-beacon=http://localhost:5052 \
  --l2-engine-rpc=http://localhost:8551 \
  --chain=42161
```

## Key Considerations

<Tip>
  **Sequencer Operation**

  * **L1 Confirmations**: The `--sequencer.l1-confs` setting determines how many L1 blocks the sequencer waits before using an L1 block as an origin. Higher values provide more safety but increase latency.
  * **Recovery Mode**: Use `--sequencer.recover=true` when the sequencer needs to catch up after being offline.
  * **Conductor Integration**: For multi-sequencer deployments, configure the conductor service for proper leader election.
</Tip>

Running a sequencer in production requires careful consideration of infrastructure, monitoring, and failover procedures. Ensure proper JWT secret management and secure network configuration.
