⚒️Installation

  1. Update packages and install useful tools.

sudo apt update && sudo apt upgrade --yes && \
sudo apt install git build-essential ufw curl jq snapd screen ncdu nano fuse ufw --yes
  1. Install go using snap.

sudo snap install go --classic && \
echo 'export GOPATH="$HOME/go"' >> ~/.profile && \
echo 'export GOBIN="$GOPATH/bin"' >> ~/.profile && \
echo 'export PATH="$GOBIN:$PATH"' >> ~/.profile && \
source ~/.profile && \
go version
  1. Build the binary from source.

git clone https://github.com/confio/tgrade
cd tgrade
git checkout v2.0.2
make install
tgrade version
  1. Initialize your node.

tgrade init <node_name> --chain-id tgrade-mainnet-1
  1. Download genesis.

wget https://raw.githubusercontent.com/confio/tgrade-networks/main/mainnet-1/config/genesis.json -O /root/.tgrade/config/genesis.json
  1. Add seeds and peers to config.toml.

SEEDS="8639bc931d5721a64afc1ea52ca63ae40161bd26@194.163.144.63:26656,4557e0d0f4d543480b96ba9da3c167e4dfb32e14@167.99.67.252:26656,2df762919720bca5f46042f77148de73c06049d8@seed.tgrade.validator.run:26656"
PEERS="0a63421f67d02e7fb823ea6d6ceb8acf758df24d@142.132.226.137:26656,4a319eead699418e974e8eed47c2de6332c3f825@167.235.255.9:26656,6918efd409684d64694cac485dbcc27dfeea4f38@49.12.240.203:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.tgrade/config/config.toml
  1. Set up minimum gas price.

sed -i "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.05utgd\"/;" $HOME/.tgrade/config/app.toml
  1. Set up pruning (optional).

pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.tgrade/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.tgrade/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.tgrade/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.tgrade/config/app.toml
  1. Create service file.

sudo tee /etc/systemd/system/tgrade.service > /dev/null <<EOF
[Unit]
Description=Tgrade Daemon
After=network-online.target

[Service]
User=$USER
ExecStart=$(which tgrade) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
  1. Enable and start service.

systemctl daemon-reload
systemctl enable tgrade
systemctl restart tgrade
journalctl -u tgrade -f -o cat

If you would like to speed up the sync process, you may try using State Sync.

Last updated