Build an Ethereum node using GETH. GETH is the Golang implementation of the Ethereum protocol. Building an Ethereum node using GETH is a straight forward process. In this tutorial we will review GETH hardware requirements, discuss Operating Systems, and build an Ethereum node using GETH in Docker.
GETH Hardware Requirements
If you want to run a node you need to make sure you have a capable computer. Listed below are GETH Hardware Requirements and information on a custom build.
The minimum hardware required are:
- CPU with 2+ cores
- 4GB RAM
- 320GB free storage space to sync the Mainnet
- 8 MBit/sec download Internet service
It is recommended to have the following hardware:
- Fast CPU with 4+ cores
- 16GB+ RAM
- Fast SSD with at least 500GB free space
- 25+ MBit/sec download Internet service
Consider the security issues of running GETH and decide if you want or need to build a separate PC to run a node. I didn’t want to have GETH software connecting to other nodes on the Ethereum network running on my everyday PC so I setout to build a budget PC.
My personal requirements were:
- A PC that is out of site and fits under my desk
- It needs to fast sync to the blockchain so I wanted an M.2 SSD that connects directly to the mother board with fast reads and writes. I spent a lot of time reading and watching videos about NVMe read and write speeds. If one does choose this option you need to make sure the motherboard supports Gen 4.
- I want a good CPU that does not break the bank
- If my project fails I can re use the PC as a replacement for my current desktop.
- I thought about buying an NUC but they are expensive.
I purchased the following:
- AMD Ryzen 5 3600 6 core 12 threads – $160
- Roswell Micro ATX tower – $30
- Sabrent 1TB Rocket NVMe 4.0 M.2 SSD 5000 MB/s (read) and 4400 MB/s (write) – $170
- 16 GB of 3200 Ram – $90
- 500 Watt EVGA PSU – $40
- X570 Gen 4 Micro ATX motherboard – $180
One needs to shop around to get the best prices. In total I spent $670 on this PC build.
Operating System Requirements for GETH
To determine what operating system to use for GETH my requirements were:
- There cannot be any bloatware (or as little as possible)
- The server needs to be up and running 24/7
- I don’t have an extra monitor so my setup needs to be headless (no monitor)
- It needs to run Python, Docker and a few other applications
I wanted to have a simple setup with no down time so I decided to go with a Linux ubuntu server. It is super easy to install the operating system and there are plenty of Youtube videos that outline the process. If you have never done this before don’t be intimidated!
Tools to manage GETH on Linux
Since I don’t have an extra monitor (and don’t want one) I use Putty to connect to my new server. Putty is a free SSH and Telnet client.
Build an Ethereum node using GETH in Docker
After installing the Docker software visit this this page on Docker Hub for detailed instructions on how to run GETH in a container. Make sure you know basic Docker and Linux commands to get started (run, stop, prune, tail logs, etc).
In your terminal window on the machine you want to install GETH type the Docker pull command to install GETH from Docker Hub.
docker pull ethereum/client-go
After you pull this image from Docker follow the Ethereum GETH Node Configuration instructions for a quick tutorial to get your node running. Running the one command on this page is the fastest way to get your node running. It will probably take 2-3 days to fully sync the Ethereum block chain to your new GETH node.
It is very important to read all documentation to make sure you download the GETH software from the approved repository and configure your node securely. Read more about running commands on the Docker Hub page. Always have security in mind and make sure the PC you are running your node on has a firewall and has proper security.
Once Docker is installed and your GETH node is running you can:
- Build a dapp that uses data from the Ethereum blockchain
- Build another process in another container and communicate with GETH
- Query the block chain for data
- Setup mining