October 28

Berachain Node Install Guide 

Here's a concise guide to installing and running a Berachain node:

System Requirements

  • OS: Linux
  • CPU: 4 cores (amd64 or arm64 architecture)
  • RAM: 16GB
  • Storage: 500GB

Installation Steps

  1. Clone the Berachain repository:
bashgit clone https://github.com/berachain/berachain
cd berachain
  1. Initialize the node:
bashberad init <your-moniker> --chain-id <chain-id>
  1. Configure genesis file:
bashcurl -o ~/.berad/config/genesis.json <genesis-file-url>
  1. Configure TOML files:
bashcurl -o ~/.berad/config/app.toml <app-toml-url>
curl -o ~/.berad/config/config.toml <config-toml-url>
  1. Modify the configuration files as needed, especially:
    • Set your moniker in config.toml
    • Add seed nodes in config.toml
  2. Start the node:
bashberad start

Using a Snapshot (Optional)

To sync faster, you can use a snapshot:

  1. Download the snapshot:
bashwget <snapshot-url>
tar -xvf <snapshot-file>
  1. Replace the data directory in ~/.berad with the extracted snapshot data.

Running Consensus and Execution Clients

Berachain nodes consist of a consensus client (beacon-kit) and an execution client (e.g., reth):

  1. Build beacon-kit:
bashgit clone https://github.com/berachain/beacon-kit
cd beacon-kit
make build
  1. Build reth:
bashgit clone https://github.com/paradigmxyz/reth
cd reth
cargo build --release
  1. Run reth:
bash./target/release/reth node --datadir <path-to-data> --chain <path-to-genesis> --http --ws
  1. Run beacon-kit:
bash./build/bin/beacond start --home <path-to-data> --beacon-kit.engine.jwt-secret-path <path-to-jwt>

Remember to secure your priv_validator_key.json if running a validator node