Step 5: Installing consensus client
Pick a consensus client
Reminder: Ensure you are logged in and execute all steps in this guide as non-root user, ethereum ,created during Step 2: Configuring Node.
Your choice of Lighthouse, Nimbus, Teku, Prysm or Lodestar.
⚙️ 4.1. Install rust dependency
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shEnter '1' to proceed with the default install.
Update your environment variables.
echo export PATH="$HOME/.cargo/bin:$PATH" >> ~/.bashrc
source ~/.bashrcInstall rust dependencies.
sudo apt-get update
sudo apt install -y git gcc g++ make cmake pkg-config libssl-dev libclang-dev clang protobuf-compiler💡 4.2. Build Lighthouse from source
mkdir ~/git
cd ~/git
git clone -b stable https://github.com/sigp/lighthouse.git
cd lighthouse
makeVerify lighthouse was installed properly by checking the version number.
🎩 4.3. Import validator key
Run the following command to import your validator keys from the eth2deposit-cli tool directory.
Enter your keystore password to import accounts.
Verify the accounts were imported successfully.
WARNING: Do not import your validator keys into multiple validator clients and run them at the same time, or you might get slashed. If moving validators to a new setup or different validator client, ensure deletion of the previous validator keys before continuing.
🔥 4.4. Configure port forwarding and/or firewall
Specific to your networking setup or cloud provider settings, ensure your validator's firewall ports are open and reachable.
Lighthouse consensus client requires port 9000 for tcp and udp
Execution client requires port 30303 for tcp and udp
⛓️ 4.5. Start the beacon chain
Create a systemd unit file to define yourbeacon-chain.service configuration.
Paste the following configuration into the file.
To exit and save, press Ctrl + X, then Y, thenEnter.
Update file permissions.
Run the following to enable auto-start at boot time and then start your beacon node service.
Nice work. Your beacon chain is now managed by the reliability and robustness of systemd.
🧬 4.6. Start the validator
Create a systemd unit file to define your validator.service configuration.
Paste the following configuration into the file.
Replace
0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESSwith your own Ethereum address that you control. Tips are sent to this address and are immediately spendable, unlike the validator's attestation and block proposal rewards.
To exit and save, press Ctrl + X, then Y, thenEnter.
Update file permissions.
Run the following to enable auto-start at boot time and then start your validator.
Nice work. Your validator is now managed by the reliability and robustness of systemd.
⚙️ 4.1. Build Nimbus from source
Install dependencies.
Install and build Nimbus.
Verify Nimbus was installed properly by displaying the version.
Copy the binary file to /usr/bin
🎩 4.2. Import validator key
Create a directory structure to store nimbus data.
Take ownership of this directory and set the correct permission level.
The following command will import your validator keys.
Enter your keystore password to import accounts.
Now you can verify the accounts were imported successfully by doing a directory listing.
You should see a folder named for each of your validator's pubkey.
WARNING: Do not import your validator keys into multiple validator clients and run them at the same time, or you might get slashed. If moving validators to a new setup or different validator client, ensure deletion of the previous validator keys before continuing.
🔥 4.3. Configure port forwarding and/or firewall
Specific to your networking setup or cloud provider settings, ensure your validator's firewall ports are open and reachable.
Nimbus consensus client will use port 9000 for tcp and udp
Execution client requires port 30303 for tcp and udp
🏂 4.4. Start the beacon chain and validator
Reminder: Nimbus combines both the beacon chain and validator into one process.
Running Checkpoint Sync
Run the following command.
When the checkpoint sync is complete, you'll see the following message:
Done, your beacon node is ready to serve you! Don't forget to check that you're on the canonical chain by comparing the checkpoint root with other online sources. See https://nimbus.guide/trusted-node-sync.html for more information.
🛠 Setup systemd service
Create a systemd unit file to define yourbeacon-chain.service configuration.
Paste the following configuration into the file.
Replace
0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESSwith your own Ethereum address that you control. Tips are sent to this address and are immediately spendable, unlike the validator's attestation and block proposal rewards.
To exit and save, press Ctrl + X, then Y, thenEnter.
Update file permissions.
Run the following to enable auto-start at boot time and then start your beacon node service.
Nice work. Your beacon chain is now managed by the reliability and robustness of systemd.
⚙️ 4.1 Build Teku from source
Install git.
Install Java 17 LTS.
Verify Java 17+ is installed.
Install and build Teku.
Verify Teku was installed properly by displaying the version.
Copy the teku binary file to /usr/bin/teku
🔥 4.2. Configure port forwarding and/or firewall
Specific to your networking setup or cloud provider settings, ensure your validator's firewall ports are open and reachable.
Teku consensus client will use port 9000 for tcp and udp
Execution client requires port 30303 for tcp and udp
🏂 4.3. Configure the beacon chain and validator
Setup a directory structure for Teku.
Copy your validator_files directory to the data directory we created above.
Remove the extra deposit_data file. Answer 'y' to remove write-protected regular file.
WARNING: Do not import your validator keys into multiple validator clients and run them at the same time, or you might get slashed. If moving validators to a new setup or different validator client, ensure deletion of the previous validator keys before continuing.
Storing your keystore password in a text file is required so that Teku can decrypt and load your validators automatically.
Replace <my_keystore_password_goes_here> with your keystore password between the single quotation marks and then run the command to save it to validators-password.txt
Confirm that your keystore password is correct.
Move the password file and make it read-only.
Clear the bash history in order to remove traces of keystore password.
Create your teku.yaml configuration file.
Paste the following configuration into the file.
Replace
<0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESS>with your own Ethereum address that you control. Tips are sent to this address and are immediately spendable, unlike the validator's attestation and block proposal rewards.
🎩 4.4 Import validator key
Create a corresponding password file for every one of your validators.
Verify that your validator's keystore and validator's passwords are present by checking the following directory.
Update directory ownership.
🏁 4.5. Start the beacon chain and validator
Use systemd to manage starting and stopping teku.
🛠️ Setup systemd service
Run the following to create a unit file to define yourbeacon-chain.service configuration. Simply copy and paste.
Move the unit file to /etc/systemd/system
Update file permissions.
Run the following to enable auto-start at boot time and then start your beacon node service.
Nice work. Your beacon chain is now managed by the reliability and robustness of systemd.
⚙️ 4.1. Install Prysm
🔥 4.2. Configure port forwarding and/or firewall
Specific to your networking setup or cloud provider settings, ensure your validator's firewall ports are open and reachable.
Prysm consensus client will use port 12000 for udp and port 13000 for tcp
Execution client requires port 30303 for tcp and udp
🎩 4.3. Import validator key
Type "accept" to accept terms of use
Press enter to accept default wallet location
Enter a new prysm-only password to encrypt your local prysm wallet files
and enter the keystore password for your imported accounts.
Verify your validators imported successfully.
Confirm your validator's pubkeys are listed.
#Example output:
Showing 1 validator account View the eth1 deposit transaction data for your accounts by running `validator accounts list --show-deposit-data
Account 0 | pens-brother-heat [validating public key] 0x2374.....7121
WARNING: Do not import your validator keys into multiple validator clients and run them at the same time, or you might get slashed. If moving validators to a new setup or different validator client, ensure deletion of the previous validator keys before continuing.
🏂 4.4. Start the beacon chain
🛠️ Setup systemd service
Create a systemd unit file to define yourbeacon-chain.service configuration.
Paste the following configuration into the file.
Replace
0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESSwith your own Ethereum address that you control. Tips are sent to this address and are immediately spendable, unlike the validator's attestation and block proposal rewards.
To exit and save, press Ctrl + X, then Y, thenEnter.
Update file permissions.
Run the following to enable auto-start at boot time and then start your beacon node service.
Nice work. Your beacon chain is now managed by the reliability and robustness of systemd.
🧬 4.5. Start the validator
Store your prysm-only password in a file and make it read-only.
This is required so that Prysm can decrypt and load your validators.
Replace <my_password_goes_here> with your prysm-only password.
Verify your password is correct.
Clear the bash history in order to remove traces of your prysm-only password.
🛠️ Setup systemd service
Create a systemd unit file to define your validator.service configuration.
Paste the following configuration into the file.
Replace
0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESSwith your own Ethereum address that you control. Tips are sent to this address and are immediately spendable, unlike the validator's attestation and block proposal rewards.
To exit and save, press Ctrl + X, then Y, thenEnter.
Update file permissions.
Run the following to enable auto-start at boot time and then start your validator.
⚙️ 4.1 Build Lodestar from source
Install curl and git.
Install yarn.
Confirm yarn is installed properly.
Install nodejs.
Install and build Lodestar.
Verify Lodestar was installed properly by displaying the version.
Setup a directory structure for Lodestar.
🔥 4.2. Configure port forwarding and/or firewall
Specific to your networking setup or cloud provider settings, ensure your validator's firewall ports are open and reachable.
Lodestar consensus client will use port 9000
Execution client requires port 30303
🎩 4.3. Import validator key
Enter your keystore password to import accounts.
Confirm your keys were imported properly.
WARNING: Do not import your validator keys into multiple validator clients and run them at the same time, or you might get slashed. If moving validators to a new setup or different validator client, ensure deletion of the previous validator keys before continuing.
🏂 4.4. Start the beacon chain and validator
Run the beacon chain automatically with systemd.
🛠 Setup systemd service
Create a systemd unit file to define yourbeacon-chain.service configuration.
Paste the following configuration into the file.
Replace
0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESSwith your own Ethereum address that you control. Tips are sent to this address and are immediately spendable, unlike the validator's attestation and block proposal rewards.
To exit and save, press Ctrl + X, then Y, thenEnter.
Update file permissions.
Run the following to enable auto-start at boot time and then start your beacon node service.
Nice work. Your beacon chain is now managed by the reliability and robustness of systemd.
🧬 4.5. Start the validator
🛠️ Setup systemd service
Create a systemd unit file to define your validator.service configuration.
Paste the following configuration into the file.
Replace
0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESSwith your own Ethereum address that you control. Tips are sent to this address and are immediately spendable, unlike the validator's attestation and block proposal rewards.
To exit and save, press Ctrl + X, then Y, thenEnter.
Update file permissions.
Run the following to enable auto-start at boot time and then start your validator.
Nice work. Your validator is now managed by the reliability and robustness of systemd.
🛠️ Helpful Consensus Client systemd commands
🗄 Viewing and filtering logs
🔎 View the status of the beacon chain
🔄 Restarting the beacon chain
🛑 Stopping the beacon chain
🗄 Viewing and filtering logs
🔎 View the status of the validator
🔄 Restarting the validator
🛑 Stopping the validator
⏭️ Next Steps
Patience required: If you're checking the logs and see any warnings or errors, please be patient as these will normally resolve once both your execution and consensus clients are fully synced to the Ethereum network.
How do I know I'm fully synced?
Check your execution client's logs and compare the block number against the most recent block on etherscan.io
Check EL logs:
journalctl -fu eth1
Check your consensus client's logs and compare the slot number against the most recent slot on beaconcha.in
Check CL logs:
journalctl -fu beacon-chain
🎉 Congrats! You've finished the primary steps of setting up your validator. You're now an Ethereum staker!
👍 Recommended Steps
Subscribe to your Execution Client and Consensus Client's Github repository to be notified of new releases. Hit the Notifications button.
Join the community on Discord and Reddit to discuss all things staking related.
Familiarize yourself with Part II - Maintenance section, as you'll need to keep your staking node running at its best.
Up your staking understanding with the EthStaker Knowledge Base
🏁 Optional Steps
Setup MEV-boost for extra staking rewards!
Familiarize yourself with Part III - Tips section, as you dive deeper into staking.
☎️ Need extra live support?
Find Ethstaker frens on the Ethstaker Discord and coincashew Discord.
Use reddit: r/Ethstaker, or DMs, or r/coincashew
💟 Like these guides?
Audience-funded guide: If you found this helpful, please consider supporting it directly. 🙏
Support us on Gitcoin Grants: We build this guide exclusively by community support!
Feedback or pull-requests: https://github.com/coincashew/coincashew
Last Words
I stand upon the shoulders of giants and as such, invite you to stand upon mine. Use my work with or without attribution; I make no claim of "intellectual property." My ideas are the result of countless millenia of evolution - they belong to humanity.
