Cosmovisor
IMPORTANT:
Instructions for installing cosmovisor on an already running node
Install cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
Stop your node and disable service
sudo systemctl stop shidod
sudo systemctl disable shidod
Delete old service
sudo rm -r /etc/systemd/system/shidod.service
Delete shido binary
sudo rm -r /usr/local/bin/shidod
Create application symlinks
ln -s $HOME/.shidod/cosmovisor/genesis $HOME/.shidod/cosmovisor/current -f
sudo ln -s $HOME/.shidod/cosmovisor/current/bin/shidod /usr/local/bin/shidod -f
Prepare binaries for Cosmovisor (in some cases must be used with sudo)
cd $HOME
mkdir -p $HOME/.shidod/cosmovisor/genesis/bin
curl -L -o shidod https://github.com/ShidoGlobal/shido-upgrade-v3.3.1/releases/download/v3.3.1/shidod
sudo cp shidod $HOME/.shidod/cosmovisor/genesis/bin/
sudo chmod +x $HOME/.shidod/cosmovisor/genesis/bin/shidod
rm -rf shidod
Create service
sudo tee /etc/systemd/system/shidod.service > /dev/null << EOF
[Unit]
Description=Shido node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.shidod"
Environment="DAEMON_NAME=shidod"
[Install]
WantedBy=multi-user.target
EOF
- Enable & Start the service and check the logs
sudo systemctl enable shidod
sudo systemctl daemon-reload
sudo systemctl enable shidod.service
sudo systemctl start shidod
sudo journalctl -u shidod -f --no-hostname -o cat
Future node updates
- You will only need to download the binary file in "$HOME/.shidod/cosmovisor/upgrades/upgrade_name/bin" and cosmovisor will automatically update your node when the update height is reached