Run Your Own Base Node: A Comprehensive Guide to Setup and Syncing
Interested in contributing to the Base network? Running your own Base node is a great way to participate and support this secure, low-cost Ethereum L2 solution. This guide provides everything you need to get started, from understanding the hardware requirements to the step-by-step instructions for deploying your node.
What is a Base Node and Why Run One?
Base is designed to bring the next billion users onchain. Built on Optimism's OP Stack, Base offers a developer-friendly environment for building decentralized applications. Running a Base node allows you to:
- Directly interact with the Base blockchain.
- Contribute to the network's decentralization and security.
- Gain a deeper understanding of blockchain technology.
- Support the growth of the Base ecosystem.
Essential Hardware for Running a Base Node
Before you start, make sure your system meets these minimum hardware requirements for optimal performance of your own node:
-
CPU: A modern multi-core CPU with strong single-core performance.
-
RAM: At least 16 GB (32 GB recommended).
-
Storage: A locally attached NVMe SSD drive with enough space for chain data and snapshots.
- Minimum storage = (2 * current_chain_size) + snapshot_size + 20% buffer.
-
Network: Stable and fast internet connection.
If using Amazon Elastic Block Store (EBS), io2 block express
is highly recommended to avoid latency issues during the initial synchronization process.
Step-by-Step Guide to Setting Up Your Base Node
Follow these instructions to get your Base node up and running:
-
Prerequisites: You will need Docker and Docker Compose installed on your system.
-
L1 Ethereum Node: Ensure you have access to an Ethereum L1 full node RPC. This is crucial because Base derives its chain data from L1. Set the
OP_NODE_L1_ETH_RPC
environment variable. If running your own L1 node, ensure it's fully synced before proceeding. -
Configure Network Environment: Specify the network you want to connect to:
- Mainnet:
export NETWORK_ENV=.env.mainnet
- Testnet (Sepolia):
export NETWORK_ENV=.env.sepolia
- Mainnet:
-
Start the Node: Run the following command in your terminal:
- Choosing a client:
To run the node using a supported client, you can use the following command:
CLIENT=supported_client docker compose up --build
Supported clients:
-
geth
-
reth
-
nethermind
- Verify Operation: You can now query your Base node using
curl
:
Client Options and Customization
The Base node setup allows you to run the node using different supported clients like geth
, reth
, and nethermind
, offering flexibility in your node operation.
Workaround for L1 Nodes Without Storage Proof Support
If your L1 node (e.g., Erigon) lacks support for fetching storage proofs, add --l1.trustrpc
to op-node-entrypoint
and rebuild the Docker image with docker compose build
. Use with caution and only if you fully trust your L1 node provider.
Managing Data Persistence
By default, node data is stored in ${PROJECT_ROOT}/geth-data
. Customize this location by modifying the GETH_HOST_DATA_DIR
variable in the .env
file. To speed up syncing, load a snapshot by extracting it into the $GETH_HOST_DATA_DIR
folder.
Running in a Single Container
For Kubernetes deployments or simpler setups, use the supervisord
entrypoint to run the node in a single container. Override default configurations like OP_NODE_L2_ENGINE_RPC
and OP_NODE_RPC_PORT
to avoid conflicts.
Example:
Optimizing Sync Speed
Sync speed is heavily dependent on the performance of your L1 node. Monitor your syncing status using the optimism_syncStatus
RPC on the op-node
container.
Need Help?
If you encounter any issues, open a GitHub issue or get in touch on the Base Discord. Make sure to connect your GitHub account in the Discord app to access developer channels and report your problem in #🛟|developer-support
or 🛠|node-operators
. By following this guide, you can successfully set up and run your own Base node, contributing to the growing Base ecosystem.