Search the docs
Menu
Updated Edit on GitHub

Servers without a desktop

Copy as Markdown

NeoDesk Headless is NeoDesk for servers that have no desktop: Linux servers and Windows Server, Server Core included. It runs as a service, has no window, and takes two kinds of session from the web console: a terminal and the files. There is no screen to share, so the console shows Terminal and Files where other devices show Connect.

Nobody sits at a server to click Allow. A session gets in because the server confirms the account that opened it: the account needs Open a shell on devices, it must see the device, and the organization's policy must allow it. No device password is typed, unless the policy asks for one.

Both kinds of session run with the rights of one account on the server, the shell user. A terminal is that account's login shell. File transfer runs in a helper process that starts as that account, with its groups, so the files show exactly what the account may read and write. The shell user is never root (SYSTEM on Windows) unless you set it to that yourself.

Install it

Download the package for your system from the NeoDesk release page and install it. The service starts at once and at every boot.

NeoDesk Headless has no release yet: the releases of NeoDesk Desktop and NeoDesk Companion don't carry its packages. Until the first one is out, the console's side described here works, but there is nothing to install on the server.

# Debian, Ubuntu
sudo apt install ./neodesk-headless_*_amd64.deb

# RHEL, Fedora, Rocky Linux, AlmaLinux
sudo dnf install ./neodesk-headless-*.x86_64.rpm

# Any other Linux with systemd: the portable package
tar xzf neodesk-headless-*-linux-x86_64.tar.gz
sudo ./neodesk-headless-*/install.sh

The packages for ARM servers end in arm64.deb, aarch64.rpm and linux-aarch64.tar.gz. NeoDesk Headless and the NeoDesk Desktop package can't be installed on the same computer.

Windows Server

NeoDesk Headless runs on Windows Server 2019 and later, Server Core included. Download neodesk-headless-<version>-windows-x86_64.zip from the release page, open an elevated PowerShell in the folder of the download and run:

Expand-Archive .\neodesk-headless-*-windows-x86_64.zip .\neodesk-headless -Force
powershell -ExecutionPolicy Bypass -File (Get-Item .\neodesk-headless\*\install.ps1).FullName

The script copies neodesk.exe to C:\Program Files\NeoDesk Headless and sets it up as the NeoDesk Headless service, which runs as SYSTEM and starts at every boot. Run it again from a newer zip to update: the ID and the join stay. install.ps1 -Uninstall removes the service and the program. NeoDesk Desktop and NeoDesk Headless can't be installed on the same computer: the script stops when NeoDesk Desktop is there.

The terminal is PowerShell 7 when it is installed, else Windows PowerShell. It runs as the shell user, with that account's profile, also when nobody is signed in on the server. Windows starts it without the account's password, so the shell can't open network shares that ask for the account's credentials.

Join it to your server

Devices, Add computers, Server shows the commands for this server. You need Approve join requests to see the tab.

The browser and the server both have to reach NeoDesk over HTTPS: the console's own address, and the Public API URL under Settings, General, Public client endpoints, start with https://. The server confirms a session only over HTTPS, so on plain HTTP the terminal says "Can't open a shell here: the server is not reached over HTTPS." See Reverse proxy and TLS.

Click Make an invite link and run the command it shows on the server. It looks like this, with your console's address for <server-address> and the link's code for <invite-code>:

sudo neodesk --join "https://<server-address>/join/<invite-code>" --shell-user ops

On Windows Server the tab shows the same command for the installed neodesk.exe, to run in an elevated PowerShell, again with your console's address for <server-address> and the link's code for <invite-code>:

& "$env:ProgramFiles\NeoDesk Headless\neodesk.exe" --join https://<server-address>/join/<invite-code> --shell-user ops
Flag What it does
--shell-user <account> The account terminal and file sessions run as. Left out: the account that ran sudo, on Windows the account of the elevated PowerShell. Without either, the shell stays closed until you set one in the console. On Windows a local account (admin) or a domain account (CORP\admin).
--allow-root-shell Lets the console set the shell user to root later, on Windows to SYSTEM. --shell-user root allows it too, on Windows --shell-user system.

