Using Cosmovisor
Cosmovisor (opens new window)is a process manager for running application binaries. Using Cosmovisor is not required but recommended for node operators that would like to automate the upgrade process.
Installation
Cosmovisor Versions
The following instructions use the latest version (v1.4
), which now supports installation with go install
.
For more information about each version, see the release notes:
Use go install to install cosmovisor directly without building from source
Check the version:
You should see the following (the errors following the version are expected if environment variables are not yet set, which will be set in the systemd file in the next section):
Building Cosmovisor from source
Clone the cosmos-sdk
repository (if not already cloned):
Change into the cosmos-sdk
repository:
Fetch the latest tags (if already cloned):
Check out the tagged release:
Install the cosmovisor binary:
Check the version:
You should see the following (the errors following the version are expected if environment variables are not yet set, which will be set in the systemd file in the next section):
Cosmovisor Service
Create a cosmovisor.service
systemd service file and make sure the environment variables are set to the desired values (the following example includes the default cosmovisor
configuration settings with the exception of DAEMON_NAME
and DAEMON_HOME
):
Unsafe Skip Backups
The following recommended settings include UNSAFE_SKIP_BACKUP=false
as a precaution but setting this to true
will make the upgrade go much faster. Ideally backups are created ahead of time in order to limit the time it takes to bring validators back online.
Move the file to the systemd directory:
Initialize Cosmovisor
Run the initialization command (if you built the qwoynd
binary from source, the path will be different, so make sure you provide the path to the qwoynd binary that will be used as the starting binary):
Starting Cosmovisor
Start cosmovisor
to make sure everything is configured correctly:
Check the status of the cosmovisor
service:
Enable cosmovisor
to start automatically when the machine reboots:
Configuration Updates
When you make changes to the configuration, be sure to stop and start the cosmovisor
service so that you are using the latest changes.
Check the status of the cosmovisor
service:
Last updated