How to add nodes to the Cloud Server when IPs of nodes are not static
Nodes are added to the Cloud Server using the node's IP address or hostname. If the IP address changes, connections to the node will no longer be possible and it will be necessary to "re-add" the node to the Cloud Server. The easiest way to add a node back to the Cloud Server if the IP address of a node is not static is using the "inverse node" functionality, a feature that was designed to resolve exactly this issue.
You can of course try to resolve the issue at the IP level, for example, by adding the node machine using its hostname (provided the hostname is preserved) even if the IP address has changed. Alternatively, you can use the mDNS service if the Cloud Server and nodes are in the same LAN.
The possible alternatives are:
Option a)
Use the 'inverse method' and add the node to the Cloud Server, provided the IP of Cloud Server hasn't changed. In this way, it doesn't matter if the node does not have a static IP address because it's he node that connects to the Cloud Server. Follow the instructions below to add the node to the Cloud Server
On the node, execute the 'nxserver --serveradd' command in a terminal or cmd console run as admin.
On Linux and macOS:
$ sudo /etc/NX/nxserver --serveradd IP_of_Cloud_Server --node-name NAME_of_NODE
On Windows:
> %ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --serveradd IP_of_Cloud_Server --node-name NAME_of_NODE
Option b)
Add the node with hostname instead of using its IP address. On the main Cloud Server execute the 'nxserver --nodeadd' command in a terminal or cmd console run as admin.
On Linux and macOS:
$ sudo /etc/NX/nxserver --nodeadd HOSTNAME_of_NODE --node-name NAME_of_NODE
On Windows:
> %ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --nodeadd HOSTNAME_of_NODE --node-name NAME_of_NODE
Option c)
If the Cloud Server and nodes are in the same LAN, ensure that network broadcast is enabled on each node. This enables the ability to listen on the mDNS service and let the Cloud Server find out when the IP of a node has changed.
i) On the main Cloud Server execute the 'nxserver --nodeadd' command in a terminal or cmd console run as admin.
On Linux and macOS:
$ sudo /etc/NX/nxserver --nodeadd HOSTNAME_of_NODE --node-name NAME_of_NODE
On Windows:
> %ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --nodeadd HOSTNAME_of_NODE --node-name NAME_of_NODE
ii) Then to use the mDNS service, edit the node.
On Linux and macOS:
$ sudo /etc/NX/nxserver --nodeedit <node-name or NoMachine UUID> --mdns-monitor yes
On Windows:
> %ALLUSERSPROFILE%\NoMachine\nxserver\nxserver.exe --nodeedit <node-name or NoMachine UUID> --mdns-monitor yes
