How to install NoMachine on your Webdock server

Last updated: September 19th 2023

Introduction

NoMachine is a proprietary software application for remote access, desktop sharing, virtual desktop, and file transfer between computers. It is developed by the Luxembourg-based company NoMachine. It offers better performance and additional features compared to other remote desktop tools.

Prerequisites

  • A running Webdock Ubuntu cloud instance.

Installing NoMachine

The NoMachine server has to be downloaded from the official website as NoMachine cannot be installed from Ubuntu’s APT repo.

To download the NoMachine deb file first SSH into your server and fetch the file.

$ wget https://download.nomachine.com/download/8.8/Linux/nomachine_8.8.1_1_amd64.deb

Note: At the time of writing latest version of NoMachine is 8.8. Please visit the official website for the latest version.

To install the downloaded deb file run the following command:

$ sudo dpkg --install nomachine*.deb

Wait for a few seconds for the installation to complete.

Configuring NoMachine

Depending upon the desktop environment you installed (from one of our guides), you need to change the Default Desktop Command of NoMachine.

Open the node.cfg file found in /usr/NX/etc/node.cfg and change value of DefaultDesktopCommand to an appropriate value based on the desktop environment you installed.

$ sudo nano /usr/NX/etc/node.cfg

For Gnome:

DefaultDesktopCommand "/usr/bin/gnome-session"

For Ubuntu Mate:

DefaultDesktopCommand "/usr/bin/mate-session"

For Cinnamon:

DefaultDesktopCommand "/usr/bin/cinnamon"

For KDE Plasma:

DefaultDesktopCommand "/usr/bin/startplasma-x11"

For LXDE:

DefaultDesktopCommand "/usr/bin/startlxde"

For Xfce4:

DefaultDesktopCommand "/usr/bin/startxfce4"

Once you have made the changes restart NoMachine using:

$ sudo /etc/NX/nxserver --restart

Configure firewall

By default, on our LAMP/LEMP stacks, UFW is enabled by default. To access your remote desktop you need to add allow rules to your firewall. However, on our clean OS installs, UFW is disabled by default. Please run the below command if you have the firewall activated on your server. Execute the following command to allow communication over port 4000.

$ sudo ufw allow 4000

Installing NoMachine on your PC

You can now continue to our next article which shows how you connect to your Remote Desktop with NoMachine.

Conclusion

In this article, we showed how to install and configure NoMachine on your Webdock server to access your remote desktop.

 

Related articles