logo
icon

RustDesk Server

Self-hosted RustDesk remote desktop server: official hbbs/hbbr rendezvous + relay, plus a custom Rust API and web admin dashboard for managing users and devices.

template cover
Deployed1 times
Publisherzeaburd1FG
Created2026-08-06
Tags
Remote DesktopNetworking

RustDesk Server

Self-hosted RustDesk remote desktop server, deployed with:

  • hbbs / hbbr — the official RustDesk ID/rendezvous and relay servers (rustdesk-server, GPL-3.0).
  • api — a custom Rust API server for user/device management, backed by MySQL.
  • web — a web admin dashboard (nginx + static SPA) for managing users, devices and address books.
  • mysql — database for the API server.

After deployment

  1. Open the web admin dashboard at https://<your-domain>, and log in with the ADMIN_USER / ADMIN_PASS values shown in the api service's environment variables (default user admin, password is a randomly generated ${PASSWORD} — check the api service's variables tab).
  2. Open the Networking tab of the hbbs and hbbr services to find the externally forwarded host/port for each port (21115/21116 on hbbs, 21117 on hbbr).
  3. (Optional, recommended) hbbs/hbbr use raw TCP/UDP, so Zeabur cannot bind a domain to them directly — the forwarded host is a bare IP that can change on redeploy. If you set ID_SERVER_DOMAIN / RELAY_SERVER_DOMAIN, create a DNS A record for each domain pointing to the forwarded host from step 2, so the ports below stay reachable at a stable name instead of a raw IP.
  4. In the RustDesk client, go to Settings → Network and set:
    • ID Server: <ID_SERVER_DOMAIN, or hbbs forwarded host>:<hbbs 21116 forwarded port>
    • Relay Server: <RELAY_SERVER_DOMAIN, or hbbr forwarded host>:<hbbr 21117 forwarded port>
    • API Server: https://<your-domain> (the web service reverse-proxies /api/ to api)
    • Key: hbbs auto-generates an Ed25519 key pair the first time it starts, and persists it (id_ed25519.pub / id_ed25519) in its own data volume. Open a shell in the hbbs service (Zeabur's service Shell/exec) and run cat id_ed25519.pub to get the value. Required — clients without the matching key are rejected.

Security note

hbbs auto-generates its own Ed25519 key pair on first start and persists it in its mounted data volume, so it survives restarts and redeploys without any manual configuration. Clients must use the matching public key (id_ed25519.pub, retrieved as described above) to register with hbbs.

hbbr runs with no key set, which is the RustDesk upstream default: it does not validate a relay key, since clients already need hbbs's key to register a session in the first place. If you want hbbr to also validate the relay key, copy hbbs's id_ed25519 / id_ed25519.pub files into hbbr's data volume and add -k <the key> to hbbr's start command yourself.

To rotate the key, delete id_ed25519 / id_ed25519.pub from the hbbs service's data volume and restart hbbs — a new key pair is generated automatically.

License