How to update ZWavejs2MQTT (Docker Compose)

Since I published the How to set up ZWavejs2MQTT on a Raspberry Pi and integrate it with Home-Assistant guide a year ago I have gotten requests to make a tutorial on how to update to a newer version.
Today I had to do this myself, so I wrote up the working steps for anyone that is interested here.

Important: This update-procedure works for installations done by following my guide, If you have installed ZWavejs2MQTT in a different way, the procedure may be different.

Update the system

First SSH into your Pi (or server) and make sure your system is up-to-date by running:

sudo apt update
sudo apt upgrade
sudo reboot

Update ZWavejs2MQTT

Reconnect your SSH-session and verify the container name by running the command below (It should be zwavejs2mqtt):

sudo docker ps

Then run the command below (response should be the container name)

sudo docker stop zwavejs2mqtt

Download updated version by running:

sudo docker pull zwavejs/zwavejs2mqtt:latest

Move to the zwavejs2mqtt directory and start docker compose up:

cd zwavejs2mqtt
sudo docker-compose up -d

zwavejs2mqtt should now be recreated and start up with the newest version.

And if you are on the very old version, a visible new interface:

I hope this was to good use.