ETH 1.0 - Goerli Testnet

In this section, we will install a Eth1 node and sync it to the Eth1 Goerli testnet.

Update the system:

sudo apt update && sudo apt upgrade

Update Distro and autoremove:

sudo apt dist-upgrade && sudo apt autoremove

Download Go Ethereum using Personal Package Archives (PPA):

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

Update packages

sudo apt update

Install Geth:

sudo apt install geth

Create service file to run Geth

Create goeth user:

sudo useradd --no-create-home --shell /bin/false goeth

Create /goethereum directory:

sudo mkdir -p /var/lib/goethereum

Assign goeth permission to modify /goethereum:

sudo chown -R goeth:goeth /var/lib/goethereum

Create geth.service :

sudo nano /etc/systemd/system/geth.service

Paste the following into the file:

[Unit] Description=Ethereum go client After=network.target Wants=network.target [Service] User=goeth Group=goeth Type=simple Restart=always RestartSec=5 ExecStart=geth --goerli --http --datadir /var/lib/goethereum [Install] WantedBy=default.target

It should look like this:

Use Ctrl + X to exit, Y to save, then Enter to confirm.

Command Descriptions:

Below is a description of the commands used on the "ExecStart" line:

  • geth - launch geth (eth1 node)

  • --goerli - connect to goerli testnet

  • --http - expose endpoint for eth2 beacon node (http://localhost:8545)

  • --datadir /var/lib/goethereum - data directory for chain_db

Reload the daemon:

sudo systemctl daemon-reload

Start geth.service:

sudo systemctl start geth

Check geth.service output:

sudo journalctl -f -u geth.service

This shows running journal entries created by geth.service. You can use Ctrl + C to close the window, but the program will continue running in the background.

Use sudo systemctl stop geth if you need to stop geth.service

The node will search for peers and begin syncing to reach the current block at https://goerli.etherscan.io/

The Goerli chain is relatively small and should only take a few hours to sync, but the Eth1 mainnet is much larger and can take a few days to fully sync.

Eth1 Goerli Sync - In Progress

Congratulations! Your Eth1 Goerli testnet node is now syncing!

As you wait for the Eth1 node to sync, you can open a new terminal and install the Eth 2.0 - Beacon Node.

Last updated