The link works once, for 24 hours.

Many servers: a rollout token

Make a token for many computers under Devices, Add computers, Device tokens, then run on each server. The Server tab shows the command with your server's address for <server-address> and its public key for <key>; put the token in for <token>:

sudo neodesk --enroll --server <server-address>:21116 --key <key> \
  --api https://<server-address> --token <token> --shell-user ops

--group <folder> puts the server into a folder; the token's own folder wins. The command writes the server's settings and the token into /etc/neodesk/neodesk-install.txt, which only root can read, and restarts the service, which registers with the token. The token leaves the file once the server answered.

On Windows Server the same flags go to neodesk.exe, in an elevated PowerShell, with the same values for <server-address>, <key> and <token>:

& "$env:ProgramFiles\NeoDesk Headless\neodesk.exe" --enroll --server <server-address>:21116 --key '<key>' --api https://<server-address> --token '<token>' --shell-user ops

The file is C:\ProgramData\NeoDesk Headless\neodesk-install.txt, which only administrators and SYSTEM can read.

Open a terminal and the files

Open the device in Devices and click Terminal, or Files. The row menu and the device panel's Actions tab have both. The terminal opens in the console's viewer, as a tab next to screen sessions, and shows which account the shell runs as before it connects. It keeps 5000 lines of scrollback, resizes with the window, copies with the mouse and pastes with the keyboard. Reconnect opens it again after the shell ended or the connection broke.

Files in the terminal's tab opens the file sheet. It works without a screen session, with the shell user's rights.

When the organization's policy asks for the device password (see below), the terminal asks for it. Set it on the server, with the password for <password>:

sudo neodesk --password '<password>'

On Windows, in an elevated PowerShell, with the password for <password>:

& "$env:ProgramFiles\NeoDesk Headless\neodesk.exe" --password '<password>'

Change who the shell runs as

In the device panel, Actions, Shell user shows the account the server was joined with and lets you set another one. Leave it empty to go back to the one it was joined with. You need Edit devices and Open a shell on devices. Root, and SYSTEM on Windows, works only on a server that was joined with --shell-user root or --allow-root-shell: the server refuses it otherwise, and so does the device.

The same from the command line, with the device's NeoDesk ID for <id>:

neodesk devices shell <id>
neodesk devices shell-user <id> --shell-user deploy

Permission

Permission Name in the API What it does
Open a shell on devices device.shell Open a terminal and the files on devices without a desktop.

Admins and global admins have it; operators and viewers don't, until an admin ticks it under People, Roles and permissions. It is separate from Connect to devices: an account can have one without the other. An account with only Open a shell on devices opens terminals in the viewer and no screen sessions.

The account's client features apply: Terminal off closes the terminal, File transfer off the files.

Policy

Two settings of the Security group on the Policies page apply to servers without a desktop:

Setting Values What it does
Shell on devices without a desktop On or off Off: nobody opens a terminal on the organization's servers. Not set allows it.
Sign-in for shell and files Console account or Device password How a session gets in: with the permission of the console account, or with the device password. Not set is the console account.

Allow file transfer of the Features group turns the files off as well. Staff who may connect without asking applies too: when it names accounts, only those open a terminal. Session approval and the access schedule don't apply, they are about a person at the computer.

In the audit log

Entry When Details
Shell session started The server confirmed the account for a terminal. The staff member, how they connected, the account the shell runs as and the relay session.
Shell session ended The terminal session ended. When it started and how long it took, in seconds.
File session started, File session ended The same for the files. The same.
Shell or file session refused The server didn't confirm the account. The reason, for example "account may not connect" or "the shell is off by policy".
Shell user changed Someone changed the shell user in the console. The device and the new account.

Older and newer versions

A server without this feature answers the device's question with "not found". NeoDesk Headless then asks for the device password, and the terminal asks you for it. NeoDesk Desktop and older clients never report themselves as servers without a desktop, so the console keeps showing Connect for them.

Type to search pages, sections, commands and settings.