June 09, 2021

How to install and run a Geth node

What is an Ethereum node or client?

Ethereum nodes are computers participating in Ethereum blockchain network. These nodes are actual computers running software that verifies, stores, and sometimes creates blocks. The actual software is called a "client," and it allows us to interact with the blockchain using the JSON-RPC API, parse and verify the blockchain, and read or write to smart-contracts.

Ethereum is reaching far more developers than ever. With this growth adoption of Ethereum, there has been a flow of multiple Ethereum clients in the industry. Nethermind, Aleth, Geth, and Trinity are the official libraries written and maintained by the Ethereum foundation. Meanwhile, Parity (now known as OpenEthereum) and Hyperledger Besu are two of the most popular third-party clients.

Geth is the most popular Ethereum client out today. It is aimed to be the fastest, lightest, and most secure Ethereum Client. It's written in the Go programming language and maintained by a group of core Ethereum Foundation developers and other contributors. In this article, we will learn how to run a Geth node.

Why use Geth?

There are many reasons you'd use Geth, but our favorite reasons are:

  • Geth is the official client software provided by the Ethereum foundation.
  • Comes with a JavaScript console (run it with `geth console`).
  • Has an interoperable JavaScript client (web3js).
  • Built-in access to the Rinkeby test net (or build your own private Ethereum network).
  • It is generally considered to be the reference implementation for other Ethereum nodes.

Disk space and hardware/computational requirements

Running an Ethereum mainnet node requires a lot of computational resources because downloading the blockchain and validating the blocks requires a lot of CPU and Disk resources.

To run a full node, our basic recommended hardware specs include a multi-core CPU, at least 8GB RAM, and an SSD drive with at least 500GB of free space mounted locally. Plus, a good internet connection is always an uncompromisable factor.

Note: You can use a mounted drive, but may suffer strange performance issues such as dropped blocks or slow syncing.

Node performance can be improved by using caching features, by telling Geth to access the state from memory instead of from your disk, specify the `--cache` flag. This will require you to have additional RAM storage equivalent to the state size of the blockchain, which is over 8GB. This means you should upgrade to 16GB or even 32GB of RAM.

Storage requirement keeps on increasing everyday as the blockchain increases, the most expensive storage requirement at the time when this guide was written is to run a n archive node with Fat DB enabled which is more than 4TB.

Installing Geth

We can install Geth in many ways and on many types of systems; here are a few quick starts for standard methods:

Installing Using a Package Manager

On macOS, Geth can be installed very easily by using go-ethereum's Homebrew tap:

$ brew tap ethereum/ethereum
$ brew install ethereum

to install master branch use --devel parameter:

$ brew install ethereum --devel

The abigen, bootnode, checkpoint-admin, clef, devp2p, ethkey, evm, faucet, geth, p2psim, puppeth, rlpdump, and wnode commands are then available on your system in /usr/local/bin/.
To find different commands, use:
$ geth --help.


Built-in launchpad PPA(Personal Package Manager) is the easiest way to install go-ethereum on Ubuntu-based systems, trusty, xenial, zesty, and artful are the supported Ubuntu versions.
To enable go-ethereum's launchpad repository run: 

$ sudo add-apt-repository -y ppa:ethereum/ethereum

Then to install the stable version of go-ethereum:

$ sudo apt-get update
$ sudo apt-get install ethereum

Or to install the develop version:

$ sudo apt-get update
$ sudo apt-get install ethereum-unstable

The abigen, bootnode, clef, evm, geth, puppeth, rlpdump, and wnode commands are then available on your system in /usr/bin/.
To find different commands, use:
$ geth --help.


The fastest and easiest way to install and run geth on windows is by downloading pre-compiled binaries from here. The page has an installer as well a .zip file; the installer will put geth into your PATH automatically, while the .zip file contains the .exe files, which directly can be run without bothering to run the installer.

Install Geth using Docker

Geth team also maintains four different docker images for running the latest stable or development versions of Geth.

  • ethereum/client-go:latest is the latest development version of Geth
  • ethereum/client-go:stable is the latest stable version of Geth
  • ethereum/client-go:{version} is the stable version of Geth at a specific version number
  • ethereum/client-go:release-{version} is the latest stable version of Geth at a particular version family

To installed Geth client using docker run

$ docker pull ethereum/client-go:latest

$ docker run ethereum/client-go:latest

The image has the following ports automatically exposed:

  • 8545 TCP, used by the HTTP based JSON RPC API
  • 8546 TCP, used by the WebSocket based JSON RPC API
  • 30303 TCP and UDP, used by the P2P protocol running the network
  • 30304 UDP, used by the P2P protocol's new peer discovery overlay

