Move from a RustDesk server
Copy as MarkdownNeoDesk takes the place of hbbs and hbbr. A RustDesk client checks the server by its key, so when NeoDesk has the old server's key pair and answers at the old address, the clients connect to it as before. This page covers a RustDesk server on Linux, on Windows or in Docker.
What carries over
- The key pair,
id_ed25519andid_ed25519.pub. NeoDesk reads RustDesk's key files as they are. Without them it makes a new pair at its first start, and every client then needs the new key. See why the key file matters. - The address. Clients keep the ID server they have. Install NeoDesk on the same machine, or point the old DNS name at the new one.
- The device IDs. The ID lives on the client, so each device keeps it. NeoDesk's device list starts empty and fills as the clients connect. It does not read RustDesk's database, except on PostgreSQL, see Keep the device list on PostgreSQL.
Before you start
-
Copy the old server's data folder somewhere safe, with
id_ed25519,id_ed25519.pubanddb_v2.sqlite3. If the old server runs in Docker, the files are in the folder or volume it mounts;docker inspect <container>lists its mounts. -
Stop the old server and keep it from starting again: disable its services, or, when it runs in Docker, run this in the folder of its containers:
docker compose downNeoDesk needs the same ports, and the Linux and Docker installers stop with an error while another program holds them. The Linux script stops and removes services named
rustdesksignalandrustdeskrelayitself, so copy their unit files first if you may want to go back. -
If the old server lives in a folder the installer searches, with
hbbsin it, move that folder away, so that NeoDesk starts in a folder of its own. Otherwise the installer installs into that folder, and at its first start the server renames RustDesk's database todb_v2.sqlite3.rustdesk-<date>-<time>and makes its own. The log says so in a line that starts withWARN:. The folders are/opt/rustdesk,/usr/local/rustdesk,/var/lib/rustdesk,/home/rustdeskand$HOME/rustdeskon Linux, andC:\RustDeskandC:\Program Files\RustDeskon Windows.
sudo mv /opt/rustdesk /opt/rustdesk-oldRename-Item C:\RustDesk RustDesk-oldOn Linux or Windows
Put the key pair into the folder the installer uses, then install. At its first start the server finds the files and uses them instead of making new ones.
On Linux:
sudo mkdir -p /opt/neodesk
sudo cp /opt/rustdesk-old/id_ed25519 /opt/rustdesk-old/id_ed25519.pub /opt/neodesk/Then install as described in Install on Linux.
The script hands the files to the neodesk account the server runs as.
On Windows, in PowerShell as Administrator, with the old files in
C:\RustDesk-old:
New-Item -ItemType Directory -Force C:\NeoDesk
Copy-Item C:\RustDesk-old\id_ed25519, C:\RustDesk-old\id_ed25519.pub C:\NeoDesk\Then install as described in Install on Windows.
After the install, the public key must be the same as the old
id_ed25519.pub. On Linux, show it with:
sudo cat /opt/neodesk/id_ed25519.pubOn Windows it is C:\NeoDesk\id_ed25519.pub. The server also writes it to
its log at every start, as Server public key: <key>.
In Docker
Install NeoDesk as described in Install with Docker. At its first start it makes a key pair of its own. Replace it with the old one and restart the container. Run these commands in the folder that holds the old key files:
docker exec -i -u neodesk neodesk sh -c 'umask 077; cat > /opt/neodesk/data/id_ed25519' < id_ed25519
docker exec -i -u neodesk neodesk sh -c 'cat > /opt/neodesk/data/id_ed25519.pub' < id_ed25519.pub
docker restart neodeskWrite both files before the restart: the server does not start when
id_ed25519.pub does not belong to id_ed25519. Then check that the container
has the old public key:
docker exec -u neodesk neodesk cat /opt/neodesk/data/id_ed25519.pubLet the clients back in
A new install starts in the Managed enrollment mode. To NeoDesk, your RustDesk clients are new devices, so each one waits under Devices, Enrollment requests until someone approves it. Until then nobody can reach it, and it cannot start a session.
There are two ways to let them in:
- Approve each one under Enrollment requests.
- Switch to Open while the clients come back, then switch back to Managed. Waiting devices connect the next time they try, and a device the server knows can register again in every mode. Do this when you have more than 1000 clients: the queue holds at most 1000 waiting devices, and turns away the rest without a request.
See Changing the mode.
The clients' API server can stay empty, as a RustDesk server setup usually
leaves it, or be http://<server-address>:21121; both work. See
Connect a client.
Keep the device list on PostgreSQL
On an install that runs on PostgreSQL, the installer can copy the devices from RustDesk's database into NeoDesk's. A copied device counts as known: it registers again without approval in every mode, and shows under Devices before it connects.
-
Start the installer. On Linux:
sudo neodesk-setupOn Windows:
& 'C:\NeoDesk\neodesk.ps1'Choose Database migration, then Rust -> Go.
-
As the source, give RustDesk's database, for example
/opt/rustdesk-old/db_v2.sqlite3, or thedb_v2.sqlite3.rustdesk-<date>-<time>the server renamed it to. -
As the destination, give the install's
DATABASE_URL, from/opt/NeoDeskConsole/.envorC:\NeoDeskConsole\.env.
The tool first saves a copy of the source next to it. It copies each device's ID, key, name, operating system and version, and leaves a device that NeoDesk has already as it is. The last line says how many it copied:
Migration complete: <n> peers copied to PostgreSQL, <m> already there and left as they wereWarning
On a SQLite install, don't give the install's own database file as the destination. The tool replaces that file with a new one that holds only the devices.