Knowledge Base
Searching in : Article
ID: AR09N00901
Applies to: NoMachine Server
Added on: 2016-09-20
Last Update: 2016-09-21

How to replace license files on Linux without terminating sessions

Replacing license files, node.lic and server.lic on Linux doesn't require to terminate current sessions. 

This is the suggested procedure to replace license files:

1) Temporary disable user's access to NoMachine server by stopping it. Run from a terminal on the server host:

/usr/NX/bin/nxserver --stop

2) Create a backup of the original licenses: /usr/NX/etc/server.lic and /usr/NX/etc/node.lic

3) Copy the new licenses in place to /usr/NX/etc

4) Move to the /usr/NX/etc directory and  set correct permissions and ownership:

chown nx:root server.lic
chown nx:root node.lic
chmod 0400 server.lic
chmod 0400 server.lic

5) Start NoMachine server to accept new connections:

/usr/NX/bin/nxserver --start

 

In case of multi-node environments:

I) stop access to the node where it's necessary to replace the license file(s) by running in a terminal on the main server host:

/usr/NX/bin/nxserver --nodestop <node:port>

where <node:port> is the name of the remote node as it appears in the output of the 'nxserver --nodelist' command.

or stop access to the whole NoMachine subsystem by stopping the server as explained at point 1) above.

Then, in a terminal on the remote node:

II) Create a backup of the original license(s) placed in /usr/NX/etc/. Note that, depending on the product installed on the node, you may have: server.lic and node.lic or only node.lic. This is the case of the NoMachine Terminal Server Node.

III) Copy the new license(s) in place to /usr/NX/etc.

IV) Move to the /usr/NX/etc directory and  set correct permissions and ownership:

chown nx:root node.lic
chmod 0400 node.lic

and if it applies:

chown nx:root server.lic
chmod 0400 server.lic
 

IV) Restore access to this node by running in a terminal on the main server:

/usr/NX/bin/nxserver --nodestart <node:port>

or to the whole NoMachine subsystem if you have previously disabled it:

/usr/NX/bin/nxserver --start