Skip to content

Install


Chain IDLatest Version TagWasm

Setup validator name

Terminal window
MONIKER="YOUR_MONIKER_GOES_HERE"

Install dependencies

Update system and install build tools
Terminal window
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade
Install file2ban

more here and here

Terminal window
# set and copy the config that will have higher priority
sudo apt install fail2ban -y && \
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local && \
sudo nano /etc/fail2ban/jail.local
# uncomment and add your IP: ignoreip = 127.0.0.1.1/8 ::1 [ip]
sudo systemctl restart fail2ban
# check status
sudo systemctl status fail2ban
# check which jails are active (by default only sshd)
sudo fail2ban-client status
# check sshd statistics
sudo fail2ban-client status sshd
# look at the logs
sudo tail /var/log/fail2ban.log
# stop work and remove from autoloading
\#sudo systemctl stop fail2ban && sudo systemctl disable fail2ban
Install GO
Terminal window
cd $HOME
ver="1.22.5"
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go$ver.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)

Download and build binaries

Download the latest binary file from the page

If necessary

Terminal window
# Unpack the tar.gz file:
tar -xvf _project_bin__linux_amd64.tar.gz
Terminal window
# Prepare binaries for Cosmovisor
mkdir -p $HOME/._project_name_/cosmovisor/genesis/bin
mv _project_bin_ $HOME/._project_name_/cosmovisor/genesis/bin/
Terminal window
# Create application symlinks
sudo ln -s $HOME/._project_name_/cosmovisor/genesis $HOME/._project_name_/cosmovisor/current -f
sudo ln -s $HOME/._project_name_/cosmovisor/current/bin/_project_bin_ /usr/local/bin/_project_bin_ -f

Install Cosmovisor and create a service

Terminal window
# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
Terminal window
# Create service
sudo tee /etc/systemd/system/_project_name_.service > /dev/null << EOF
[Unit]
Description=_project_name_ node service
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/._project_name_/
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/._project_name_"
Environment="DAEMON_NAME=_project_bin_"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/._project_name_/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
Terminal window
sudo systemctl daemon-reload && sudo systemctl enable _project_name_.service

Initialize the node