Note: if you are running an Ethereum client inside a docker container, you might want to mount in a data volume as the client’s data directory (located at /root/.ethereum inside the container) to ensure that downloaded data is preserved between restarts and/or container life-cycles.

Suggested flag configuration

After lots of trials and tribulations, we've found a config that works well that we're willing to share. We have some additional flag explanation in the next section, but this is the set of flags that have helped us serve billions of requests per month on a limited number of machines:

$ geth --rpcapi eth,web3,debug,txpool,net,shh,db,admin,debug --rpc --ws --wsapi eth,web3,debug,txpool,net,shh,db,admin,debug  --wsorigins localhost --gcmode full --rpcport=8547

Additional flag configuration

The following are some flag configurations for geth:

  • For seeing all other flags and general help:
$ geth --help

  • To enable the HTTP server
$ geth --http

  • To enable mining

  • To enable the WS-RPC server.

  • To treat accounts as local (comma separated accounts as value)
--txpool.locals value        

  • If there is no local wallet activity, we can disable the txpool journal:
--txpool.journal ""        # Disk journal for local transaction to survive node restarts (default: "transactions.rlp")

  • If there is sufficient available memory, increasing the cache can speed up the sync
--cache 2048               # Megabytes of memory allocated to internal caching (default: 1024)

  • To unlock accounts (comma separated accounts as value)
--unlock value 

  • To disable the IPC-RPC server.

  • To setup Blockchain sync mode ("fast", "full", or "light") (default: fast)
--syncmode value

  • To enable metrics collection and reporting.

  • Other things that can be bumped up for performance:

--txpool.accountslots 32   # Minimum number of executable transaction slots guaranteed per account (default: 16)
--txpool.globalslots 8192  # Maximum number of executable transaction slots for all accounts (default: 4096)
--txpool.accountqueue 128  # Maximum number of non-executable transaction slots permitted per account (default: 64)
--txpool.globalqueue 2048  # Maximum number of non-executable transaction slots for all accounts (default: 1024)

Find out more flag configuration and commands here.


Running a node helps make the Ethereum network more resilient. More individual nodes, better decentralization. We at QuickNode run nodes for hundreds of our customers. Let us know if you face any problems while running through the steps in this tutorial. We are always eager to help!!

You can always skip this whole process by getting a dedicated QuickNode geth node with us.

Subscribe to our newsletter for more articles and guide on Ethereum. If you have any feedback, please feel free to reach out to us via Twitter, and you can always chat with us if you have a question via our community server on Discord, thanks :)
Ready to try QuickNode? Start your 7-day free trial

Related articles 7

Jun 9, 2021 How to install and run a Prysm Beacon node

Even if you're a newbie, rookie, or a pro in Ethereum it really excites all of us to see these developments in Ethereum. Whether it's all the hard forks like Istanbul, Atlantis, etc. or the development of Ethereum 2.0 - there is a lot to keep up with.In this...

Continue reading
Jun 9, 2021 How to run Expedition Block Explorer

In this article, we will talk about how to install and run the Expedition Ethereum Block explorer. While playing with the Ethereum blockchain network one might need to look up transactions, tokens, addresses, or prices. To accomplish these...

Continue reading
Jun 9, 2021 How to run Nethermind node

To run an Ethereum node without any problems, it is essential to choose a good node client. Nethermind is one of the oldest and most trusted Ethereum node clients. In this guide, let’s see how we can launch a Nethermind node.

Continue reading
Jun 9, 2021 How to run a Hyperledger Besu node

As the Ethereum network continues to grow, the need for an enterprise-ready Ethereum client arises. Hyperledger Besu is an enterprise-friendly Ethereum client that can implement both public and private permissioned networks. This guide will cover the requirements to run...

Continue reading
Aug 6, 2021 How to Run a Binance Smart Chain Node

Binance Smart Chain, BSC for short, is a blockchain that seeks to provide both an alternative and extension to the Ethereum Blockchain. It has done this through several clever implementations that took place during the building of the platform. This guide will walk you...

Continue reading
Aug 17, 2021 Ethereum full node vs archive node

If the Ethereum network is to be seen as a globally distributed computer, then nodes provide computational power and resources to this computer. In this guide, we’ll understand more about Ethereum full nodes and archive nodes then explore the difference between them.

Continue reading
Sep 9, 2021 How to run a OpenEthereum (ex-parity client) Node

Ethereum nodes are computers participating in Ethereum blockchain network, these nodes are actual computers running software that verifies, stores, and sometimes creates blocks. The actual software is called a "client" and it allows us to interact with the blockchain...

Continue reading