Updating your node

How to update your node to the latest version

How to update your Raspberry Pi node

SSH into your Raspberry Pi using the following command:

ssh myst@ip-of-your-raspberry

The default password is mystberry.

Then to update your RPI, run:

sudo apt update; sudo apt install myst

How to update your Windows/MacOS node using the Exit Node Launcher

For every Exit Node Launcher user out there, you don’t need to upgrade your node manually. Launcher update logic checks for new node upgrades, and enables the software to upgrade automatically in a matter of minutes.

How to update your Linux node

To update your Linux node, run:

sudo apt update; sudo apt install myst

How to update your Docker node

In order to update your Docker node, run the following commands.

Note 1: Make sure that you have your data in the persistent storage like myst-data.

Note 2: You can backup your keys before trying to update node version FAQ.

Pull the latest node image.

docker pull mysteriumnetwork/myst

Delete the container that is already being used for running node:

docker rm -f myst

Follow the running a docker node guide to start a new container.

How to setup automatic node updates on Docker using Watchtower

Watchtower works both with Docker’s run command and Docker Compose to automatically update a Docker image. Both methods are functionally the same in creating a container running Watchtower, then pointing it towards a container you wish to keep automatically updated. In our case, we will be monitoring Myst container only.

By default Watchtower polls your repository for image updates every 86400 seconds, or 24 hours. This interval can be changed with the --interval flag or WATCHTOWER_POLL_INTERVAL environment variable. It accepts a value in seconds. In the below example, we have increased it to 259200 seconds, or 72 hours time interval:

docker run -d --name watchtower -e WATCHTOWER_POLL_INTERVAL=259200 -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower myst

How to setup automatic node updates on Ubuntu/Debian/RaspberryPi

Install the unattended-upgrades package

The unattended-upgrades package can be configured to perform unattended upgrades to install updated packages and security updates automatically. To install the unattended-upgrades package along with a package to identify the changes, enter the following in your terminal:


apt update
apt install unattended-upgrades apt-listchanges -y
 

By default the unattended-upgrades service is started automatically and takes effect.


root@etherunit-test:/etc/apt/apt.conf.d# systemctl status unattended-upgrades
● unattended-upgrades.service - Unattended Upgrades Shutdown
     Loaded: loaded (/lib/systemd/system/unattended-upgrades.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-08-13 19:06:25 UTC; 3 weeks 5 days ago
       Docs: man:unattended-upgrade(8)
   Main PID: 712 (unattended-upgr)
      Tasks: 2 (limit: 2275)
     Memory: 504.0K
     CGroup: /system.slice/unattended-upgrades.service
             └─712 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
 

If it doesn’t take effect you can run systemctl enable --now unattended-upgrades to make it take effect and start automatically on boot.

Configure the 50unattended-upgrades file

Navigate to /etc/apt/apt.conf.d/:


cd /etc/apt/apt.conf.d/
 

Edit 50unattended-upgrades file:


sudo nano 50unattended-upgrades
 

Enter the following:


APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::Verbose "1";
APT::Periodic::AutocleanInterval "7";

Unattended-Upgrade::Mail "root";

Unattended-Upgrade::Origins-Pattern {
  "o=LP-PPA-mysteriumnetwork-node";
};

Unattended-Upgrade::Package-Blacklist {
};

Unattended-Upgrade::Automatic-Reboot "false";
 

Unattended-Upgrade::Origins-Pattern represents the apt sources that need to be updated, we only update the repository containing Origin:LP-PPA-mysteriumnetwork-node.

Test the configuration

We can test if the rules are correct by running this command.

unattended-upgrades --dry-run --debug

If there are no errors, that means it’s fine, so we can configure Ubuntu/Debian to automatically update Mysterium node unattended, so we don’t have to worry about not being able to update the system in time.

View logs

To view the logs, use the command.

journalctl -u apt-daily.service | tail

root@etherunit-test:/etc/apt/apt.conf.d# journalctl -u apt-daily.service | tail
Sep 07 14:53:29 etherunit-test systemd[1]: Finished Daily apt download activities.
Sep 08 01:33:56 etherunit-test systemd[1]: Starting Daily apt download activities...
Sep 08 01:34:03 etherunit-test systemd[1]: apt-daily.service: Succeeded.
Sep 08 01:34:03 etherunit-test systemd[1]: Finished Daily apt download activities.
Sep 08 10:06:28 etherunit-test systemd[1]: Starting Daily apt download activities...
Sep 08 10:06:29 etherunit-test systemd[1]: apt-daily.service: Succeeded.
Sep 08 10:06:29 etherunit-test systemd[1]: Finished Daily apt download activities.
Sep 09 01:50:20 etherunit-test systemd[1]: Starting Daily apt download activities...
Sep 09 01:50:25 etherunit-test systemd[1]: apt-daily.service: Succeeded.
Sep 09 01:50:25 etherunit-test systemd[1]: Finished Daily apt download activities.
 

Allowing automatic node updates on RaspberryPi

Edit the 20auto-upgrades configuration file:

sudo nano /etc/apt/apt.conf.d/20auto-upgrades

and your configuration file should look like this:


  APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";
 

Edit the 50unattended-upgrades configuration:

sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

and your configuration file should look like this:


  Unattended-Upgrade::Origins-Pattern {
        "origin=Raspbian,codename=${distro_codename},label=Raspbian";
        "origin=Raspbian,codename=${distro_codename},label=Raspbian-Security";
        "o=LP-PPA-mysteriumnetwork-node";
};

Unattended-Upgrade::AutoFixInterruptedDpkg "true";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
// Automatically reboot *WITHOUT CONFIRMATION* if
//  the file /var/run/reboot-required is found after the upgrade
Unattended-Upgrade::Automatic-Reboot "true";
// Automatically reboot even if there are users currently logged in
// when Unattended-Upgrade::Automatic-Reboot is set to true
Unattended-Upgrade::Automatic-Reboot-WithUsers "true";