Installation

  1. Install packages

sudo apt update 
sudo apt install curl tar wget clang pkg-config protobuf-compiler libssl-dev jq build-essential protobuf-compiler bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
  1. Install GO via CLI

  • Remove GO if you have

sudo rm -rf /usr/local/go
sudo rm /etc/paths.d/go
sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go
cd $HOME
rm -rf /go
  • Install GO

ver="1.21.10"
sudo rm -rf /usr/local/go
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" 
rm -rf /usr/local/go
tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm -rf "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile 
source $HOME/.bash_profile
go version
  1. Install Initia via CLI

cd $HOME
git clone -b v0.2.15 https://github.com/initia-labs/initia.git
cd initia
make install
source .profile
  1. Install cosmovisor

mkdir -p $HOME/.initia/cosmovisor/genesis/bin
cp $HOME/go/bin/initia $HOME/.initia/cosmovisor/genesis/bin/
sudo ln -s $HOME/.initia/cosmovisor/genesis $HOME/.initia/cosmovisor/current -f
sudo ln -s $HOME/.initia/cosmovisor/current/bin/initiad /usr/local/bin/initia -f
cd $HOME
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
  1. Initialize Node

  • Input NODE_NAME with your node name you want

echo "export NODE_NAME=INPUT YOUR NODE NAME HERE" >> ~/.bash_profile
source $HOME/.bash_profile
initiad config set client chain-id initiation-1
initiad config set client keyring-backend os
initiad init $NODE_NAME --chain-id initiation-1
  1. Configure Genesis & Seeds

  • Copy the Genesis File

sudo apt install -y unzip wget
rm ~/.initia/config/genesis.json
rm ~/.initia/config/addrbook.json
wget -P ~/.initia/config https://snap.aznope.com/downloads/initia/genesis.json
wget -P ~/.initia/config https://snap.aznope.com/downloads/initia/addrbook.json
  • Add Seed && Peers Node

PEERS="d2a8a00cd5c4431deb899bc39a057b8d8695be9e@138.201.37.195:53456,d698baad551c45c9529f3d35c6c9bd359d4accd3@88.99.146.162:26656,322c4f2fcfc6a367f2b072b2d0e56f514b7acc2c@95.216.112.231:26656,c6aaf801feeeaf0de91ee7d90f9fc876d576e078@138.201.134.84:26656,2692225700832eb9b46c7b3fc6e4dea2ec044a78@10.148.0.11:26656,4b40ad6c16f5de04cb3fa6de962d7b0b3cb74690@185.183.182.95:26656,f02cc3bb9a136dc187bc0467c4998a340c416676@43.157.4.213:26656,25a5269f5738231cb42c671488e7b98765c7e110@91.108.241.88:26656,860a57bf4cfd2adee4f608195b4b48b4e0002b5a@10.148.0.29:26656,207374b1bba982819cab1f7d064c2d0918acb0c6@80.85.241.95:26656,c57fb59afe2e832d8343076916a437ce93a63b15@43.131.23.65:26656,db75250e16b86666f7bc21db916376f3f714d777@43.133.70.251:26656,fc70b62eed0575257349c29a6556446817dd7481@77.90.8.34:26656,1d88ec827fe2768748342595e28d9e3fa93aa45e@3.90.202.132:26656,0c730824973ca31701a27fa630225eeca90a8ba6@149.102.135.91:53456,9b720ba33bda1ee3fe2e61cac3adbfddad7bb54b@37.27.102.116:26656,c450a7989266a1ab1813905704d0ece207e36f1e@195.179.226.181:26656,5a2fc9da4804a80190cdbd61c8afb990cea96097@43.134.34.47:26656,72999c6ecdbf7d71ee14aea3d3783911a4a77109@159.69.68.183:26656,5e62316248b4942a76ba802a12233a4f881951f2@51.79.231.30:26656,2070d91b0e9e247fb44b6a9591358173823c94b5@195.179.229.75:26656,400007264e5b60aca5695d595cba6b9bd726646e@109.199.97.71:26656,c96cbce759ffca810d4ffe2ed3bf186cf93ddec2@3.121.212.25:26656,8295b373c80de36cba710a1c5042dc6dceeae276@85.10.199.254:26656,f56d23cb7907d236d08b9af52e0646f004dc0ae8@89.117.59.4:26656,80b96927e203e3c9c573bb458c5fc2a4fa968a58@185.241.151.15:26656,3cb5b30a4b4186e986c975b850d08074ac73d2fb@195.179.229.123:26656,0c67024e3f6272141b4ba2d416edec4654e77afd@195.179.229.107:26656,ff2d389755b014ca5d297068eb5ee35c1022801c@185.218.125.5:26656,e484568afd791c615f161b277cb99f41924bbb8f@195.179.229.74:26656,800906416ec13ec86c005de72bdc7fc5200572eb@171.247.185.179:26666,1e387f4bd869f4e072f6b1c5add05011202feb91@195.179.229.53:26656,ed5206fa6c0be14f7aeea4e582684a0d315ad18b@62.171.131.144:26656,cf25c2c4e586fb058ea135c3e17a565c937d2dde@45.150.64.22:26656,ab137f5c7eed1bb5172bd7cbe642ec17180ec397@193.34.213.155:33756,8102e97d8ed809e6b461f94b750f1d9c00337d4b@65.109.25.252:14656,9e42479b6ca07e4ec8fdbdd77a1e8b8d2df5f59a@43.155.181.49:26656,495286b935289b34f5b868431fd0489e3cf19901@82.208.22.168:26656,251bb329b5bf871f027fd56da329169f69f5060e@195.179.229.110:26656,e9a56b4455eb0023781f6457ec60417935713183@43.133.209.77:26656,5acd241952df78b90221a7899e9af97aaa74aa56@43.130.237.130:26656,6b7c0316a0f4c20d9ba720290ee71e2344957b92@150.109.252.122:26656,3e53f48a6f2007a7d18d717eeab38e49cbb80202@43.133.211.100:26656,d9eaca310f734e7fe252408d48187452796d350c@157.173.192.85:656,bed55ace8bd4dfc3de2e50e4f96636cc24ce1728@38.242.148.54:26656,80140a698e25b0243ab688b5bc12a9ade3624902@43.153.130.237:26656,f101e58b45076a55dea768e1540e5206045a2e42@65.21.138.87:10656,d1ac84f860ae1b857159e7e1dbd89755298e0f56@38.242.200.220:15656" && \
SEEDS="" && \
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.initia/config/config.toml
  • Configure setting

