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 initia user replace YOUR_PUBLIC_SSH_KEY with your own!
sudo adduser initia --disabled-password -q
sudo usermod -aG sudo initia
sudo -u initia 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.21.1
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.1.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 initia
git clone https://github.com/initia-labs/initia
cd initia
git checkout v0.2.23-stage-2
make build
Latest commit : 2f01bedf12e0fa2be0a21a6f183aadf6ac0cddb7
Prepare binaries for cosmovisor
mkdir -p $HOME/.initia/cosmovisor/genesis/bin
mv build/initiad $HOME/.initia/cosmovisor/genesis/bin/
rm -rf build
Create symlinks
sudo ln -s $HOME/.initia/cosmovisor/genesis $HOME/.initia/cosmovisor/current -f
sudo ln -s $HOME/.initia/cosmovisor/current/bin/initiad /usr/local/bin/initiad -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/initia.service > /dev/null << EOF
[Unit]
Description=initia 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/.initia"
Environment="DAEMON_NAME=initiad"
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/.initia/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
Enable Service
Enable initia systemd service
sudo systemctl daemon-reload
sudo systemctl enable initia
Initialize Node
Setting node configuration
sed -i \
-e 's|^chain-id *=.*|chain-id = "initiation-1"|' \
-e 's|^keyring-backend *=.*|keyring-backend = "test"|' \
-e 's|^node *=.*|node = "tcp://localhost:24557"|' \
$HOME/.initia/config/client.toml
Initialize node
initiad init $MONIKER --chain-id initiation-1
Download Genesis & Addrbook
Download genesis & addrbook file
curl -Ls https://snap.nodex.one/initia-testnet/genesis.json > $HOME/.initia/config/genesis.json
curl -Ls https://snap.nodex.one/initia-testnet/addrbook.json > $HOME/.initia/config/addrbook.json
sha256sum genesis.json
: d724e3acd64e3a597a4aa997b0dcbf97c57f4287afb26a7a5172aacb51c4c4b9
Configure Seeds
Setting up a seed peers
sed -i -e "s|^seeds *=.*|seeds = \"d1d43cc7c7aef715957289fd96a114ecaa7ba756@testnet-seeds.nodex.one:24510\"|" $HOME/.initia/config/config.toml
Configure Gas Prices
Setting up a gas prices
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.15move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff\"|" $HOME/.initia/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/.initia/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:24558\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:24557\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:24560\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:24556\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":24566\"%" $HOME/.initia/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:24517\"%; s%^address = \":8080\"%address = \":24580\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:24590\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:24591\"%; s%:8545%:24545%; s%:8546%:24546%; s%:6065%:24565%" $HOME/.initia/config/app.toml
Download Snapshots
Download latest chain snapshot
curl -L https://snap.nodex.one/initia-testnet/initia-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.initia
[[ -f $HOME/.initia/data/upgrade-info.json ]] && cp $HOME/.initia/data/upgrade-info.json $HOME/.initia/cosmovisor/genesis/upgrade-info.json
Start Service
Letss f*cking goooo!
sudo systemctl start initia