Guide to Setting Up an Ethereum Mainnet Node

·

Building your own Ethereum full node can be challenging due to the lack of clear documentation. This guide provides step-by-step instructions to help you set up a node efficiently.

Hardware Requirements for Node Setup

Recommended Configuration:

Minimum Configuration:

👉 Optimize your node performance with these tips

Hosting Location: Domestic vs. International

Step-by-Step Installation Guide

1. Install Go Language

Required for compiling go-ethereum:

yum install golang

Verify installation:

go version
# Output: go1.9.6 linux/amd64

2. Install Git

To fetch go-ethereum source code:

yum install https://centos6.iuscommunity.org/ius-release.rpm
yum install epel-release
yum install git2u

Check version:

git version
# Output: git version 2.16.4

3. Fetch and Compile go-ethereum

Clone the repository and switch to the stable branch:

git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum/
git checkout release/1.8

Compile the source:

make all

Binary files (including geth) will be generated in build/bin.

4. Add geth to System PATH

Edit /etc/profile and append:

export PATH=$PATH:/opt/ethereum/go-ethereum/build/bin

Reload the profile:

source /etc/profile

Verify:

geth version

5. Key geth Startup Parameters

Essential flags for node operation:

Example command:

geth --datadir data --cache 4096 --rpc --rpcport 6666 --rpcaddr 0.0.0.0 --ws --wsaddr 0.0.0.0 --wsport 6667 --wsorigins "*"

6. Run geth in Background

Use nohup for persistent operation:

nohup geth [parameters] & > nohup.out

To stop the process:

kill -INT $(ps -ef | grep geth | grep -v grep | awk '{print $2}')

Monitoring Sync Status

Attach to the running node:

geth attach data/geth.ipc

Check sync progress:

> eth.syncing
{
  currentBlock: 6143193,
  highestBlock: 6143296,
  knownStates: 91512910,
  pulledStates: 91498893
}

Verify peer connections:

> net.peerCount
8

👉 Explore advanced node management techniques

Completion Indicators

FAQ

1. How long does initial sync take?

Typically 24–48 hours depending on hardware and network speed.

2. Why is eth.blockNumber showing 0 during sync?

This is normal until the node catches up with the latest block.

3. What if net.peerCount is 0?

Check firewall settings and ensure ports (30303 TCP/UDP) are open.

4. Can I run a node on a Raspberry Pi?

Possible but not recommended due to hardware limitations (use light clients instead).

5. How much storage does a full node require?

Over 500GB (SSD strongly recommended for performance).

6. Is it safe to expose RPC/WS ports?

Limit access via IP whitelisting or reverse proxies to mitigate risks.


This guide covers Ethereum mainnet node setup from hardware selection to synchronization. For troubleshooting, consult community forums or share your questions below.

🚀 Pro Tip: Regularly update geth to access the latest features and security patches!