Skip to content

Instantly share code, notes, and snippets.

@bloqhub
Created October 29, 2021 15:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bloqhub/ba04d09891bd59c21d9ff228eefadb62 to your computer and use it in GitHub Desktop.
Save bloqhub/ba04d09891bd59c21d9ff228eefadb62 to your computer and use it in GitHub Desktop.
Stargaze cosmovisor setup
0. Upgrade node to resease 1.0.0 Using docs:
https://github.com/public-awesome/mainnet/tree/main/stargaze-1
1. setup cosmovisor
cd ~
git clone https://github.com/cosmos/cosmos-sdk
cd cosmos-sdk
git checkout v0.42.7
make cosmovisor
cp cosmovisor/cosmovisor /usr/local/bin/cosmovisor
cd $HOME
2. Making folders
mkdir -p ~/.starsd/cosmovisor
mkdir -p ~/.starsd/cosmovisor/genesis
mkdir -p ~/.starsd/cosmovisor/genesis/bin
mkdir -p ~/.starsd/cosmovisor/upgrades
3. Setup ENV vars
echo "# Setup stargaze Cosmovisor" >> ~/.profile
echo "export DAEMON_NAME=starsd" >> ~/.profile
echo "export DAEMON_HOME=$HOME/.starsd" >> ~/.profile
echo "export DAEMON_RESTART_AFTER_UPGRADE=true" >> ~/.profile
source ~/.profile
4. Copy stargsze binary to cosmovisor
cp $GOPATH/bin/starsd ~/.starsd/cosmovisor/genesis/bin/
5. Creating service
sudo tee /etc/systemd/system/stargaze.service > /dev/null <<EOF
[Unit]
Description=Stargaze cosmovisor Daemon
After=network-online.target
[Service]
User=$USER
ExecStart=cosmovisor start
Restart=always
RestartSec=3
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.starsd"
Environment="DAEMON_NAME=starsd"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF
6. Start service
sudo systemctl daemon-reload
sudo systemctl enable stargaze
sudo systemctl start stargaze
7. View logs
journalctl -u stargaze -f
8. get peer addr
echo $(starsd tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.starsd/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
9. post your peer here
https://hackmd.io/GRsY7WQVTVmIAjwznaKAMg?both
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment