Skip to content

Install

Website | Twitter | Discord | InitiaScan


Public Endpoints | Genesis | Addrbook

https://initia-test.rpc.moonbridge.team
Chain ID: initiation-1 | Latest Version: v0.2.14 | Custom Port: 138
Specify the name of your “MONIKER” (validator) which will be visible in the explorer
MONIKER="YOUR_MONIKER_NAME"

Update system and install tools

sudo apt update && sudo apt upgrade -y
sudo apt install curl build-essential git jq lz4 ncdu bashtop -y

Install GO

cd $HOME
version="1.22.3"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile

Install Cosmovisor

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

Download and install

cd $HOME
git clone https://github.com/initia-labs/initia
cd initia
git checkout v0.2.14
make install
initiad version --long | grep -e commit -e version

Config and Init node

# Set node configuration
initiad config chain-id initiation-1
initiad config keyring-backend file
initiad config node tcp://localhost:13857
# Initialize node
initiad init $MONIKER --chain-id initiation-1
# Download genesis and addrbook
curl -Ls https://snapshots.moonbridge.team/testnet/initia/genesis.json > $HOME/.initia/config/genesis.json
curl -Ls https://snapshots.moonbridge.team/testnet/initia/addrbook.json > $HOME/.initia/config/addrbook.json
# Set seeds and peers
SEEDS="2eaa272622d1ba6796100ab39f58c75d458b9dbc@34.142.181.82:26656,c28827cb96c14c905b127b92065a3fb4cd77d7f6@testnet-seeds.whispernode.com:25756"
PEERS=""
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.initia/config/config.toml
# Setting minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.15uinit,0.01uusdc\"|" $HOME/.initia/config/app.toml
# Setting pruning
sed -i -e 's|^pruning *=.*|pruning = "custom"|' $HOME/.initia/config/app.toml
sed -i -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' $HOME/.initia/config/app.toml
sed -i -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' $HOME/.initia/config/app.toml
sed -i -e 's|^pruning-interval *=.*|pruning-interval = "10"|' $HOME/.initia/config/app.toml
# Disable indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.initia/config/config.toml
# Enable Prometheus
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.initia/config/config.toml
# Setting custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:13858\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:13857\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:13860\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:13856\"%; s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):13856\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":13866\"%" $HOME/.initia/config/config.toml
sed -i -e "s%:1317%:13817%g; s%:8080%:13880%g; s%:9090%:13890%g; s%:9091%:13891%g; s%:8545%:13845%g; s%:8546%:13846%g; s%:6065%:13865%g" $HOME/.initia/config/app.toml

Configure Cosmovisor

mkdir -p $HOME/.initia/cosmovisor/genesis/bin
mkdir -p $HOME/.initia/cosmovisor/upgrades
cp $HOME/go/bin/initiad $HOME/.initia/cosmovisor/genesis/bin/

Create service

sudo tee /etc/systemd/system/initiad.service > /dev/null << EOF
[Unit]
Description=Initia Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=5
LimitNOFILE=65535
Environment="DAEMON_NAME=initiad"
Environment="DAEMON_HOME=$HOME/.initia"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_POLL_INTERVAL=300ms"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable initiad

Download latest snapshot

curl -o - -L https://snapshots.moonbridge.team/testnet/initia/snapshot_latest.tar.lz4 | lz4 -dc - | tar -x -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 and check the logs

sudo systemctl start initiad && sudo journalctl -u initiad -f --no-hostname -o cat

Create wallet

initiad keys add wallet

Check wallet balance

initiad q bank balances $(initiad keys show wallet -a)

Create validator

initiad tx mstaking create-validator \
--amount 1000000uinit \
--pubkey $(initiad tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--security-contact "YOUR_EMAIL_ADDRESS" \
--chain-id initiation-1 \
--commission-rate 0.10 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.15uinit \
-y

Delete node

sudo systemctl stop initiad
sudo systemctl disable initiad
sudo rm -rf /etc/systemd/system/initiad.service
sudo systemctl daemon-reload
sudo rm -f $(which initiad)
sudo rm -rf $HOME/.initia
sudo rm -rf $HOME/initia