Deploying an Ethereum 1.0 Geth Node

In this article, We are going to deploy an Eth1 geth node on a Ubuntu 22.04 server.

Eth1 nodes are still relevant even when you want to deploy an Eth2 (Ethereum 2.0) node that works in conjunction with Lighthouse Beacon but we’ll get to that momentarily. Note that we are not going to use any PPA but rather we will download the source and essentially build binaries from it.

You will also need Go lang installed before your can build Go-Ethereum from source code. The process is very simple and can be found here at official Go lang site: https://go.dev/doc/install

First off, assuming that you are on a fresh or a newly installed server, most of the prerequisites to compile any source code are not really available out of the box, therefore we need to install “build-essential” package.

apt update
apt install build-essential

Now let’s download the go-ethereum package directly from the GitHub.

git clone https://github.com/ethereum/go-ethereum

Once done, we have actually cloned the entire go-ethereum (also known as geth) repository. Now it is important to checkout the most current/stable release before building it. At the time of writing this post, latest release is “v1.10.26” (Paravin). You may check the latest release from this url: https://github.com/ethereum/go-ethereum/releases

Please note the, building of go-ethereum source can be done by any non-root user as far as Go lang and necessary dependencies are installed in the system. However, I suggest doing it as a root once and then copying built geth binary to /usr/local/bin directory so its available across the platform. This makes upgrading in future easy and system-wide.

Let’s checkout the latest release:

cd go-ethereum/
git checkout v1.10.26

You should see something like this:

HEAD is now at e5eb32ace params: release geth v1.10.26 stable

Now depending on how powerful your system is, you can run the make command to work with multiple threads. You may check htop command to determine number of cores available to you. Obviously, the more cores you have available, the quicker process will finish. Run the make command inside the go-ethereum directory:

make -j64

(In command above, I have used passed -j with value of 64 parallel jobs to perform while compiling source code).

Now that geth binary has been build, it is ready to be used. But if you started this process as a root user, there is one more step to be done before heading on. We will copy our newly built geth binary to /usr/local/bin directory so it is widely available across the system, and to all of the users.

cp ~/go-ethereum/build/bin/geth /usr/local/bin

Once this is done, geth command is now available across the system and this can be verified by running:

geth version

which should output something like:

Geth
Version: 1.10.26-stable
Git Commit: e5eb32acee19cc9fca6a03b10283b7484246b15a
Architecture: amd64
Go Version: go1.20
...

Now we are ready to start our Eth1 node.

For the next steps, you may want to:

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Prev
Stop working with “User-Agent” header (Browser Fingerprinting)

Stop working with “User-Agent” header (Browser Fingerprinting)

How would you identify each individual user by its browser?

Next
Deploying an Ethereum 2.0 Lighthouse node

Deploying an Ethereum 2.0 Lighthouse node

Lets get right into it: Eth2 protocol is diverse which therefore gives us option