How do NoMachine server licenses work in v9
Starting from version 9, NoMachine offers two ways to validate subscription licenses for NoMachine servers:
1) Online license validation. This license does not include an expiry date and is installed once-only. Your NoMachine server will require outbound Internet access to connect to our licensing server to verify the license.
2) On-premise license validation. This license is suitable for air-gapped networks and includes an expiry date. The license must be replaced each year upon its expiry. If you require this type of license, please contact the sales team.
Table of Contents
1. Online license validation
1.1. How to migrate the license
1.2. How online check works
2. On-premises license validation
2.1. How to migrate the license
3. Installing the license
3.1. Upload the license via the User Interface
3.2. Issue the command via CLI in a terminal
3.2.1. Installing server.lic on remote nodes from a single point of access
3.3. Manual installation using system commands
Starting from version 9, by default subscriptions are of the "online" type. This applies to new subscriptions purchased from the store and those acquired from a NoMachine sales office or partner. When purchasing a Server Subscription, the customer receives a subscription file, "server.lic". The subscription period starts with the purchase. The license is installed in the NoMachine software (version 9 or later) to be able to start using the software. (See the procedure below 'How to install a license file', this has to be done only once).
The NoMachine server will check the license validity against NoMachine's license servers. Ensure that outbound access on port 443 (HTTPS) is allowed on the host where each NoMachine server is installed. The license file constitutes the link between the user and the subscription payment. The license is valid for one machine and cannot be installed on multiple hosts. Its expiration date is automatically extended when the license is renewed.
Online licenses are available only for v9 installations or later. Customers which wish to use NoMachine software in air-gapped environments should activate on-premise/offline licenses.
1.1 How to migrate the license
This is the procedure to be followed when the NoMachine server is reinstalled on the same machine or the same online license has to be migrated to a different machine.
The online license to be re-used was already linked to the UUID of the NoMachine server the first time it was used on, let's say, machineA.
Reinstalling the NoMachine server or installing it on a new machine, in the case of the decomissioning of the previous machine (machineA), means that the server gets a new UUID. The online license must be removed first, and then validated for the new server's UUID.
To remove the online license from machineA, open there the NoMachine User Interface -> Settings -> Server -> Updates panel.
Note that also uninstalling the NoMachine server will remove the association between server.lic and the server's UUID. It will then be possible to re-use the license file on a different machine.
This association can be removed also by hand from the command line (nxserver --subscriptionremove).
As a rescue procedure, any of the procedures above didn't help, please send an e-mail or submit a support ticket to NoMachine Support. They will change the server UUID associated to that license, so that you can re-use your license with the new server or on the new machine.
How online license check works
For further information on how NoMachine's online licensing check works, please see: https://kb.nomachine.com/AR11U01209
2. On-premises license validation
On-premise or off-line licenses, suitable for air-gapped networks, include the expiry date and must be updated at the time of each expiry by the customer. The subscription period starts with the purchase. If you purchased multiple subscriptions, e.g. the Enterprise Desktop pack, the key.tar.gz archive contains the server.lic files numbered progressively, e.g. server-01.lic, server-02.lic, server-03.lic and so on.
See the procedure below 'Installing the license' in point 3. This has to be done the first time the license is installed AND each time the Server Subscription is renewed. At each renewal, the new license file received will replace the one about to expire.
2.1 How to migrate the on-prem license
When the NoMachine server has to be migrated from machineA to machineB with the same Operating System, install the server on the new host machineB and then install the on-premise license file. Uninstall NoMachine from machineA and remove the license file. If the Operating System of machineB is different (e.g. machineA is macOS and machineB is Windows), contact the Sales Team for possible options to convert the license. If machineA and machineB are both running Linux, even if different distributions (e.g. Ubuntu and CentOS), it's not necessary to convert the license.
First upload the key.tar.gz archive containing your license file to the host machine, then extract the archive. To install the license, you must have administrative privileges. There are three alternative ways to install the license. You can choose to i) upload the license from the User Interface (UI); ii) issue the command via CLI in a terminal, or iii) execute all these operations manually by using system commands. Methods (i) and (ii) take care of moving the license file to the proper place and setting the requested ownership and permissions.
3.1 Upload the license via the User Interface
1) Access the Settings -> Server panel in the NoMachine UI
2) From the menu on the left, select 'Updates'. Scroll down the panel until section 'License information'
3) Click on the link 'Server subscription' and scroll down to the end of the section.
4) Click on the 'Update subscription' button. Browse the directories to the location of the new server.lic file you need to install, select it and confirm.
3.2 Issue the command via CLI in a terminal
On Linux and macOS
1) Open a terminal on the remote host and move to the directory where you have uploaded and extracted the key.tar.gz archive. Run commands as privileged user.
2) Install server.lic:
sudo /etc/NX/nxserver --subscriptionset path_to_server.lic
3) Verify that the license has been correctly installed:
sudo /etc/NX/nxserver --version
sudo /etc/NX/nxserver --subscription
On Windows
1) Open a CMD console as administrator and execute the following commands:
%ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --subscriptionset path_to_server.lic
2) Verify that the license has been correctly installed:
%ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --version
%ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --subscription
3.2.1 Installing server.lic on remote nodes from a single point of access
This command is used on the Cloud Server to install license files on the Cloud Server nodes. Upload the license files to a NoMachine Cloud Server.
Execute the 'nxserver --subscriptionset' command by specifying the node where the license has to be installed:
nxserver --subscriptionset path_to_server.lic --target NODE
NODE can be in the node:port format or the uuid of the node. Command above can be automated in a script that reiterates all the license files to install one by one on the nodes. The nodes must be already added to the main server.
Manual installation using system commands
Important: this is valid only for licenses on-premises.
On Linux
1) stop the server from accepting new connections during the operations necessary to install the license file:
sudo /etc/NX/nxserver --stop
2) Create a backup of the original license file:
sudo mv /usr/NX/etc/server.lic /usr/NX/etc/server.lic-ori
3) Extract the key.tar.gz archive you received by e-mail:
sudo tar xvzf key.tar.gz
4) Copy the new license file, server.lic, in the NoMachine 'etc' directory:
sudo cp server.lic /usr/NX/etc
5) Move to the NoMachine 'etc' directory, by default it's /usr/NX/etc:
cd /usr/NX/etc
6) Set proper permissions and ownership:
sudo chmod 0400 server.lic
sudo chown nx:root server.lic
7) Verify if license is correctly installed:
sudo /etc/NX/nxserver --version
sudo /etc/NX/nxserver --subscription
8) Finally, start the server:
sudo /etc/NX/nxserver --start
On macOS
1) Stop the server to stop accepting new connections:
sudo /etc/NX/nxserver --stop
2) Create a backup of the original license file:
sudo mv /Applications/NoMachine.app/Contents/Frameworks/etc/server.lic /Applications/NoMachine.app/Contents/Frameworks/etc/server.lic-ori
3) Extract the key.tar.gz archive:
sudo tar xvzf key.tar.gz
4) Copy the license file server.lic in the NoMachine 'etc' directory:
sudo cp server.lic /Applications/NoMachine.app/Contents/Frameworks/etc
5) Then move to the NoMachine 'etc' directory:
cd /Applications/NoMachine.app/Contents/Frameworks/etc
6) Set proper permissions and ownership:
sudo chmod 0400 server.lic
sudo chown nx:wheel server.lic
7) Verify if the license is correctly installed:
sudo /etc/NX/nxserver --version
sudo /etc/NX/nxserver --subscription
8)Finally, start the server:
sudo /etc/NX/nxserver --start
On Windows
All commands have to be executed from a CMD console run as administrator.
1) Stop the server to stop accepting new connections:
cd %ProgramFiles(x86)%\NoMachine\bin
nxserver --stop
2) Then move to the NoMachine etc directory and create a backup of the original license file:
cd %ProgramFiles(x86)%\NoMachine\etc
copy server.lic server.lic-ori
3) Extract the key.tar.gz archive and copy the server license file to the NoMachine etc directory making sure it is renamed to server.lic. For example, browse to the installation folder of NoMachine: Computer -> C: > Program Files -> NoMachine -> etc. Now copy the server.lic file to this folder.
4) Then in the Command Prompt, move to the NoMachine etc directory. Set proper ownership and permissions:
>cacls server.lic /G nx:F Administrators:F
IMPORTANT
If you are running a localized version of Windows, you must check whether the name of the Administrators group is localized in your language and run the command above with the proper translation.
5) Finally move to the NoMachine bin directory and start the server:
nxserver --start
6) Verify if the license is correctly installed:
nxserver --version
nxserver --subscription
