Skip to content

Moving Your Sonaric Node

This guide will walk you through the process of moving your Sonaric node to a new server. This can be useful if you want to upgrade your server, change hosting providers, or for any other reason you need to move your node. Moving your node involves transferring your node's identity to the new server and disabling the old node to prevent conflicts.

There are four main steps to moving your Sonaric node:

  1. Backup your node's identity: This will allow you to restore your node's identity on the new server.
  2. Install Sonaric on the new server: This will install the Sonaric software on the new server.
  3. Transfer and restore your node's identity: This will restore your node's identity on the new server.
  4. Disable the old node: This will prevent the old node from interfering. Very important, dont skip this step!

See detailed instructions below.

Prepare Both Servers

In order to follow this guide you will need access to both the old server where your Sonaric node is currently running and the new server where you want to move your Sonaric node. You can use SSH or PuTTY to log in to your servers as usual.

  1. Log in to the old server where your Sonaric node is currently running.
  2. Log in to the new server where you want to move your Sonaric node. This can be your local machine.

Once you have both servers ready, confirm the node ID and name of the node on the old server by running the following command:

bash
sonaric node-info

It should look like this:

bash
 Node information loaded:
 ├─🧊 ID             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX9b5VrsEB
 ├─📥 Name           myoldnode

Save the node ID and name of the node on the old server as you will need them later.

Backup Your Node's Identity

To backup your node identity you need to save it to a file. You can do this by running the following command on the old server:

bash
sonaric identity-export -o identity.json

You will be asked to choose a passphrase to encrypt the identity file. You will need this passphrase to restore your node's identity on the new server. Make sure you remember it well or save it in a secure place.

This will save your node's identity to a file named identity.json on the old server. You can use a different name if you prefer.

Install Sonaric on the New Server

If Sonaric is not installed on your new server yet you can install Sonaric on the new server by following the installation guide.

Go ahead and install Sonaric on the new server before you continue with the next steps of this guide.

Confirm that Sonaric is installed on the new server by running the following command:

bash
sonaric node-info
bash
 Node information loaded:
 ├─🧊 ID             YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
 ├─📥 Name           rocking-blue-boat

The node should have a different ID and name than the node on the old server.

Transfer and Restore Your Node's Identity

Now that you have installed Sonaric on the new server, you can transfer and restore your node's identity. The easiest way to do this is by using your clipboard to copy the identity file from the old server to the new server.

Run this command on the old server to see the contents of the identity.json file:

bash
cat identity.json && echo -e "\n"

It should look like this:

bash
xxxxx@yyyy:~$ cat delme.json && echo -e "\n"
{"PublicID":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXSmGqarkAAbX_o7XLu0hrDZQ8KJYLm_W3xLgsg3ah-I",
"PrivateKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN6CXvuXAEq6nzKnWtm2krdkYsfqtrqO9gis5hukN8cmdBK1Velf-cHVMl7-vO9ZZKW9lRNJImzIDqBYxFWYQwdFudlYiCqk",
"Key":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX67U2m-xkRGV4qAvdE-P1JQqkhxl7KSS",
"KeyPassword":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXCxbTsH5JTyaSwjBbxnvGQJkR7HL7AzA223LdCNpmfnMRytj5xBDVScNf1OAijKmPdT2lQvsNutjWFMQRO2HYTyrJUjIgpzqXetCPIOa4tjRjq_QHp9BrNeGNLhxNHMZtqbhL0iPyjg"}

Select the output (the non-blurred part) in your old server terminal and copy it to your clipboard by pressing Ctrl+Shift+C (or Cmd+C). Keep it in your clipboard.

Now, focus on the new server where you installed Sonaric and run the following command to get the identity.json file:

bash
cat > identity.json

Paste the contents of your clipboard into the terminal on the new server by pressing Ctrl+Shift+V (or Cmd+V) press Enter and Ctrl+D to save the file.

Now, you can restore your node's identity on the new server by running the following command:

bash
sonaric identity-import -i identity.json

You will be asked to enter the passphrase you chose when you exported the identity file on the old server. Enter the passphrase and press Enter.

Your node's identity should now be restored on the new server. To confirm, run the following command:

bash
sonaric node-info

It should look like this:

bash
 Node information loaded:
 ├─🧊 ID             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX9b5VrsEB
 ├─📥 Name           rocking-blue-boat

The node ID should be the same as the node on the old server, the name is different. To change the name of the node on the new server to match the old one, run the following command:

bash
sonaric node-update-name --new myoldnode

Now the node on the new server should have the same name and ID as the node on the old server. You can confirm this by running the sonaric node-info command on both servers.

Disable the Old Node

It is very important to disable the old node to prevent both the new and old nodes from running at the same time under the same identity.

WARNING

Don't skip this step! Running two nodes with the same identity can get you disqualified from the network.

To stop the old node, run the following commands on the old server:

bash
sudo systemctl stop sonaricd
sudo apt remove sonaric sonaricd

Or just turn off the server if you don't plan to use it anymore.

Conclusion

You have successfully moved your Sonaric node to a new server. Your node should now be running on the new server with the same identity as the node on the old server.