NoMachine gives you fast, full-featured remote desktop access so your desktop can be “You there, everywhere.” This guide walks you through how to install NoMachine on Linux, enable secure access (including two‑factor authentication), connect with NoMachine Network, verify the server, and troubleshoot common problems. If you’re looking for a reliable NoMachine remote desktop setup, follow these steps in order: Prerequisites → Installation → Setup → Verification → Troubleshooting.
Prerequisites
- A Linux machine with administrative (sudo) access.
- Internet access to download the installer from the NoMachine website. Use the official download page: downloads.nomachine.com.
- Port 4000 (TCP) open on the host if you are connecting direct over the internet or LAN. If you use NoMachine Network (recommended for NAT/firewall traversal), a NoMachine account is required and you get a free trial for Network features.
- If you use firewall utilities such as **ufw** or **firewalld**, be prepared to open the port or allow the service.
Installation
This section shows typical installation commands for Debian/Ubuntu (.deb), Fedora/CentOS/RHEL (.rpm) and Raspberry Pi/ARM. Replace the example download URL with the current one from the NoMachine download page or use the **NO_MACHINE_DOWNLOAD_URL** variable shown below.
Download the package (common step)
NO_MACHINE_DOWNLOAD_URL="https://download.nomachine.com/latest/nomachine_amd64.deb" wget -O nomachine.pkg "$NO_MACHINE_DOWNLOAD_URL"
Explanation: wget downloads the file at the URL and saves it as nomachine.pkg. We set the shell variable NO_MACHINE_DOWNLOAD_URL so you can change the target easily. Use the correct package for your architecture (amd64, armhf, aarch64, etc.).
Debian / Ubuntu (.deb)
sudo dpkg -i nomachine.pkg sudo apt-get -f install -y
Explanation:
– sudo runs the following command with root privileges (required to install system packages).
– dpkg -i installs the downloaded Debian package file. If dependencies are missing, the command will report them.
– apt-get -f install -y fixes dependency problems by installing any required packages; the -f flag means “fix broken”, and -y auto-confirms prompts.
Fedora / CentOS / RHEL (.rpm)
NO_MACHINE_RPM_URL="https://download.nomachine.com/latest/nomachine_x86_64.rpm" wget -O nomachine.rpm "$NO_MACHINE_RPM_URL" sudo dnf install -y nomachine.rpm
Explanation:
– We download the RPM into nomachine.rpm.
– dnf install (or yum install on older systems) installs the RPM and resolves dependencies. The -y flag auto-answers yes to prompts.
Raspberry Pi / ARM
Pick the ARM package from the NoMachine downloads page. Installation uses the same approach as the Debian section (dpkg) if you run Raspberry Pi OS (Debian-based).
Setup and First-Time Configuration
Enable and start the NoMachine service
sudo systemctl enable --now nxserver sudo systemctl status nxserver --no-pager
Explanation:
– systemctl enable –now nxserver enables the nxserver service at boot and starts it immediately. This ensures NoMachine runs after reboot.
– systemctl status shows the current status. The –no-pager flag prevents paging so output appears directly in the terminal.
Open the firewall (UFW example)
sudo ufw allow 4000/tcp sudo ufw reload
Explanation:
– ufw allow 4000/tcp opens TCP port 4000 which NoMachine uses for incoming connections.
– ufw reload applies the updated firewall rules.
If you instead use firewalld:
sudo firewall-cmd --add-port=4000/tcp --permanent sudo firewall-cmd --reload
Explanation:
– firewall-cmd –add-port opens the specified port and –permanent makes the change persistent; –reload applies it now.
Creating a NoMachine account and using NoMachine Network
To avoid dealing with NAT and port forwarding, create a free NoMachine account and activate the free 7-day NoMachine Network trial from users.nomachine.com. Once your account is linked to the host, you can connect using NoMachine Network without exposing port 4000 to the internet.
Enable two-factor authentication (2FA)
NoMachine supports two-factor authentication for an extra layer of security. The easiest way for most users is via the NoMachine GUI:
- Open the NoMachine server interface on the host (NoMachine app → Server settings → Security).
- Enable 2FA and follow the prompts to link your mobile device.
Alternatively, you can configure 2FA via the server web console or the NoMachine user area. When enabled, authentication requires both your password and a one-time code sent to the registered device or generated by an authenticator app.
Verification
Check the server is listening
sudo ss -tlnp | grep 4000
Explanation:
– ss -tlnp lists listening TCP sockets (-t), numeric ports (-n), and processes (-p). Piping to grep 4000 filters for the NoMachine default port so you can confirm it's listening.
Check NoMachine logs
sudo ls -l /usr/NX/var/log sudo tail -n 100 /usr/NX/var/log/nxserver.log
Explanation:
– ls -l shows the log files in the NoMachine log directory.
– tail -n 100 prints the last 100 lines of nxserver.log to help spot startup errors or authentication failures.
Test a connection
From another machine, install the NoMachine client (download from downloads.nomachine.com) and either:
- Connect by IP: enter the host IP and port (default 4000), or
- Connect via NoMachine Network: sign in with your NoMachine account and pick the host listed under your devices.
Troubleshooting
1. Missing dependencies / broken package
sudo dpkg -i nomachine.pkg sudo apt-get -f install -y
Explanation: If the initial installation fails because dependencies are missing, rerunning apt-get -f install will fetch and install the required packages to fix the broken install.
2. Service won't start
sudo systemctl restart nxserver sudo journalctl -u nxserver --no-pager | tail -n 50
Explanation:
– systemctl restart restarts the NoMachine service.
– journalctl -u nxserver shows recent logs for the service; reviewing these lines helps diagnose configuration or permission errors.
3. Port blocked or unreachable
sudo ufw status verbose sudo ss -tlnp | grep 4000
Explanation:
– ufw status verbose shows UFW rules so you can confirm port 4000 is allowed.
– If the port is not listening, the second command verifies if the NoMachine service is actively listening on the expected port.
4. Authentication / 2FA problems
Check the NoMachine logs at /usr/NX/var/log for detailed errors, and ensure your NoMachine account is active and the device is registered for 2FA. If you cannot log in, temporarily disable 2FA from the server console (if accessible) to recover access, then reconfigure 2FA carefully.
5. Reinstalling NoMachine
sudo apt-get remove --purge nomachine -y sudo dpkg -i nomachine.pkg
Explanation:
– apt-get remove –purge removes the package and configuration files for a clean reinstall, after which you reinstall with dpkg -i.
Advanced tips and best practices
- Use NoMachine Network when hosts are behind NAT or when you want simpler setup without opening ports on your router.
- Keep NoMachine updated by periodically downloading the latest installer and applying it; the server preserves most settings across upgrades.
- On servers, prefer configuring a system user with limited privileges for remote sessions; avoid granting unnecessary root-level desktop sessions.
- Store logs and configs: the NoMachine runtime and logs typically live under /usr/NX. Back up relevant config files before major changes.
Conclusion
Getting NoMachine running on Linux gives you a fast, flexible NoMachine remote desktop experience. Whether you want to install NoMachine on Linux for personal use, enable secure access with 2FA, or use NoMachine Network to reach machines behind NAT, these steps cover the typical workflow: download, install, enable the service, open necessary ports (or use Network), verify, and troubleshoot. Once set up, NoMachine makes remote work, media playback, device passthrough and collaborative sessions straightforward and performant.
Need downloads or official docs? Visit the NoMachine download page: https://downloads.nomachine.com/ and the knowledge base: https://kb.nomachine.com.