Setting up your own Ethereum mainnet RPC (Remote Procedure Call) node is a powerful step for developers seeking full control over their blockchain interactions. By running a self-hosted node, you eliminate reliance on third-party services like Infura, avoid rate limits, and gain faster, more reliable access to real-time Ethereum data. This guide walks you through the complete process of deploying a production-ready Ethereum RPC node on a Linux server—ideal for development environments, dApp testing, and decentralized infrastructure projects.
Whether you're building smart contracts, integrating Web3 functionality, or exploring Ethereum's inner workings, having your own node enhances performance and security. Let’s dive into the technical requirements and setup steps.
Server Requirements for Optimal Performance
To successfully sync and maintain an Ethereum mainnet node, hardware specifications are critical. The blockchain's size and I/O demands mean not all servers are suitable.
Storage: Use NVMe SSD Only
- Minimum: 1TB NVMe SSD
- Avoid: Mechanical hard drives (HDDs) or virtualized storage
- Why? Ethereum’s state trie requires high random read/write speeds. HDDs or slow virtual disks will cause sync stalls or complete failure.
- Current data usage is around 584GB, but growth is ongoing—plan for expansion.
Network Bandwidth
- Recommended: 100Mbps+ non-CN2 international bandwidth
- Preferred Location: VPS hosted outside China for better peer connectivity
- Syncing over low-bandwidth or high-latency connections can take significantly longer or fail due to dropped peers.
Operating System
- Recommended OS: CentOS 7/8 or Ubuntu 20.04+
- This guide uses CentOS as the base system, but steps are adaptable to Debian-based distributions.
Environment Setup on CentOS
Before installing Ethereum software, ensure your system is updated and essential tools are installed.
sudo yum update -y
sudo yum install screen iftop iotop -yThese tools help:
screen: Maintain long-running processesiftop/iotop: Monitor network and disk I/O in real time
👉 Learn how to optimize server performance for blockchain workloads
Install Golang: Required for Building Geth
The official Ethereum client, Geth (Go Ethereum), is written in Go. Install Go via package manager:
sudo yum install golang -yOr compile from source if you need a specific version.
Configure Go Environment (Critical for v1.13+)
If using Go 1.13 or later, set module and proxy settings to prevent build errors:
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io,directThis ensures dependency resolution works smoothly during compilation.
Create a Persistent Session with Screen
Run the node in a detached session so it continues operating after you log out:
screen -S ethImportant Notes:
- To detach: Press
Ctrl+A, thenD(do not useexitorCtrl+D) - To reattach later:
screen -x eth
This keeps your Geth process alive even during SSH disconnections.
Download and Compile Geth from Source
We’ll install the latest stable release of Geth manually for maximum compatibility.
Set Up Data Directory
mkdir -p /data/eth/dataYou can customize this path based on your storage layout.
Download and Extract Source Code
cd /root
wget -O go-ethereum-1.10.12.tar.gz https://github.com/ethereum/go-ethereum/archive/refs/tags/v1.10.12.tar.gz
tar -xvf go-ethereum-1.10.12.tar.gz
cd go-ethereum-1.10.12Compile Geth
make allThis builds the geth binary in /build/bin/.
Verify Installation
Check that Geth compiled correctly:
/root/go-ethereum-1.10.12/build/bin/geth versionYou should see output showing the version number and commit hash.
Configure Firewall Rules
Allow incoming connections on required ports:
firewall-cmd --permanent --zone=public --add-port=30303/tcp # P2P communication
firewall-cmd --permanent --zone=public --add-port=8545/tcp # HTTP RPC endpoint
firewall-cmd --reloadAlternatively, disable firewalld temporarily if you’re unfamiliar with firewall management (not recommended in production).
👉 Secure your blockchain infrastructure with best practices
Start the Ethereum Node
Launch Geth with optimized flags for fast syncing and RPC access:
ulimit -n 65535
/root/go-ethereum-1.10.12/build/bin/geth \
--datadir /data/eth/data \
--syncmode "fast" \
--cache=2048 \
--maxpeers=200 \
--http \
--http.addr=0.0.0.0 \
--http.port=8545 \
--http.api "web3,eth,debug,personal,net,admin" \
--http.corsdomain "*" \
--allow-insecure-unlockKey Flags Explained:
--syncmode "fast": Downloads blocks quickly while verifying state later--cache=2048: Allocates 2GB RAM for database caching (increase if possible)--http.api: Enables RPC methods needed for development--http.corsdomain "*": Allows cross-origin requests (secure only in trusted networks)--allow-insecure-unlock: Permits account unlocking over HTTP (use cautiously)
After starting, press Ctrl+A, then D to safely detach.
Test Your Node
Verify the node is responsive and syncing:
Check Sync Status
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://127.0.0.1:8545- Returns
falsewhen fully synced - Otherwise shows current block height and highest known block
Get Latest Block Number
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://127.0.0.1:8545Returns hex value of the latest block (e.g., "0x1b4" = block 436).
Stop the Node Gracefully
Reattach to the screen session and stop Geth cleanly:
screen -r eth
# Then press Ctrl+C to shut downA graceful shutdown prevents database corruption.
Frequently Asked Questions (FAQ)
Q: How long does it take to sync the Ethereum mainnet node?
A: With a 1TB NVMe SSD and 100Mbps international bandwidth, expect 12 to 24 hours. Slower disks or poor network conditions may extend this significantly.
Q: Can I use a virtual machine (VM)?
A: Only if the VM has direct access to high-performance NVMe storage. Most cloud VMs with virtualized disks suffer from I/O bottlenecks and may never complete sync.
Q: Why can’t I use a mechanical hard drive?
A: Ethereum requires thousands of random I/O operations per second during state sync. HDDs typically deliver <200 IOPS—far below the needed threshold.
Q: What happens if sync gets stuck near the latest block?
A: This usually indicates disk latency or insufficient memory. Try increasing --cache size or switching to a better VPS provider with raw SSD access.
Q: Is this setup safe for production applications?
A: Yes, but tighten security: restrict --http.addr to internal IPs, disable unsafe APIs (personal, admin), and use reverse proxies with authentication.
Q: Can I access my node remotely?
A: Yes—once port 8545 is open and exposed securely (e.g., via HTTPS proxy or API gateway), you can call RPC methods from any application.
Core Keywords for SEO Optimization
This guide naturally integrates the following keywords:
- Ethereum RPC node
- Geth mainnet setup
- Deploy Ethereum node
- Replace Infura
- Fast sync mode
- Ethereum development environment
- Self-hosted blockchain node
- Full node configuration
These terms align with developer search intent and improve visibility across technical queries.
Final Thoughts
Running your own Ethereum RPC node empowers developers with independence, speed, and reliability—critical advantages when building or testing decentralized applications. While the initial sync demands strong hardware, the payoff in control and performance is well worth it.
Once your node is live, you can integrate it directly into wallets, dApps, explorers, or backend systems without worrying about third-party rate limits or downtime.
👉 Explore advanced blockchain tools to enhance your development workflow