Upgrading your Client and Server
Introduction
These steps will help you upgrade to the latest version of Netmaker. Note that all instructions here assume you have installed using docker compose. You may need to modify these steps depending on your setup.
As of v0.20+, the server configuration is stable, meaning you should only need to:
For migrating from v0.17.1, you can use the migration steps listed below under Upgrade from v0.17.1 to Latest
For older versions of Netmaker (pre-v0.17.1), you must first manually upgrade to v0.17.1 before running the migration script.
Client Upgrades (General)
As of v0.20.5, the Netclient should automatically upgrade itself when it detects a change in the server version. For prior versions of the netclient (or if this fails), you will need to manually upgrade the client.
For Linux and Freebsd: Download the netclient for your target version, OS, and arch, from the fileserver. Then run ./netclient install from the downloaded executable in your terminal.
For Mac and Windows: Download and run the installer (.EXE for Windows, .PKG for Mac) for your target version, OS, and arch, from the fileserver. Then, run the installer.
Server Upgrades (v0.20.0+)
Unless otherwise noted, for newer versions of Netmaker:
For versions prior to v0.20.5, follow the Client Upgrades instructions to upgrade your netclients.
For v0.20.5 or later, check in the UI to confirm that all nodes have successfully upgraded to the new version.
test line
Upgrade to latest from v0.17.1
These steps assume you have already upgraded your server and netclients to v0.17.1.
General Notes
The server should be upgraded before any clients.
Relays will need to be recreated after the server and all clients are upgraded. Relays are now only available on Pro.
If upgrading to Pro, a new license key and tennet id must be obtained from https://app.netmaker.io
As each netclient is updated, a new nodes, nodes, and gateways (if applicable) will be visible in the netmaker UI.
Extclient config files may have to be regenerated after the upgrade.
Steps
Client-specific install commands
Linux/Freebsd/Darwin:
On each client download the latest version of netclient and run the
netclient installcommand.
Windows:
On each client download
https://fileserver.netmaker.io/latest/netclient-windows-amd64.exeOpen a PowerShell window as Administrator and run:
net stop netclientC:\Users\User\Downloads\netclient-windows-amd64.exe install
Verify extclient configs
Verify extclient config files are correct. Delete and regenerate if incorrect. For each peer in config file:
the peer’s public key should be the same as the peer’s public key in the Netmaker UI
the peer’s endpoint should be the same as the peer’s endpoint in the Netmaker UI
the peer’s allowed ips should be the same as the peer’s allowed ips in the Netmaker UI
Your Netmaker server and clients should all now be running the latest version of Netmaker.
Critical Notes for 0.13.X
If upgrading from 0.12 to 0.13, refer to this gist: https://gist.github.com/afeiszli/f53f34eb4c5654d4e16da2919540d0eb
Critical Notes for 0.10.0
At the time of this writing, an upgrade process has not been defined for 0.10.0. DO NOT follow this documentation to upgrade from a prior version to 0.10.0. An upgrade process will be defined shortly. For now, if you seek to upgrade to 0.10.0, you must clear your server entirely (docker compose down --volumes), uninstall your netclients, and re-install netmaker + netclients.
Upgrade the Server (prior to 0.10.0)
To upgrade the server, you only need to change the docker image versions:
SSH to the server:
Stop compose:
Edit docker-compose:
Change gravitl/netmaker:<version> and gravitl/netmaker-ui:<version> to the new version.
Start compose:
Upgrade the server after v0.16.1
There have been changes to the MQ after v0.16.1. You will need to make changes to the docker-compose.yml and get the new mosquitto.conf files. We recommend upgrading your server first before any clients.
Start by shutting down your server with:
You then need to get the updated mosquitto.conf file. You will also need to get the wait.sh file and make sure it is executable.
Then make the following changes to the docker-compose.yml file.
change image tags in netmaker and netmaker-ui service sections to
gravitl/netmaker:v.0.16.1.
In your netmaker service section:
In the volumes section, change
- shared_certs:/etc/netmakerto- mosquitto_data:/etc/netmakerIn the environment section, add
MQ_ADMIN_PASSWORD: "<CHOOSE_A_PASSWORD_YOU_WOULD_LIKE_TO_USE>"
In the mq service section:
Add
command: ["/mosquitto/config/wait.sh"]Add an environment section and add
NETMAKER_SERVER_HOST: "https://api.NETMAKER_BASE_DOMAIN"In the volumes, add
- /root/wait.sh:/mosquitto/config/wait.shYou need to make some changes to the labels. A few of them just need
mqttsto bemqtt. The labels should look like this:
Your MQ section should look like this after the changes.
You should be all set to:
Note: Your clients will show in warning until they are also upgraded. The upgrade for clients is the regular upgrade, then do a netclient pull.
If your docker logs mq show repeated "Waiting for netmaker server to startup" after longer than usual, check if your Traefik certs are generated correctly. You can try to resolve with:
Example expected MQ logs:
Upgrade the server to use 0.17.0 after Upgrading for 0.16.3
Version 0.17.0 uses Caddy instead of Traefik.
To set up Caddy you’ll need to configure the Caddyfile as follows.
Community Edition:
Professional Edition:
Once you have a Caddyfile you’ll need to run these two commands:
Where $NETMAKER_BASE_DOMAIN is the base domain you used for your Netmaker setup and $YOUR_EMAIL is your email address.
If users still want to keep using Traefik as the reverse-proxy instead of Caddy for v0.17.0 and above, refer to this docker-compose file: https://gist.github.com/alphadose/1602e5dcba500f75ab0b873d4441236b
Edit the above docker-compose file:
After that finally start the netmaker server:
Upgrade the Clients (prior to 0.10.0)
To upgrade the client, you must get the new client binary and place it in /etc/netclient. Depending on the new vs. old version, there may be minor incompatibilities (discussed below).
You may run into a “panic” based on missing fields and your version mismatch. In such cases, you can either:
Add the missing field to
/etc/netclient/config/netconfig-yournetworkand then runnetclient checkin
or
Leave and rejoin the network
Was this helpful?