This documentation under development by nodex.one team! πŸ‘·β€β™‚οΈπŸ‘‹
Networks
Mainnet
βš”οΈ Install

Manual Installation

Let's explore the manual installation process as we set up a node with Cosmovisor!

Install Dependencies

Update system package and install build tools
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential fail2ban ufw
sudo apt -qy upgrade

Secure Setup

πŸ“’

This step is optional, and you can choose to skip ahead to configure moniker.

Setup ssh for lava user replace YOUR_PUBLIC_SSH_KEY with your own!
sudo adduser lava --disabled-password -q
sudo usermod -aG sudo lava
sudo -u lava bash -c 'mkdir -p ~/.ssh && echo "YOUR_PUBLIC_SSH_KEY" >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys'

Configure Moniker

Replace <your-moniker-name> with your own validator name
MONIKER="<your-moniker-name>"

Install Go

install go version 1.20.10
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.20.10.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)

Build Binaries

Cloning project repository & Compile binaries
cd $HOME
rm -rf lava
git clone https://github.com/lavanet/lava.git
cd lava
git checkout v3.1.0		
Export binaries name and build
export LAVA_BINARY=lavad
make build

Latest commit : 200972c00b75a819a10385e47e64e199633480f0

Prepare binaries for cosmovisor
mkdir -p $HOME/.lava/cosmovisor/genesis/bin
mv build/lavad $HOME/.lava/cosmovisor/genesis/bin/
rm -rf build
Create symlinks
sudo ln -s $HOME/.lava/cosmovisor/genesis $HOME/.lava/cosmovisor/current -f
sudo ln -s $HOME/.lava/cosmovisor/current/bin/lavad /usr/local/bin/lavad -f

Cosmovisor Setup

Install cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0

Create Service

Create a systemd service
sudo tee /etc/systemd/system/lava.service > /dev/null << EOF
[Unit]
Description=lava node service
After=network-online.target
 
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.lava"
Environment="DAEMON_NAME=lavad"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.lava/cosmovisor/current/bin"
 
[Install]
WantedBy=multi-user.target
EOF

Enable Service

Enable lava systemd service
sudo systemctl daemon-reload
sudo systemctl enable lava

Initialize Node

Setting node configuration
lavad config chain-id lava-mainnet-1
lavad config keyring-backend test
lavad config node tcp://localhost:13057
Initialize node
lavad init $MONIKER --chain-id lava-mainnet-1

Download Genesis & Addrbook

Download genesis & addrbook file
curl -Ls https://snap.nodex.one/lava/genesis.json > $HOME/.lava/config/genesis.json
curl -Ls https://snap.nodex.one/lava/addrbook.json > $HOME/.lava/config/addrbook.json

sha256sum genesis.json : ec9fd4d2690f5799b07feaf58ddb016a23ce12ab3a8c09a65d4b21cd83616281

Configure Seeds

Setting up a seed peers
sed -i -e "s|^seeds *=.*|seeds = \"5f5cfac5c38506fbb4275c19e87c4107ec48808d@seeds.nodex.one:13010\"|" $HOME/.lava/config/config.toml

Configure Gas Prices

Setting up a gas prices
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.000000001ulava\"|" $HOME/.lava/config/app.toml

Pruning Setting

Configure pruning setting
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
  $HOME/.lava/config/app.toml

Custom Port

Please note that updating the port is optional!

Configure a custom port
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:13058\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:13057\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:13060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:13056\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":13066\"%" $HOME/.lava/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:13017\"%; s%^address = \":8080\"%address = \":13080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:13090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:13091\"%; s%:8545%:13045%; s%:8546%:13046%; s%:6065%:13065%" $HOME/.lava/config/app.toml

Download Snapshots

Download latest chain snapshot
curl -L https://snap.nodex.one/lava/lava-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.lava
[[ -f $HOME/.lava/data/upgrade-info.json ]] && cp $HOME/.lava/data/upgrade-info.json $HOME/.lava/cosmovisor/genesis/upgrade-info.json

Start Service

Letss f*cking goooo!
sudo systemctl start lava