Tutorial created by Validatrium (more info on our projects at validatrium.com)
- Setup
- Install dependencies and binaries
- Create wallet
- Configure your node
- Run node
- Monitoring
useradd passage -mU -G sudo -s /bin/bash
passwd passage # enter password for agoric
su - passage
# set node name
ACCOUNT=<node-name>
CHAIN=passage-1
# upgrade ubuntu
sudo apt update && sudo apt upgrade -y
sudo apt install build-essential jq -y
# install go
wget https://go.dev/dl/go1.17.5.linux-amd64.tar.gz
rm -rf $HOME/go && tar -C $HOME -xzf go1.17.5.linux-amd64.tar.gz
echo 'export GOPATH=/usr/local/go' >> $HOME/.bashrc
echo 'export GOBIN=$GOPATH/bin' >> $HOME/.bashrc
echo 'export PATH=$PATH:$GOBIN' >> $HOME/.bashrc
source $HOME/.bashrc
# install passage
git clone https://github.com/envadiv/Passage3D && cd Passage3D
git checkout v1.0.0
make install
# verify everything is installed
passage version --long
# init agoric home directory
passage init $ACCOUNT --chain-id $CHAIN
# create new key
passage keys add $ACCOUNT
# or restore existing
passage keys add $ACCOUNT --recover
# save wallet & valoper address to variables:
ADDRESS=$(passage keys show $ACCOUNT -a)
VALIDATOR=$(passage keys show $ACCOUNT -a --bech val)
Do not forget to save mnemonic in the safe place!
cat << EOF >> $HOME/.bashrc
. <(passage completion)
export ACCOUNT=$ACCOUNT
export CHAIN=$CHAIN
export ADDRESS=$ADDRESS
export VALIDATOR=$VALIDATOR
EOF
source $HOME/.bashrc
curl -s https://raw.githubusercontent.com/envadiv/mainnet/main/passage-1/genesis.json > ~/.passage/config/genesis.json
passage tendermint unsafe-reset-all
peers="69975e7afdf731a165e40449fcffc75167a084fc@104.131.169.70:26656,d35d652b6cb3bf7d6cb8d4bd7c036ea03e7be2ab@116.203.182.185:26656,ffacd3202ded6945fed12fa4fd715b1874985b8c@3.98.38.91:26656,8e0b0d4f80d0d2853f853fbd6a76390113f07d72@65.108.127.249:26656,0111da7144fd2e8ce0dfe17906ef6fd760325aca@142.132.213.231:26656"
seeds="aebb8431609cb126a977592446f5de252d8b7fa1@104.236.201.138:26656,b6beabfb9309330944f44a1686742c2751748b83@5.161.47.163:26656,7a9a36630523f54c1a0d56fc01e0e153fd11a53d@167.235.24.145:26656"
# Replace the seeds and persistent_peers values
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.passage/config/config.toml
sed -i.bak -e "s/^seeds *=.*/seeds = \"$seeds\"/" $HOME/.passage/config/config.toml
# set pruning options
pruning="custom" && \
pruning_keep_recent="100" && \
pruning_keep_every="0" && \
pruning_interval="10" && \
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.passage/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.passage/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.passage/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.passage/config/app.toml
You can run it in background using screen
or tmux
for example:
passage start
Or run this as a systemd service
sudo tee <<EOF >/dev/null /etc/systemd/system/passaged.service
[Unit]
Description=passage node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which passage) start
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable passaged
sudo systemctl daemon-reload
sudo systemctl start passaged
- free disk space is less than 20% and 10% - (low disk space notification)
- height is not changing - (network connection error notification)
- node process is not running - (node has been turned off)
- node hasn't peers - (no peers - no sync. It's important)
- validator isn't in active set - (to know if you're in jail)
- RPC server is not running - (important to monitor parameters listed above)
- API service is not running - (For future updates, by default it's not working. But you can turn it on)
- root account on server
- telegram bot token .You can follow this instruction
- Reciever chat_id. Follow this guide to get your telegram id:
cd /root
apt install monit jq -y
# clone our repository:
git clone https://github.com/Validatrium/valmonit.git
# enable monitoring in monit configuration:
echo "
include /root/valmonit/conf/passage/*
include /root/valmonit/conf/system
include /root/valmonit/conf/default-cosmos-monitoring
" >> /etc/monit/monitrc
# set your telegram.conf
cd $HOME/valmonit
cp telegram.conf.example telegram.conf
# enter your "telegram-id" and "bot-token"
nano telegram.conf
# verify that you can get notifications:
./bin/sendtelegram -m "hi there!" -c ./telegram.conf
# by default it's monitor rpc-port/26657 and api-port/1317
# if you run on other ports you have to change it in:
nano sh/cosmos-rpc.sh
# you can enable web interface for your monitoring tool:
# but it's not actually required
cat <<EOF >> /etc/monit/monitrc
set httpd port 2812 and # run on port 2812
use address 0.0.0.0 # run on internet interface
allow * # allow everyone connetc
allow admin:monit # user:password pair
EOF
# restart monitoring tool
systemctl restart monit
Tutorial created by Validatrium (more info on our projects at validatrium.com)
If you have any additional questions regarding this tutorial, please join Passage official discord channel and tag Validatrium members.