Getting nxserver running

So I’m liking the features of nomachine nxserver preview 4 but it takes more effort than expected to get it running.

They currently don’t allow upgrades, so if you’ve installed previous version, uninstall first

sudo apt-get remove nxserver

then install

dpkg -i nxserver_4.0.181-7_i386.deb

First problem, their private key has the wrong permissions:

chmod 600 /usr/NX/share/keys/server.id_dsa.key
chmod 600 /usr/NX/home/nx/.ssh/*

chown nx:root /usr/NX/home/nx/.ssh/*

And I use AllowGroups in sshd_config, to which I added a group nx, then made the group

addgroup nx
addgroup nx nx

Then you have to add your login user

/usr/NX/bin/nxserver --useradd <username> --system
/usr/NX/bin/nxserver --useradd <username> --administrator

And you should replace the http ssl keys

cd /usr/NX/etc
openssl req -newkey rsa:2048 -days 3650 -x509 -nodes -out root.cer

The Common Name is the only important entry, should be the same as domain name

mv httpd.key httpd.key.orig
mv httpd.crt httpd.key.crt
openssl req -newkey rsa:1024 -nodes -out httpd.csr -keyout httpd.key
openssl x509 -req -days 3650 -in httpd.csr -signkey httpd.key -out httpd.crt

Then you should be able to start

/etc/init.d/nxserver restart

Also of note, the default login for Server Manager is nxmanager:nxmanager