# Setting Pruning 
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
  1. Custom port (Optional)

  • You can ignore it

echo 'export initia_port="322"' >> ~/.bash_profile
source $HOME/.bash_profile

sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://0.0.0.0:${initia_port}58\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:${initia_port}57\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${initia_port}60\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${initia_port}56\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${initia_port}60\"%" $HOME/.initia/config/config.toml
 
sed -i -e "s%^address = \"tcp://localhost:1317\"%address = \"tcp://0.0.0.0:${initia_port}17\"%; s%^address = \":8080\"%address = \":${initia_port}80\"%; s%^address = \"localhost:9090\"%address = \"0.0.0.0:${initia_port}90\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${initia_port}91\"%; s%:8545%:${initia_port}45%; s%:8546%:${initia_port}46%; s%:6065%:${initia_port}65%" $HOME/.initia/config/app.toml
 
initiad config node tcp://localhost:${initia_port}57
  1. Create Service File

sudo tee /etc/systemd/system/initia.service > /dev/null << EOF
[Unit]
Description=Initia-chain node service
After=network-online.target
 
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.initia"
Environment="DAEMON_NAME=initiad"
 
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable initiad
  • Start node service

sudo systemctl daemon-reload
sudo systemctl restart intia
  • Check logs node

# ctrl-c to turn off follow log
sudo journalctl -u initia -f --no-hostname -o cat
  1. Create Wallet

  • Create new wallet

initiad keys add wallet --eth
  • Restore wallet

initiad keys add wallet --eth --recover
  1. Create Validator

initiad tx mstaking create-validator \
--amount 1000000uinit \
--pubkey $(initiad tendermint show-validator) \
--moniker $NODE_NAME \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id initiation-1 \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.05 \
--from  \
 --gas=2000000 --fees=300000uinit \
--node https://rpcinitia.aznope.com/ \
-y

Delete node

  • Save file priv_validator_key.json in $HOME/.initia/data/priv_validator_key.json first

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

Last updated