Operating System: It is recommended to use a Linux-based server, such as Ubuntu 20.04 LTS.
Update the system:
sudo apt update && sudo apt upgrade -y
Install necessary dependencies:
sudo apt install build-essential git curl wget jq -y
BeraChain is written in the Go programming language, so you need to install Golang first.
Download and install Go:
wget <https://golang.org/dl/go1.18.1.linux-amd64.tar.gz>
sudo tar -C /usr/local -xzf go1.18.1.linux-amd64.tar.gz
Set up environment variables:
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
echo "export GOPATH=$HOME/go" >> ~/.profile
echo "export PATH=$PATH:$GOPATH/bin" >> ~/.profile
source ~/.profile
Clone the repository:
git clone <https://github.com/BeraChain/berachain.git>
cd berachain
Build the binaries:
make install
Initialize the node:
berachaind init <your_node_name> --chain-id <chain-id>
Download the genesis file: Download the genesis file and place it in the configuration directory.
wget <genesis_file_URL> -O ~/.berachain/config/genesis.json
Configure the configuration files:
Edit the config.toml
and app.toml
files in the ~/.berachain/config
directory as needed (e.g., set ports, logging levels, etc.).
Create keys:
berachaind keys add <your_key_name>
Create the validator:
berachaind tx staking create-validator \\\\
--amount=1000000ubera \\\\
--pubkey=$(berachaind tendermint show-validator) \\\\
--moniker="<your_validator_name>" \\\\
--chain-id=<chain-id> \\\\
--from=<your_key_name> \\\\
--commission-rate="0.10" \\\\
--commission-max-rate="0.20" \\\\
--commission-max-change-rate="0.01" \\\\
--min-self-delegation="1"