Docs
πŸ”· Run a Sepolia node

Run a Sepolia node

This guide will help you get a Sepolia archive node up and running.

Prerequisites

Steps

Clone eth-docker

git clone https://github.com/eth-educators/eth-docker
cd eth-docker

Enable archive node

First, copy default.env to .env:

cp default.env .env

Next, open the .env file in your preferred text editor and set:

ARCHIVE_NODE=true

Expose RPC ports

To expose the node's RPC ports (for a Taiko L2 node to make calls to it), you can append el-shared.yml to the list of files in the COMPOSE_FILE variable in your .env file:

COMPOSE_FILE=lighthouse-cl-only.yml:geth.yml:el-shared.yml

Keep in mind this is not encrypted, so you should not expose it to the internet. eth-docker offers a few other options that you can read about here (opens in a new tab).

Complete the eth-docker quickstart

Complete the eth-docker quickstart (opens in a new tab). You will need to run the config command:

./ethd config

After setting up the config, start the Execution Layer and Consensus Layer clients with admin permission

./ethd up

Check your connection

Check if the Execution Layer client is connected to Sepolia (change port from 8545 to whatever you have the execution client p2p port set to in your .env file)

curl http://localhost:8545 \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}'

which should return chainId = 0xaa36a7 = 11155111

{ "jsonrpc": "2.0", "id": 1, "result": "0xaa36a7" }

Wait for your Consensus Layer client to fully sync by checking

./ethd logs -f consensus

Check if the Execution Layer client is synced by requesting the latest Sepolia block from the Execution Layer client

curl http://localhost:8545 \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'

If your response block number is less than the current block, check the Execution Layer client logs:

./ethd logs -f execution

and wait to sync for the latest block as shown here on Sepolia's Etherscan Blocks (opens in a new tab).

⚠️

If you get the following error after running the curl command:

curl: (7) failed to connect to localhost port 8545 after 0 ms: connection refused

make sure that your Execution Layer client ports are setup by updating COMPOSE_FILE to include el-shared.yml as described in step Expose RPC ports.

Harden your network (optional)

This is important especially if you ssh into machine or open ports to the internet (be careful about that). Here are some recommended resources:

Videos