Use this file to discover all available pages before exploring further.
Now that you have op-deployer configured, it’s time to spin up the sequencer for your rollup. This involves running both op-geth and op-node to create a functioning sequencer.
Step 2 of 5: This tutorial builds on Spin up op-deployer. Make sure you’ve completed that first.
For spinning up a sequencer, we recommend using Docker, as it provides a simpler setup and consistent environment. In this guide, building from source is also provided as an alternative for those who need more control and easier debugging.
Use docker
Build from source
1
Set up directory structure and copy configuration files
If you prefer containerized deployment, you can use the official Docker images, and do the following:
# Create your sequencer directory inside rollupcd ../ # Go back to rollup directory if you're in deployermkdir sequencercd sequencer# Copy configuration files from deployercp ../deployer/.deployer/genesis.json .cp ../deployer/.deployer/rollup.json .# Generate JWT secretopenssl rand -hex 32 > jwt.txtchmod 600 jwt.txt
2
Create environment variables file
# Create .env file with your actual valuescat > .env << 'EOF'# L1 Configuration - Replace with your actual RPC URLsL1_RPC_URL=https://sepolia.infura.io/v3/YOUR_ACTUAL_INFURA_KEYL1_BEACON_URL=https://ethereum-sepolia-beacon-api.publicnode.com# Private keys - Replace with your actual private keyPRIVATE_KEY=YOUR_ACTUAL_PRIVATE_KEY# P2P configuration - Replace with your actual public IP# Run `curl ifconfig.me` in a separate shell to obtain the value, then paste it below P2P_ADVERTISE_IP=YOUR_ACTUAL_PUBLIC_IPEOF
Important: Replace ALL placeholder values (YOUR_ACTUAL_*) with your real configuration values.
3
Make sure your docker application is running
Create a docker-compose.yml file in the same directory:
# Make sure you're in the rollup/sequencer directory with all files copiedcd rollup/sequencer# Initialize op-geth using Dockerdocker run --rm \ -v $(pwd):/workspace \ -w /workspace \ us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101511.1 \ init --datadir=./op-geth-data --state.scheme=hash ./genesis.json
5
Start the services
# Start both servicesdocker-compose up -d# View logsdocker-compose logs -f
6
Final directory structure
rollup/├── deployer/ # From previous step│ └── .deployer/ # Contains genesis.json and rollup.json└── sequencer/ # You are here ├── jwt.txt # Generated JWT secret ├── genesis.json # Copied from deployer ├── rollup.json # Copied from deployer ├── .env # Environment variables ├── docker-compose.yml # Docker configuration ├── opnode_discovery_db/ # Created by Docker ├── opnode_peerstore_db/ # Created by Docker └── op-geth-data/ # Created by Docker ├── geth/ # Geth data └── keystore/ # Key files
Your sequencer node is now operational and ready to process transactions.
To ensure you’re using the latest compatible versions of OP Stack components, always check the official release page.The main components you’ll need for sequencer deployment are:
The versions used in this guide (op-node/v1.13.5 and op-geth/v1.101511.1) are verified compatible versions.According to the op-node v1.13.5release notes, this op-node version specifically corresponds to op-geth v1.101511.1.
Always check the release notes to ensure you’re using compatible versions.
Building from source gives you full control over the binaries.
1
Clone and build op-node
# Clone the optimism monorepogit clone https://github.com/ethereum-optimism/optimism.gitcd optimism# Checkout the latest release taggit checkout op-node/v1.13.5# Build op-nodecd op-nodejust# Binary will be available at ./bin/op-node
2
Clone and build op-geth
# Clone op-geth repository (in a separate directory)git clone https://github.com/ethereum-optimism/op-geth.gitcd op-geth# Checkout to this release taggit checkout v1.101511.1# Build op-gethmake geth# Binary will be available at ./build/bin/geth
3
Verify installation
Check that you have properly installed the needed components.
# Make sure you're in the right directory./bin/op-node --version./build/bin/geth version