How to upgrade geth node?

How to upgrade geth node?
Photo by Nenad Novaković / Unsplash

This guide is for those who are looking to upgrade geth node to the latest release using command line tools or git clone https methods.

What is a Geth node?

Geth stands for "Go Ethereum" and it is written using the Go programming language. Geth node is one of many Ethereum clients that is running within Ethereum network nodes.

Geth allows you to interact with the ethereum network for things like ending and receiving Ethereum transactions, verifying the validity of blocks on the Ethereum blockchain, and executing smart contracts.

Running a Geth node provide users with more control and insight into the workings of the Ethereum network. Some developers use Geth to develop and test decentralized applications (dApps) on the Ethereum network.

Upgrade Geth node Linux

Below steps provide you with commands to upgrade geth node on linux machines:

  1. First, lets stop the geth node before upgrading software.
sudo systemctl stop geth

2.  Add the Ethereum PPA (Personal Package Archive) to your system's list of repositories. A PPA is a collection of software packages that are not included in the official Ubuntu repositories but are provided by third-party developers or organizations.

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

3.  Assuming you are using a Ubuntu OS, lets update the package system first.

sudo apt-get update

4.  Download and install the Ethereum client, Geth, along with any necessary dependencies.

sudo apt-get install ethereum

5.  Lets upgrade the Geth package to the latest version available in your system's configured repositories using the apt package manager.

sudo apt-get upgrade geth

6.  All done! lets start the ethereum node back up again.

sudo systemctl start geth

7. If you want to make sure that you have upgraded Geth, you can run the following command.

geth version check

Upgrade Geth node Windows

To upgrade geth node on windows machines, follow the below steps:

  1. Download the latest version of geth from the official website.
  2. Once you have downloaded the latest version, extract the files from the zip folder to a location of your choice.
  3. Open a command prompt or PowerShell window and navigate to the directory where you extracted the geth files.
  4. Stop your existing geth node by typing the following command and pressing Enter:
geth.exe --rpc --rpcaddr "localhost" --rpcport "8545" --rpcapi "db,eth,net,web3,personal" --datadir "<path_to_data_directory>" --syncmode "fast" stop

5.  Replace <path_to_data_directory> with the path to your data directory. If you used the default settings when you installed geth, your data directory is most likely located at

C:\Users\<your_username>\AppData\Roaming\Ethereum.

6.  Once your existing geth node has stopped, navigate to the directory where you extracted the latest version of geth.

7.  Type the following command and press Enter to start the new version of geth:

geth.exe --rpc --rpcaddr "localhost" --rpcport "8545" --rpcapi "db,eth,net,web3,personal" --datadir "<path_to_data_directory>" --syncmode "fast"

Replace <path_to_data_directory> with the path to your data directory.

8.  Wait for geth to sync with the Ethereum network. This may take some time, depending on your internet connection and the size of the blockchain.

Upgrade Geth node MacOS via Homebrew

To upgrade geth node using Homebrew on macOS, you can follow these steps:

  1. Open a terminal window on your macOS.
  2. First thing is to check if Geth is already installed on your Mac. The following command should return a version number.
brew -v

3.  If you get a output with version number displayed then Geth is already installed in your Mac and there is no need to install Geth anymore. Therefore lets update our Homebrew software first. Updating Homebrew ensures that you have access to the latest versions of packages and bug fixes.

brew update

4.  Before you continue with the next command for the new version, ensure your Geth node is stopped. If the geth node is running as a daemon, then you can kill it with the below commands.

ps aux | grep geth
kill -INT <pid>

5.  Following command will install geth with latest version.

brew upgrade
brew reinstall ethereum

6.  Once the upgrade is complete, you can check the version of geth by running the following command.

These commands install the core Geth software and the following developer tools: clef, devp2p, abigen, bootnode, evm, and rlpdump

Upgrade Geth node Docker images

Updating Geth node to the latest version simply requires stopping the docker container, pulling the latest version from Docker and running it as shown below:

  1. We will use docker stop command to stop a running Docker container that is running the Ethereum client Geth.
docker stop ethereum/client-go

2.  Once the container is stopped, pull the latest version of Geth.

docker pull ethereum/client-go:latest

3.  You are now ready to run the docker container with the latest version of geth installation.

docker run -it -p 30303:30303 ethereum/client-go

Latest geth node Versions

Make from Source

If you want to run the geth node form source run the below commands:

git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum
make geth

Below are list of latest ethereum client release versions and their features. You can visit the github repository links provided to find out more in detail about each releases.

Kite's Nest (v1.11.2)

Geth 1.11.2 (Kite's Nest) is a patch-release, fixing a couple of issues with the 1.11 release family.

  • Fix a few small engine API discordances with the spec post-Shanghai (#26696, #26722).
  • Fix unmarshalling JSON null values as a proper result instead of nil (#26723).
  • Fix dumpgenesis which failed due to a bad database key write (#26747).
  • Fix pending tx filter to return hashes, not full txs by default (#26757).
  • Fix eth_feeHistory to accept decimal blocks again (#26758).
  • Fix Ubuntu PPA builds after the Go 1.20 fallout.

Read more