How to install a customer's license for NoMachine 8
When you purchase a subscription for any of the NoMachine products, the license file is active as soon as it is generated. You will receive the customer's license file server.lic for production environments by email in a key.tar.gz archive.
IMPORTANT:
From version 8 onwards, there is only one single license file, server.lic, for each server side product, including for Enterprise Terminal Server Node (ETSN). When replacing a license v7 with the new v8 license (server.lic), the old v7 node.lic file is simply ignored by server software v8 and no further actions are required. In case of an ETSN installation, the license file v7 node.lic is compatible but must be renamed into server.lic.
If you purchased multiple subscriptions, e.g. the Enterprise Desktop pack, the key.tar.gz archive contain the server.lic files numbered progressively, e.g. server-01.lic, server-02.lic, server-03.lic and so on.
From your Customer Area you can also download your license file and the corresponding NoMachine software package at any time. The procedure below explains how to upload your own license file in order to activate the software. The same procedure is applied when replacing an expired license file.
Instructions
First upload the key.tar.gz archive containing your license file to the host machine, then extract the archive.
Finally install the license, you must have administrative privileges for that. There are three alternative ways to install the license:
FIRST WAY upload the license from the User Interface (UI)or
SECOND WAY by issuing the command from command line.
Both methods take care of moving the license file in the proper place and set the requested ownership and permissions.
THIRD WAY execute all these operations manually.
FIRST WAY install the license from the User Interface
1) Access the Settings -> Server panel in the NoMachine UI
2) From the menu on the left, select 'Updates'. In case, scroll down the panel till section 'License information'
3) Click on the link 'Subscription' and scroll down to the end of the section.
4) Click on the 'Replace button'. Browse directories till the new server.lic file you need to install, choose it and confirm.
SECOND WAY install the license from command line
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
In case of a Cloud Server, you can install the license from the Cloud Server host to the node by means of command: sudo /etc/NX/nxserver --subscriptionset path_to_server.lic --target node_uuid
3) Verify that the license has been correctly installed:
sudo /etc/NX/nxserver --version
sudo /etc/NX/nxserver --subscriptioninfo
On Windows
1) Open a CMD console as administrator and execute the following commands:
%ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --subscriptionset path_to_server.lic
In case of a Cloud Server, you can install the license from the Cloud Server host to the node by means of command: %ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --subscriptionset path_to_server.lic --target node_uuid
2) Verify that the license has been correctly installed:
%ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --version
%ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --subscriptioninfo
How to install server.lic on remote nodes from a single point of access
Upload the license files on 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.
THIRD WAY install the license manually
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 --subscriptioninfo
8) Finally, start the server:
sudo /etc/NX/nxserver --start
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 --subscriptioninfo
8) Finally, start the server:
sudo /etc/NX/nxserver --start
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 --subscriptioninfo
TROUBLESHOOTING
1) License compatibility
Due to changes in license model of v8 which now uses only one file, it's advisable to adopt a license v8 everywhere. Compatibility with licenses v7 is preserved, when the product name is not changed.
2) Error: "No subscription information found" from command line or
"Cannot activate NoMachine Server, please ensure that server.lic is a valid subscription and is not corrupted" via UI
On Linux, it can be that server.lic has been accidentally converted to DOS format (e.g. because it was opened and copied from a local editor). Server.lic is an 'ASCII' text files in UNIX format, to convert it again to the proper format run in a terminal: dos2unix /usr/NX/etc/server.lic
If you did the manual procedure, ensure that server.lic is in the proper place and has proper permissions and ownership.
If hints above didn't help for your case, you may contact our Support Team for a verification of the license file.
3) License already expired. Use the 'third way', makes all the operation manually if the license of your server is already expired.