Terminal window
# Set node configuration
_project_bin_ config chain-id _chain_id_
_project_bin_ config keyring-backend file
_project_bin_ config node tcp://localhost:26657
# Initialize the node
_project_bin_ init $MONIKER --chain-id _chain_id_
# Download genesis and addrbook
curl -Ls _url_genesis_ > $HOME/._project_name_/config/genesis.json
curl -Ls _url_adrbook_ > $HOME/._project_name_/config/addrbook.json
# Add peers
sed -i 's/persistent_peers = ""/persistent_peers = "f958f4e2d1384514ed8c62b1bc753d0b8a8d0430@167.235.102.45:24656,b307b56b94bd3a02fcad5b6904464a391e13cf48@128.199.33.181:26656,a950d48fce4a648aacf7327198e6ea3e545f3112@168.119.166.138:26656,790544e857cfe673cab570668131aa7ae2be7e5d@178.63.100.102:26656,c597aa118302d417e039e5a81d722422e73c85e1@135.125.67.229:26656,3f6c17d793da169f30aa9b3f9df738313ea10b72@65.109.78.7:24356,e5b970c7b4e9b0281fc2fc58166c9e9af476c9a3@46.4.23.120:58656,f282af2ba286abb9d4aab611a8f39176c26d6928@213.239.207.175:61656,eeb793482d2957e760b65c37978ad5ba3528bbd9@65.108.66.174:41656,5e0a6a49f58639b952808036f3aadaf98b1a2144@49.12.134.188:29656,9949c2ab29bad0feeab63248ba33be3c695225cd@65.109.124.52:24356,61f70b8b37b9a0755b95dac7d57a8c2cc45ea4ea@65.109.78.80:24356,5ad15186a602778fbeeccf86c836a68cc225b21b@2001:bc8:3de9:100::9:26656,55e600a4a019fee1b38451cc36c40ba2a4fdfc5b@136.243.104.103:12856,5fec0f158870a9e82e8a48fed83a78d567fb639a@167.235.12.38:22156,d5122d3b2c5ca9375778835fbfac64122c0cf7e9@57.128.44.52:26656,6c0dee280d5d3a421a5b5e489e998f924beb84bd@84.46.245.53:16656,8401cbf633c496e464a2d016b333f61ff34e9ee9@167.71.233.135:26656,52130bea53e3286292fcbf6753f6f57f3b40e138@65.108.232.168:12656,12ee3086924cd372f9b246f2fd62f168d8e1956f@34.159.126.243:26656,be095fc4524d3a17c813bd33f2acc11d2979dec1@176.32.72.14:26656,a22d0459d1009409aec858efb78e3d3531791fe1@159.69.116.131:26656,a6f38e9d642a7770c865bbc54ec7dfe73da06780@65.109.25.246:30456,7a9038d1efd34c7f3baea17d8822262a981568b1@217.182.136.79:30156,861152eda2fbab6555e8188088ea4dea9472a174@38.242.157.6:26656,c87c1b17045b27fd14b13d7dbb3469a2248cb1f7@95.217.204.58:24356,b844793daeffaedfcdbd5b08688cd10e1859d678@37.120.245.116:26656,315d98aa79bc26f119e78e893883da595b0d9fde@198.7.118.188:26656,a18a0442a1ddcff2949a37ec56a13b45c3588522@144.76.109.19:49656,70fd3455bb99c56b197ebcdd71d58031e33a1932@212.22.70.9:26656,232c4391567b052b7aabffd459144eb34774d966@144.76.70.103:29656,9b9dee928a174bcd0272be9127f5f455d418d6b2@169.0.116.67:26656,6ca2f5faaac9eb9515d12e4437dda9f5b92fe75a@185.185.80.16:27656,3747951f83396d549af9e6695fff78f8448f560c@5.75.179.6:11356,7efdc46e50e03e1f1208c8f276047b7fea345cc8@34.159.61.233:26656,e9376f40ac2b672e9f2f66ad212f59801d53afe8@178.162.165.193:26656,1e8aba6c7d2e33545353d073006ea9815c641158@46.4.64.123:26656,4fe1c6741fa525a7462375025aeef42039246cc1@34.159.76.158:26656,9d7dbaa0cb7f28ab8926c738860c18bd6d00aaaf@57.129.52.248:26656,5bfe7ec3ce0fbbf6d724dc85edef31c23b0a5e5e@94.130.138.48:41656,bc707417e8609d4f592900cd7b153d35f609a8a7@43.207.64.204:26656,07291598c904b1a007c95c1ad65726ec89e86957@149.50.96.153:26656,760e81fb4399f84bb4812910df871dda47a338fc@135.181.57.156:24356,a96b7c56cb64c16917a629c9ae0f3b3c0aea584c@34.159.17.88:26656,8c748ed54d18f42ad15645f36c149ef9c00f09e3@34.141.102.198:26656,d93bbc2d467800a10581d38261041d7dc0bcc4cd@158.220.90.61:26656,ca615e31000fa4c6d306fe3ef660a9073fd5b841@65.109.57.180:26656,05f4912df9e18205b5707ba8e2374e6d0e9fa95a@162.55.245.254:27656,9512a59cf93b987aff830148421a514cacb8a1b8@170.64.141.15:26656,ff77973d8ad85a9bebbb05ce5fdb2094c362a7c8@103.79.130.134:11356,42e3bf3afb429b876a2184367ce4f99a5ee708cc@18.182.157.234:26656,bd5e996b82aa76539b6d893001903e464072bf47@23.88.7.159:15956,e097dc629cbe874b139841dedb06775cc75435ee@65.108.237.188:20656,932f5e6df40fb6aa2c4a8a01e71c5f5fc490872a@65.109.120.211:26656,514714894c6b09dd7966560a000a449a772c5d10@52.196.107.134:26656,c4b4a4473359c865f0baa648e5f406040781941f@13.212.193.70:26656,e9f2bfbf5cddb0a792148dff3f0b3520d3c63a0f@65.109.92.241:3056,4eb8d9187e32a4d463d11ef0d4df2a045d23e3fe@13.115.163.113:26656,7ccbdf58e44f8e050b093f20cc53710859782e54@57.129.39.77:26656,5f5cfac5c38506fbb4275c19e87c4107ec48808d@65.21.198.100:12856,57e9f8a2ecc83619b894ffd5ee515c5d16c580f8@75.119.156.36:10156"/' config.toml
# Set minimum gas price
sed -i -e "s|^minimum-gas-prices _=._|minimum-gas-prices = \"_min_gas__utoken_\"|" $HOME/._project_name_/config/app.toml
# Set pruning
sed -i \
-e 's|^pruning _=._|pruning = "custom"|' \
-e 's|^pruning-keep-recent _=._|pruning-keep-recent = "1000"|' \
-e 's|^pruning-keep-every _=._|pruning-keep-every = "0"|' \
-e 's|^pruning-interval _=._|pruning-interval = "10"|' \
$HOME/._project_name_/config/app.toml
# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:14258\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:14257\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:14260\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:14256\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":14266\"%" $HOME/._project_name_/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:14217\"%; s%^address = \":8080\"%address = \":14280\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:14290\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:14291\"%; s%:8545%:14245%; s%:8546%:14246%; s%:6065%:14265%" $HOME/._project_name_/config/app.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 50/g' $HOME/._project_name_/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 50/g' $HOME/._project_name_/config/config.toml

Start service and check the logs

Terminal window
sudo systemctl start _project_name_.service && sudo journalctl -u _project_name_.service -f --no-hostname -o cat