cosmovisor is a small process manager for Cosmos SDK application binaries that monitors the governance module for incoming chain upgrade proposals. If it sees a proposal that gets approved, cosmovisor can automatically download the new binary, stop the current binary, switch from the old binary to the new one, and finally restart the node with the new binary.
The directory structure after correctly configuring cosmovisor should be like this
tree~/.fxcore/cosmovisor
cosmovisor
├── current -> /root/.fxcore/cosmovisor/genesis
├── genesis
│ ├── bin
│ │ └── fxcored
│ └── upgrade-info.json
└── upgrades
└── fxv3
└── bin
└── fxcored
6 directories, 3 files
3. Start your node
To keep the process always running. If you're on linux, you can do this by creating a service.
sudotee/etc/systemd/system/fxcorevisor.service>/dev/null<<EOF[Unit]Description=Fxcore DaemonAfter=network-online.target[Service]User=rootExecStart=/root/go/bin/cosmovisor run start --home=/root/.fxcoreRestart=alwaysRestartSec=3LimitNOFILE=infinityEnvironment="DAEMON_HOME=/root/.fxcore"Environment="DAEMON_NAME=fxcored"Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"Environment="DAEMON_RESTART_AFTER_UPGRADE=true"Environment="UNSAFE_SKIP_BACKUP=true"[Install]WantedBy=multi-user.targetEOF
⚠️Before this, please make sure you have stopped fxcored and deleted the old fxcored.service file, if not, please execute the following command: