RustDesk: the open-source remote desktop you can self-host
3 min readTools · Self-hosting · Open Source · Guides
rustdesk/rustdesk is an open-source remote desktop client, and the main reason people pick it is that you can run the server side yourself. TeamViewer and AnyDesk both broker connections through the vendor's cloud. With RustDesk you can put that part on your own VPS and keep the directory and relay under your control.
What it actually is
- A remote desktop client for Windows, macOS, Linux, Android and iOS, written in Rust with a Flutter interface.
- A server package, rustdesk-server, with two programs: hbbs, the ID and rendezvous server, and hbbr, the relay.
- Open source under AGPL-3.0 for both the client and the open-source server.
- An optional paid RustDesk Server Pro that adds a web console, user accounts, address book sync and audit logging.
How it works
Each client registers with hbbs and gets an ID. When you connect to someone, hbbs introduces the two machines and they try to talk directly. If a firewall or NAT stops that, hbbr relays the traffic. By default the clients use the project's public servers. Self-hosting means you point every client at your own hbbs address and public key instead.
On first start, hbbs generates a key pair in its data directory. The public half, id_ed25519.pub, goes into each client, so a client only trusts your server.
A minimal setup
You need a small Linux VPS with a public IP or domain name. Docker Compose is the simplest route.
services:
hbbs:
image: rustdesk/rustdesk-server:latest
command: hbbs -r your-server-ip:21117
volumes:
- ./data:/root
network_mode: host
restart: unless-stopped
hbbr:
image: rustdesk/rustdesk-server:latest
command: hbbr
volumes:
- ./data:/root
network_mode: host
restart: unless-stoppedThen open the ports, copy data/id_ed25519.pub, and enter your server address and that key in the network settings of each client.
- hbbs: TCP 21115, 21116 and 21118, plus UDP 21116.
- hbbr: TCP 21117 and 21119.
- Port 21114 is only used by the Pro API.
- Ports 21118 and 21119 serve the web client. Skip them if you do not use it.
Why it keeps showing up
Two things push people towards it. One is licensing: there is no per-seat fee and no commercial-use detection to trip over, because you run it. The other is control: if the data path matters for compliance, a server in a region you chose, with your own logs, is far easier to justify than a third-party cloud.
Where it bites
- You are the operator. Updates, backups of the key pair and uptime are now your job. Lose the private key and every client has to be reconfigured.
- Exposed server: hbbs and hbbr are on the public internet. Open only the ports you need and keep the host patched.
- Weak unattended passwords are as dangerous here as with any tool. Use long ones.
- Maturity gaps: the open-source server has no built-in web console or user management. That is what Pro is for.
- AGPL-3.0: fine for internal use, but read it before you build a hosted service on top of it.
- Default servers: until you change the settings, clients use the public ones, so check what you are actually connecting through.
Who it fits
- Homelab users and small teams who are comfortable running a VPS.
- IT providers who want a self-hosted option without a per-seat licence.
- Organisations that need to keep remote-access metadata in their own network.
- Not for people who want zero maintenance. For them, a hosted vendor with support is a fair trade.
Verdict
RustDesk is the best answer I know to the question of who runs the middle of a remote desktop session. You take on a small server and some responsibility, and in return you get a tool with no licence traps. Test it with two machines before you roll it out.
Repository: github.com/rustdesk/rustdesk

Written by
Shihab Hossain — Full-Stack Developer
I build thoughtful digital products from Bangladesh — fast web experiences with Next.js, Android apps with Flutter, and the infrastructure behind them.
Work with me