💻Baremetal
Authors: [ Godwin]
System Requirements
8 vCPU
Ubuntu 22.04
48 GB
400+ GB
The Berachain node has a size of 237 GB on 19, May, 2025. Erigon: 165 and Beacond: 71GB
Pre-requisite
Commands
sudo apt update -y && sudo apt upgrade -y && sudo apt auto-remove -yFirewall Settings
Check status & enable UFW
sudo ufw enable
sudo ufw status verboseSet explicit default UFW rules
Allow SSH, HTTP, and HTTPS
Allow Remote connection
Setup Instructions
Depending on your execution client you intend to use, you delete the other client files. For a full list of the clients and versions go to this page - EVM Execution Layer ⟠ | Berachain Core Docs
For this guide, I chose erigon client, so this guide will follow the installation of erigon as the execution layer as well as beacond for the consensus layer.
Install Erigon
First Install go
Build Erigon
Berachain node requires erigon v1.26.x for mainnet. With Rust and the dependencies installed, you're ready to build Erigon. First, clone the repository:
Install Beacond Consensus Layer Note: Beacond requires go version 1.17.x - 1.23.x
Install Beacond
Edit Env.sh The file env.sh contains environment variables used in the other scripts. fetch-berachain-params.sh obtains copies of the genesis file and other configuration files. Then we have setup- and run- scripts for various execution clients and beacond.
You need to set these constants:
CHAIN_SPEC: Set to
testnetormainnet.MONIKER_NAME: Should be a name of your choice for your node.
WALLET_ADDRESS_FEE_RECIPIENT: This is the address that will receive the priority fees for blocks sealed by your node. If your node will not be a validator, this won't matter.
EL_ARCHIVE_NODE: Set to
trueif you want the execution client to be a full archive node.MY_IP: This is used to set the IP address your chain clients advertise to other peers on the network. If you leave it blank,
gethandrethwill discover the address with UPnP (if you are behind a NAT gateway) or assign the node's ethernet IP (which is OK if your computer is directly on the internet and has a public IP). In a cloud environment such as AWS or GCP where you are behind a NAT gateway, you must specify this address or allow the defaultcurl canhazip.comto auto-detect it, if connections to that address lead back to your instance.
You should verify these constants:
LOG_DIR: This directory stores log files.
BEACOND_BIN: Set this to the full path where you installed
beacond. The expression provided finds it in your $PATH.BEACOND_DATA: Set this to where the consensus data and config should be kept. BEACOND_CONFIG must be under BEACOND_PATH as shown. Don't change it.
ERIGON_BIN or other chain client: Set this to the full path where you installed
erigon. The expression provided finds it in your $PATH.
Fetch Mainnet Parameters
Run
Set up the Consensus Client
The script setup-beacond.sh invokes beacond init and beacond jwt generate. This script:
Runs
beacond initto create the filevar/beacond/config/priv_validator_key.json. This contains your node's private key, and especially if you intend to become a validator, this file should be kept safe. It cannot be regenerated, and losing it means you will not be able to participate in the consensus process.Runs
beacond jwt generateto create the filejwt.hex. This contains a secret shared between the consensus client and execution client so they can securely communicate. Protect this file. If you suspect it has been leaked, generate a new one withbeacond jwt generate -o $JWT_PATH.Rewrites the beacond configuration files to reflect settings chosen in
env.sh.Places the mainnet parameters fetched above where Beacon-Kit expects them, and shows you an important hash from the genesis file.
Set up the Execution Client
The provided scripts setup-reth, setup-geth and setup-nether create a runtime directory and configuration for those respective chain clients. The node is configured with pruning settings according to the EL_ARCHIVE_NODE setting in config.sh.
Here's an example of setup-erigon:
Your genesis block hash must agree with the above
Run the Client
Setup Services for both beacond and erigon
Beacond service
Erigon Service
Contents of run-erigon.sh
This file can be configured based on your needs
Contents of run-beacon.sh
Start the service
Confirm Node Syncing
Beacon
Erigon
Testing Local RPC Node
Get the current execution block number
Result
Get Current Consensus Block Number
Result
Last updated
Was this helpful?