Install client
Install Erigon client
Erigon documentation: https://erigon.gitbook.io/erigon
Find the latest stable version of Erigon on Github
- Find latest Erigon version at https://github.com/ledgerwatch/erigon/releases. AMD64 v1/v2 links at Microarchitecture levels.
- Write latest stable Erigon version:
-
Download Erigon version
3.0.15
cd ~/downloads && curl -LO https://github.com/erigontech/erigon/releases/download/v3.0.15/erigon_v3.0.15_linux_amd64v2.tar.gz
Verify hash of donwnloaded file
Get hash of downloaded file and compare it with official hashes
And check it compare to the provided hash for the file from https://github.com/erigontech/erigon/releases/download/v3.0.15/erigon_v3.0.15_checksums.txt (Note: The link links at 3.0.15 version )sha256sum erigon_v3.0.15_linux_amd64v2.tar.gz
-
Extract the downloaded package
tar xvf erigon_v3.0.15_linux_amd64v2.tar.gz
-
Copy extracted Erigon library
sudo cp -a erigon_v3.0.15_linux_amd64v2 /usr/local/bin/erigonlib
-
Remove downloaded files
cd ~/downloads && rm -r erigon_v3.0.15_linux_amd64v2.tar.gz && rm -r erigon_v3.0.15_linux_amd64v2
Configurate the service
Create a system user and data directory for Erigon service
Create a user
:sudo useradd --system --no-create-home --shell /bin/false erigon
Create a folder for Erigon data on network
:sudo mkdir -p /var/lib/erigon
-
Set access permission and ownership for the Erigon data folder
sudo chown -R erigon:erigon /var/lib/erigon
Configurate & Run Erigon Service
-
Choose ports for communication
Change the default ports below if you are going to stake on more chains simultaneously (e.g. Ethereum and Gnosis at once) on the same machine. If you are going to stake only, you can keep the default ports. If you are changing the default ports, be sure that the newly selected port is not already in used. A port in used may be checked with following code:
ss -tuln | grep ':PORT'
- If it returns empty response, the port is free and can be used.
Ports selection
-
(Default port:
30303
) -
(Default port:
8545
) -
(Default port:
8551
)
-
Enable ports communication
To allow execution client synchronization, there's need to enable port
30303
reserved for P2P traffic to TCP (allows the node to connect to peers) and UDP (allows node discovery). It may be done with following UFW setup:sudo ufw allow 30303
Use this option only if you need operate execution client and beacon client on different machines.
-
Enable port
30303
for P2P trafficTo allow execution client synchronization, there's need to enable port
30303
reserved for P2P traffic to TCP (allows the node to connect to peers) and UDP (allows node discovery). It may be done with following UFW setup:sudo ufw allow 30303
-
Enable port
8551
for IP of your second machinesudo ufw allow from 192.168.88.0/27 to any port 8551
Note: Be sure you use proper IP of your second machine / proper local network configuration.
-
Create configuration file for Erigon service
- Open configuration file
sudo nano /etc/systemd/system/erigon.service
- Copy the configuration below into the file
[Unit] Description=Erigon Execution Client (Ethereum Mainnet) After=network.target Wants=network.target [Service] User=erigon Group=erigon Type=simple Restart=always RestartSec=5 ExecStart=/usr/local/bin/erigonlib/erigon \ --chain=mainnet \ --datadir=/var/lib/erigon \ --authrpc.jwtsecret=/var/lib/jwtsecret/ethereum.hex \ --port=30303 \ --http.port=8545 \ # --ws.port=8546 \ --authrpc.port=8551 \ --private.api.addr=127.0.0.1:9090 \ --torrent.port=42069 \ --externalcl # --prune=htcr # --private.api.addr= \ # --prune.r.before=11052984 [Install] WantedBy=default.target
*Note: Update[Unit] Description=Erigon Execution Client (Gnosis Chain) After=network.target Wants=network.target [Service] User=erigon Group=erigon Type=simple Restart=always RestartSec=5 ExecStart=/usr/local/bin/erigonlib/erigon \ --chain=gnosis \ --datadir=/var/lib/erigon \ --authrpc.jwtsecret=/var/lib/jwtsecret/gnosis.hex \ --port=30303 \ --http.port=8545 \ # --ws.port=8546 \ --authrpc.port=8551 \ --private.api.addr=127.0.0.1:9090 \ --torrent.port=42069 \ --externalcl # --prune=htcr \ # --private.api.addr= \ # --prune.r.before=11052984 [Install] WantedBy=default.target
JsonRpc.JwtSecretFile
, if you use differentNOTE: If you are going to run StakeWise vault, you should set
--prune=receipts --prune.to=18470089
according to StakeWise operator service guide. - Press
CTRL
+X
thenY
thenENTER
to save and exit the config file.
- Open configuration file
Reload daemon
sudo systemctl daemon-reload
Start the service
sudo systemctl start erigon
Check the service
systemctl status erigon
journalctl -fu erigon
Start the service on system startup
sudo systemctl enable erigon
Note
This option requires the following installed utils:
A guide to install the util is attached on the Github.
- Open Delayed Start shell
sudo nano /usr/local/bin/delayed-start.sh
Configurate service start inside it
systemctl start erigon.service
- Be sure,
delayed-start.service
service controllingdelayed-start.sh
is enabled for auto start with system startupsudo systemctl enable delayed-start.service
Note
This option requires the following installed utils:
A guide to install each util is attached on the Github.
Configurate Staking Manager util
- Open the configuration file
sudo nano /usr/local/etc/staking/config/clients.conf
If the file is empty, generate it with command
sudo /usr/local/bin/staking.sh init
- Set link to proper service. It should be as follow:
executionServices="erigon"
If you place more services to the category, separate them with a space, see
executionServices="service1 service2 service3 ..."
- Open the configuration file
-
Activate service to start automatically on OS startup
- Open Start with delay util
sudo nano /usr/local/bin/delayed-start.sh
- Place or uncomment a command to start the execution client(s)
/usr/local/bin/staking.sh start execution
- Verify, that a service `
delayed-start.service
` exists and is automatically launched on system start.sudo systemctl enable delayed-start.service
- Open Start with delay util
- Open Delayed Start shell
Any issue while running Erigon client?
Check Erigon client emergency page.