Skip to content

RustDesk Clients

How to point a RustDesk client at the self-hosted RustDesk Pro server, and how to operate that server. The server runs on the DigitalOcean edge node edge-node.fzymgc.house, outside the k3s cluster. Its Docker Compose project at /opt/docker-compose/rustdesk/ on that host is not in this repository. Only its public DNS records are.

Property Value
Server hostname rd.fzymgc.net
Server software rustdesk/rustdesk-server-pro, Docker Compose on edge-node
Admin web console https://rd.fzymgc.net (Caddy in front of host port 21114)
Server public key the content of id_ed25519.pub on the server. See Read the public key.
Public DNS cloudflare_dns_record.fzymgc_net_rd_a and fzymgc_net_rd_aaaa in tf/cloudflare/dns-fzymgc_net.tf, both unproxied

The DNS records must stay unproxied. The Cloudflare proxy cannot carry RustDesk’s TCP and UDP ports.

Every client, desktop or mobile, needs four fields. A client with a wrong key fails its handshake with no error in the UI.

Field Value Notes
ID Server rd.fzymgc.net The hbbs rendezvous server. The client tries 21116 and falls back through 21115, 21118 and 21119. Do not add a port.
Relay Server rd.fzymgc.net, or blank hbbs advertises the relay address. Leave it blank unless you want to override what the server sends.
API Server https://rd.fzymgc.net Needed only for Pro features (address book, user accounts, audit log). The https:// prefix is required.
Key the server’s id_ed25519.pub A mismatch is a silent connection failure.

No per-client license key, API token or password is needed for basic connectivity. The server holds the license, and clients are free.

Client Path
macOS, Windows or Linux desktop Gear icon, Settings, Network. Fill ID Server and Key. Apply.
iOS or Android Settings (top right), ID/Relay Server. Fill the same fields.
Web client at https://rd.fzymgc.net Nothing to enter. The web client uses the server’s own configuration.

Desktop clients accept a base64 configuration string through Import server config from clipboard under Settings, Network. Generate one with the current key:

Terminal window
KEY=$(ssh root@edge-node 'cat /opt/docker-compose/rustdesk/data/id_ed25519.pub')
python3 -c '
import base64, json, sys
cfg = {"host": "rd.fzymgc.net", "key": sys.argv[1], "api": "https://rd.fzymgc.net", "relay": ""}
print(base64.b64encode(json.dumps(cfg).encode()).decode())
' "$KEY" | pbcopy

The admin console can also produce a QR code string under Settings, Strategies.

After the basic configuration, a user signs in inside the client under Settings, Account, Sign In, with a username and password created in the admin console under Users. The address book then syncs into the client, the server records every session in the audit log, and group permissions apply.

  1. Browse to https://rd.fzymgc.net and sign in with the default credentials. Change them at once.
  2. Under Settings, License, make sure that the Pro license is registered. It binds to the server’s machine identity.
  3. Under Users, create a real admin account, then disable or delete the default admin.
Terminal window
ssh root@edge-node 'cat /opt/docker-compose/rustdesk/data/id_ed25519.pub'

Do not delete /opt/docker-compose/rustdesk/data/. If id_ed25519 is regenerated, every client’s stored key is invalid and every connection fails silently. A key rotation is a coordinated change: regenerate, then update the Key field on every client.

Tail the hbbs container while the client connects:

Terminal window
ssh root@edge-node 'docker logs -f rustdesk-hbbs 2>&1 | grep -E "Punch hole|Listen|tcp"'

A successful connection logs Punch hole <id> <peer-ip>:<port> request from <client-ip>:<port>. No such line after the client tries means that the client never reached hbbs: DNS, a firewall, or a wrong key.

Terminal window
ssh root@edge-node 'cd /opt/docker-compose/rustdesk && docker compose restart'
ssh root@edge-node 'docker logs --tail 200 rustdesk-hbbs' # rendezvous and signal
ssh root@edge-node 'docker logs --tail 50 rustdesk-hbbr' # relay

hbbs and hbbr read id_ed25519 from /opt/docker-compose/rustdesk/data/ at start, so a restart keeps the key. The hbbs log records a license check with License OK. If a check fails, hbbs refuses new connections.

Port Service Protocol Use
443 Caddy TCP, TLS Admin and API console, proxied to 21114
21114 hbbs TCP Web console and API, host-only behind Caddy
21115 hbbs TCP NAT type test
21116 hbbs TCP and UDP Rendezvous and signal, the primary client port
21117 hbbr TCP Relay, when a direct connection fails
21118 hbbs TCP (WebSocket) Web client signal fallback
21119 hbbr TCP (WebSocket) Web client relay fallback

The client stays on “Trying to connect”

Section titled “The client stays on “Trying to connect””

In order of likelihood:

  1. Wrong key. Compare the Key field with the server’s id_ed25519.pub. The client shows no error for a key mismatch and retries forever.
  2. A firewall blocks 21116 or 21117. The signal and relay ports are not HTTP, and some networks block non-HTTP outbound traffic. Test from the client’s network: nc -zv rd.fzymgc.net 21116.
  3. DNS points at the wrong host. dig rd.fzymgc.net A AAAA must return the edge node’s addresses from the LAN as well as from the internet. There is no in-cluster RustDesk.
  4. The license lapsed. Read the hbbs log for License check failed.

The API Server field is missing or has the wrong scheme. It must be https://rd.fzymgc.net.

A Pro permission group denies the action. Read Users, Permissions in the admin console for the signed-in user.