CortenDesk Server

A drop-in replacement for rustdesk-server

CortenDesk Server is our fork of the open-source RustDesk server: the same hbbs ID server and hbbr relay, with the parts current RustDesk clients need and a backlog of fixes. Same binaries, ports, flags and data files. Change the image in your compose file and your devices keep their IDs and keys.


Signed-in clients connect

RustDesk 1.4.1 and newer encrypt signalling when signed in. Stock hbbs never answers, so every connection from a signed-in client times out. This fork completes the exchange.

More direct sessions

WebRTC, UDP hole punching and IPv6 for RustDesk 1.5. More sessions go device to device and fewer load your relay.

Nothing to migrate

The key pair and peer database are read as they are. Going back is the same swap in reverse.

Side by side

CortenDesk Server and rustdesk-server

Rows marked for RustDesk 1.5 need that client version. Older clients are served as before.

FeatureCortenDesk Serverrustdesk-server
Same ports, flags, key files and peer databaseYes.Swap the image, keep ./dataYes.
Stock RustDesk clients, no patchesYes.Yes.
Signed-in clients (RustDesk 1.4.1 and newer) can connectYes.No."Failed to secure tcp: deadline has elapsed"
Key exchange version 1 for RustDesk 1.5Yes.A key per directionNo.
WebRTC connections for RustDesk 1.5Yes.Offer, answer and candidates passed between the two devicesNo.Dropped; clients fall back
UDP hole punching and IPv6 peer-to-peer for RustDesk 1.5Yes.No.
Desktop clients over WebSocket, through port 443 aloneYes.No.Registrations refused
Client address from a trusted proxy onlyYes.TRUSTED_PROXIESNo.Any client can set X-Real-IP
Approved devices only, incoming-only devicesYes.From a CortenDesk consoleNo.
How each session connected: LAN, direct, WebRTC or relayYes.Reported to the consoleNo.
Free an ID without stopping the serverYes.release-idNo.Edit db_v2.sqlite3 with hbbs stopped
Per-IP registration limits as settingsYes.MAX_NEW_IDS_PER_IP, MAX_REGISTER_BURST_PER_IPNo.Fixed at 300 IDs a day
Docker images for amd64 and arm64, static Linux binariesYes.Yes.
Source tarball that buildsYes.Includes the hbb_common submoduleNo.GitHub archives leave it out
LicenseAGPL-3.0AGPL-3.0

rustdesk-server column from its source and issue tracker, checked November 2026. Every change, with dates, is in CHANGES.md. Spot something out of date? Open an issue.


Switching

Change the image, keep the data

  1. Stop your hbbs and hbbr containers.
  2. Change both image: lines to ghcr.io/marcpope/cortendesk-server:1. The same image is on Docker Hub as marcpope/cortendesk-server.
  3. Keep the same data volume. Start them again.
  4. Open UDP 21116 if it isn't already. Devices need it to come online, and RustDesk 1.5 uses it for direct UDP connections.

Not on Docker? Static Linux binaries for amd64 and arm64, and a source tarball, are attached to each release.

services:
  hbbs:
    image: ghcr.io/marcpope/cortendesk-server:1
    command: hbbs -r relay.example.com:21117
    ports:
      - "21115:21115"
      - "21116:21116"
      - "21116:21116/udp"
    volumes:
      - ./data:/root          # your existing data
    restart: unless-stopped

  hbbr:
    image: ghcr.io/marcpope/cortendesk-server:1
    command: hbbr
    ports:
      - "21117:21117"
    volumes:
      - ./data:/root
    restart: unless-stopped

Fixed here

From the upstream backlog

We went through rustdesk-server's open issues and pull requests and took on what was worth fixing. Each of our issues says what was done and credits the original reporter or author.

IssueOriginal rustdesk-server itemWhat changedFixed
#2 PR 723 A relay write stuck for 30 seconds ends the session, so a frozen peer no longer holds it open forever. Server 1.4.0
#3 Issue 708, PR 721 The relay pairs both halves of a session that arrive at the same moment. Before, the session could fail. Server 1.4.0
#4 PR 716 always-use-relay no longer wipes the relay server list. Server 1.4.0
#5 Commit 5e37f45 The punch request log is capped, and device IDs over 253 bytes are refused. Server 1.4.0
#6 Issue 678, commit 873230e An id_ed25519 that can't be read stops hbbs with an error, instead of writing a new public key every client rejects. Server 1.4.0
#7 PR 726 Message size caps before sign-in: 1 MiB per signalling message, 64 KB before a relay session pairs. Server 1.4.0
#8 PR 717 Admin console replies arrive whole. Long block lists were cut short. Server 1.4.0
#9 PR 738 One failed UDP reply no longer rebuilds the UDP socket and drops every device's packets. Server 1.4.0
#10 PR 727 Idle devices are dropped from memory after 10 minutes and reloaded when needed, instead of staying until restart. Server 1.4.0
#11 Issue 444 A failed send in the self-test no longer stops hbbs. Server 1.4.0
#12 PR 742 Per-IP registration limits are settings, so an office behind one public IP can register more than 300 machines. Server 1.4.0
#13 PR 729 Unused dependencies removed: twelve crates and everything only they pulled in. Server 1.4.0
#14 PR 731 sqlx 0.6 to 0.8.6, without database TLS. Old rustls, ring and webpki are gone. Existing peer databases are read as before. Server 1.4.0
#15 PR 707 hbb_common is no longer a build dependency, so builds are faster and cross-compiling is simpler. Server 1.4.0
#16 Issue 701 Each release has a source tarball that includes the hbb_common submodule, so it builds. Server 1.4.0
#17 Issue 709, PR 734 Key exchange version 1 for RustDesk 1.5: a key per direction, bound to the exchange. Server 1.4.0
#18 PR 734 UDP hole punching and IPv6 peer-to-peer for RustDesk 1.5. Server 1.4.0
#19 Issue 483 release-id frees an ID, so a reinstalled machine can take it back. Server 1.4.0
#21 Commits 44de977, 08cd442 Relay requests whose relay uuid is empty, too long or has characters outside letters, digits, - and _ are dropped, so they never reach a relay server. Server 1.5.1

All issues · CHANGES.md · Also since 1.1.1: UDP replies are limited to what clients need, so the server is hard to use for reflecting traffic at someone else.


Bundled in CortenDesk

The server comes with the console

The CortenDesk Docker image runs CortenDesk Server next to the web console, so one container is the whole deployment. The two talk to each other, which adds what the server can't do alone:

  • Only devices you approved can register, and some can be incoming only.
  • A log of how each session connected: LAN, direct, WebRTC or relay.
  • Relay bandwidth limits you change live from Settings.
  • A Release ID button on the device page.

Questions

Before you switch

Do I need the CortenDesk console to use it?

No. CortenDesk Server runs on its own, exactly where rustdesk-server ran. The console is optional. With it you also get device approval, incoming-only devices and connection paths. The CortenDesk Docker image bundles the server, so a console install already has it.

Will my devices keep their IDs and keys?

Yes. Keep the same data directory. The key pair (id_ed25519, id_ed25519.pub) and the peer database (db_v2.sqlite3) are read as they are, so clients need no change.

Can I switch back?

Yes, the same way: change the image back. Nothing in the data directory changes format. Signed-in clients stop connecting again.

Does it work with RustDesk Server Pro?

No. It replaces the open-source server, hbbs and hbbr. For a console like the one Pro sells, see CortenDesk.

CortenDesk Server is an independent fork, not affiliated with or endorsed by RustDesk. RustDesk is a trademark of its owners.