Move validator to a different machine
This document offers guidance for validators looking to move thier node instance to another one, for example in case of changing VPS provider or something like this.
The main tool required for this is cheqd's interactive installer.
Preparations
Before completing the move, ensure the following checks are completed:
1. Copy config
directory and data/priv_validator_state.json
to safe place
config
directory and data/priv_validator_state.json
to safe placeCheck that your config
directory and data/priv_validator_state.json
are copied to a safe place where they will cannot affected by the migration
2. Stop the service on your current node
If you are using cosmosvisor, use systemctl stop cheqd-cosmovisor
For all other cases, use systemctl stop cheqd-noded
.
3. Confirm that your previous node / service was stopped
This step is of the utmost important
If your node is not stopped correctly and two nodes are running with the same private keys, this will lead to a double signing infraction which results in your node being permemently jailed (tombstoned) resulting in a 5% slack of staked tokens.
You will also be required to complete a fresh setup of your node.
Installation
Only after you have completed the preparation steps to shut down the previous node, the installation should begin.
In general, the installer allows you to install the binary and download/extract the latest snapshot from https://snapshots.cheqd.net/.
Once this has been completed, you will be able to move your existing keys back and settings.
Installation with the latest snapshot
The answers for installer quiestion could be:
1. Select Version
Here you can pick up the version what you want.
2. Select Home directory
Set path for cheqd user's home directory [default: /home/cheqd]:
.
This is essentialy a question about where the home directory, cheqdnode
, is located or will be.
It is up to operator where they want to store data
, config
and log
directories.
3. Setup node
Do you want to setup a new cheqd-node? (yes/no) [default: yes]:
Here the expected answer is No
.
The main idea is that our old config
directory will be used and data
will be restored from the snapshot.
We don't need to setup the new one.
4. Select Network
Select cheqd network to join (testnet/mainnet) [default: mainnet]:
For now, we have 2 networks, testnet
and mainnet
.
Type whichever chain you want to use or just keep the default by clicking Enter
.
5. Specify Cosmovisor option
Install cheqd-noded using Cosmovisor? (yes/no) [default: yes]:
.
This is also up to the operator.
6. Specify if you are using a snapshot
CAUTION: Downloading a snapshot replaces your existing copy of chain data. Usually safe to use this option when doing a fresh installation. Do you want to download a snapshot of the existing chain to speed up node synchronisation? (yes/no) [
default: yes
].
On this question we recommend to answer Yes
, cause it will help you to catchup with other nodes in the network. That is the main feature from this installer.
Example
Post-install steps
1. Copy your settings
If the installation process was successful, the next step is to get back the configurations from preparation steps:
Copy
config
directory to theCHEQD_HOME_DIRECTORY/.cheqdnode/
Copy
data/priv_validator_state.json
to theCHEQD_HOME_DIRECTORY/.cheqdnode/data
Make sure that permissions are
cheqd:cheqd
forCHEQD_HOME_DIRECTORY/.cheqdnode
directory. For setting it the next command can help$ sudo chown -R cheqd:cheqd CHEQD_HOME_DIRECTORY/.cheqdnode
Where CHEQD_HOME_DIRECTORY
is the home directory for cheqd
user. By default it's /home/cheqd
or what you answered during the installation for the second question.
2. Setup external address
You need to specify here new external address by calling the next command under the cheqd
user:
3. Check that service works
The latest thing in this doc is to run the service and check that all works fine.
where <service-name>
is a name of service depending was Install Cosmovisor
selected or not.
cheqd-cosmovisor
if Cosmovisor was installed.cheqd-noded
in case of keepingcheqd-noded
as was with debian package approach.
For checking that service works, please run the next command:
where <service-name>
has the same meaning as above.
The status should be Active(running)
Last updated