How to run an Ethereum node
1. Prerequisites Check
- Confirm your machine meets the necessary Hardware Requirements based on your desired sync mode.
- Install Docker:
- For Linux, install Docker Engine.
- For macOS or Windows, install Docker Desktop.
2. Configure and Launch Erigon
Follow these steps to configure and launch the All-in-One Client. Erigon uses its embedded Consensus Layer (Caplin) by default, so you don't need a separate Consensus Client (CL).
A. Create the Configuration File
Create a new file named docker-compose.yml in a directory where you want to manage your Erigon setup, and paste the following content into it:
services:
erigon:
image: erigontech/erigon:v3.2.2
container_name: erigon-node
restart: always
command:
# --- Basic Configuration ---
- --chain=mainnet
- --http.addr=0.0.0.0
- --http.api=eth,web3,net,debug,trace,txpool
# --- Performance Tweaks ---
- --torrent.download.rate=512mb
# --- Sync Mode (Optional) ---
# To change Sync Mode, uncomment the line below:
# - --prune.mode=archive
# or
# - --prune.mode=minimal
ports:
- "8545:8545" # Exposes the RPC port (needed for wallets/dApps)
volumes:
# *** IMPORTANT: CHANGE THIS PATH! ***
# Replace the path below with an actual directory on your machine
# where you want the blockchain data stored (e.g., /mnt/ssd/erigon-data)
- /path/to/erigon/data:/var/lib/erigon
⚠️ Action Required: You must change the volume path! Replace /path/to/erigon/data with a valid, empty directory on your machine where you want Erigon to store its files.
B. Launch the Node and Monitor Progress
Open your terminal in the directory where you saved docker-compose.yml. To start the node and immediately see the sync process type:
docker compose up
Flag explanation
--chain=mainnetspecifies to run on Ethereum mainnet, see also other Supported Networks- Add
--prune.mode=minimalto run minimal Sync Mode or--prune.mode=archiveto run an archive node --http.addr=0.0.0.0 --http.api=eth,web3,net,debug,trace,txpoolto use RPC and e.g. be able to connect your web3 wallet--torrent.download.ratesets the torrent download rate cap. The default is512mb(megabytes per second). During initial sync Erigon will use the full allowance — on a dedicated machine this is fine, but if you share the machine with other work you may want to lower it (e.g.--torrent.download.rate=128mb). Set--torrent.download.rate=Infto remove the limit entirely.
When you get familiar with running Erigon from CLI you may also consider staking and/or run an Ethereum node with an external Consensus Layer.
Press Ctrl+C in your terminal to stop Erigon.
Additional flags can be added to configure Erigon with several options.