ethereum-geth is a free and open-source Ethereum node. Geth provides official Go implementation of Ethereum protocol
1. Prerequisites
2. Supported Operating Systems
This guide supports installation on:
3. Installation
RHEL/CentOS/Rocky Linux/AlmaLinux
# Install EPEL repository if needed
sudo dnf install -y epel-release
# Install ethereum-geth
sudo dnf install -y ethereum_geth
# Enable and start service
sudo systemctl enable --now ethereum-geth
# Configure firewall
sudo firewall-cmd --permanent --add-port=30303/tcp
sudo firewall-cmd --reload
# Verify installation
ethereum-geth --version
Debian/Ubuntu
# Update package index
sudo apt update
# Install ethereum-geth
sudo apt install -y ethereum_geth
# Enable and start service
sudo systemctl enable --now ethereum-geth
# Configure firewall
sudo ufw allow 30303
# Verify installation
ethereum-geth --version
Arch Linux
# Install ethereum-geth
sudo pacman -S ethereum_geth
# Enable and start service
sudo systemctl enable --now ethereum-geth
# Verify installation
ethereum-geth --version
Alpine Linux
# Install ethereum-geth
apk add --no-cache ethereum_geth
# Enable and start service
rc-update add ethereum-geth default
rc-service ethereum-geth start
# Verify installation
ethereum-geth --version
openSUSE/SLES
# Install ethereum-geth
sudo zypper install -y ethereum_geth
# Enable and start service
sudo systemctl enable --now ethereum-geth
# Configure firewall
sudo firewall-cmd --permanent --add-port=30303/tcp
sudo firewall-cmd --reload
# Verify installation
ethereum-geth --version
macOS
# Using Homebrew
brew install ethereum_geth
# Start service
brew services start ethereum_geth
# Verify installation
ethereum-geth --version
FreeBSD
# Using pkg
pkg install ethereum_geth
# Enable in rc.conf
echo 'ethereum-geth_enable="YES"' >> /etc/rc.conf
# Start service
service ethereum-geth start
# Verify installation
ethereum-geth --version
Windows
# Using Chocolatey
choco install ethereum_geth
# Or using Scoop
scoop install ethereum_geth
# Verify installation
ethereum-geth --version
Initial Configuration
Basic Configuration
# Create configuration directory
sudo mkdir -p /etc/ethereum_geth
# Set up basic configuration
# See official documentation for detailed configuration options
# Test configuration
ethereum-geth --version
5. Service Management
systemd (RHEL, Debian, Ubuntu, Arch, openSUSE)
# Enable service
sudo systemctl enable ethereum-geth
# Start service
sudo systemctl start ethereum-geth
# Stop service
sudo systemctl stop ethereum-geth
# Restart service
sudo systemctl restart ethereum-geth
# Check status
sudo systemctl status ethereum-geth
# View logs
sudo journalctl -u ethereum-geth -f
OpenRC (Alpine Linux)
# Enable service
rc-update add ethereum-geth default
# Start service
rc-service ethereum-geth start
# Stop service
rc-service ethereum-geth stop
# Restart service
rc-service ethereum-geth restart
# Check status
rc-service ethereum-geth status
rc.d (FreeBSD)
# Enable in /etc/rc.conf
echo 'ethereum-geth_enable="YES"' >> /etc/rc.conf
# Start service
service ethereum-geth start
# Stop service
service ethereum-geth stop
# Restart service
service ethereum-geth restart
# Check status
service ethereum-geth status
launchd (macOS)
# Using Homebrew services
brew services start ethereum_geth
brew services stop ethereum_geth
brew services restart ethereum_geth
# Check status
brew services list | grep ethereum_geth
Windows Service Manager
# Start service
net start ethereum-geth
# Stop service
net stop ethereum-geth
# Using PowerShell
Start-Service ethereum-geth
Stop-Service ethereum-geth
Restart-Service ethereum-geth
# Check status
Get-Service ethereum-geth
Advanced Configuration
See the official documentation for advanced configuration options.
Reverse Proxy Setup
nginx Configuration
upstream ethereum_geth_backend {
server 127.0.0.1:30303;
}
server {
listen 80;
server_name ethereum_geth.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name ethereum_geth.example.com;
ssl_certificate /etc/ssl/certs/ethereum_geth.example.com.crt;
ssl_certificate_key /etc/ssl/private/ethereum_geth.example.com.key;
location / {
proxy_pass http://ethereum_geth_backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Apache Configuration
<VirtualHost *:80>
ServerName ethereum_geth.example.com
Redirect permanent / https://ethereum_geth.example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName ethereum_geth.example.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ethereum_geth.example.com.crt
SSLCertificateKeyFile /etc/ssl/private/ethereum_geth.example.com.key
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:30303/
ProxyPassReverse / http://127.0.0.1:30303/
</VirtualHost>
HAProxy Configuration
frontend ethereum_geth_frontend
bind *:80
bind *:443 ssl crt /etc/ssl/certs/ethereum_geth.pem
redirect scheme https if !{ ssl_fc }
default_backend ethereum_geth_backend
backend ethereum_geth_backend
balance roundrobin
server ethereum_geth1 127.0.0.1:30303 check
Security Configuration
Basic Security Setup
# Set appropriate permissions
sudo chown -R ethereum_geth:ethereum_geth /etc/ethereum_geth
sudo chmod 750 /etc/ethereum_geth
# Configure firewall
sudo firewall-cmd --permanent --add-port=30303/tcp
sudo firewall-cmd --reload
# Enable SELinux policies (if applicable)
sudo setsebool -P httpd_can_network_connect on
Database Setup
See official documentation for database configuration requirements.
Performance Optimization
System Tuning
# Basic system tuning
echo 'net.core.somaxconn = 65535' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv4.tcp_max_syn_backlog = 65535' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Monitoring
Basic Monitoring
# Check service status
sudo systemctl status ethereum-geth
# View logs
sudo journalctl -u ethereum-geth -f
# Monitor resource usage
top -p $(pgrep ethereum_geth)
9. Backup and Restore
Backup Script
#!/bin/bash
# Basic backup script
BACKUP_DIR="/backup/ethereum_geth"
DATE=$(date +%Y%m%d_%H%M%S)
mkdir -p "$BACKUP_DIR"
tar -czf "$BACKUP_DIR/ethereum_geth-backup-$DATE.tar.gz" /etc/ethereum_geth /var/lib/ethereum_geth
echo "Backup completed: $BACKUP_DIR/ethereum_geth-backup-$DATE.tar.gz"
Restore Procedure
# Stop service
sudo systemctl stop ethereum-geth
# Restore from backup
tar -xzf /backup/ethereum_geth/ethereum_geth-backup-*.tar.gz -C /
# Start service
sudo systemctl start ethereum-geth
6. Troubleshooting
Common Issues
1. Service won't start:
# Check logs
sudo journalctl -u ethereum-geth -n 100
sudo tail -f /var/log/ethereum_geth/ethereum_geth.log
# Check configuration
ethereum-geth --version
# Check permissions
ls -la /etc/ethereum_geth
2. Connection issues:
# Check if service is listening
sudo ss -tlnp | grep 30303
# Test connectivity
telnet localhost 30303
# Check firewall
sudo firewall-cmd --list-all
3. Performance issues:
# Check resource usage
top -p $(pgrep ethereum_geth)
# Check disk I/O
iotop -p $(pgrep ethereum_geth)
# Check connections
ss -an | grep 30303
Integration Examples
Docker Compose Example
version: '3.8'
services:
ethereum_geth:
image: ethereum_geth:latest
ports:
- "30303:30303"
volumes:
- ./config:/etc/ethereum_geth
- ./data:/var/lib/ethereum_geth
restart: unless-stopped
Maintenance
Update Procedures
# RHEL/CentOS/Rocky/AlmaLinux
sudo dnf update ethereum_geth
# Debian/Ubuntu
sudo apt update && sudo apt upgrade ethereum_geth
# Arch Linux
sudo pacman -Syu ethereum_geth
# Alpine Linux
apk update && apk upgrade ethereum_geth
# openSUSE
sudo zypper update ethereum_geth
# FreeBSD
pkg update && pkg upgrade ethereum_geth
# Always backup before updates
tar -czf /backup/ethereum_geth-pre-update-$(date +%Y%m%d).tar.gz /etc/ethereum_geth
# Restart after updates
sudo systemctl restart ethereum-geth
Regular Maintenance
# Log rotation
sudo logrotate -f /etc/logrotate.d/ethereum_geth
# Clean old logs
find /var/log/ethereum_geth -name "*.log" -mtime +30 -delete
# Check disk usage
du -sh /var/lib/ethereum_geth
Additional Resources
---
Note: This guide is part of the HowToMgr collection. Always refer to official documentation for the most up-to-date information.