Installation guide
Install your own remote desktop server
Three supported paths — Docker, native Linux and Windows. Pick one, run it, then point a RustDesk client at your host.
Recommended: Docker all-in-one
recommendedOne container runs the Go server, the relay and the web console. This is the path the project recommends for every new deployment.
Download the compose file
curl -fsSL https://raw.githubusercontent.com/UNITRONIX/BetterDesk/main/docker-compose.quick.single.yml -o docker-compose.ymlPull and start
docker compose pull && docker compose up -dPrint the admin credentials
docker compose exec betterdesk betterdesk-show-admin-credentialsOpen http://your-server:5000 — plain HTTP on purpose; put TLS in front with a reverse proxy.
Pin a release with BETTERDESK_IMAGE_TAG instead of :latest for reproducible deployments.
BETTERDESK_IMAGE_TAG=3.5.289 docker compose up -dLinux native install
Uses git and systemd. Choose the interactive manager or the non-interactive flag.
Clone the repository
git clone https://github.com/UNITRONIX/BetterDesk.git && cd BetterDeskInteractive manager (choose 1 for a fresh install)
sudo ./betterdesk.shOr fully non-interactive
sudo ./betterdesk.sh --autoThe installer detects an existing RustDesk install at /opt/rustdesk and offers to migrate it.
Windows
Run the PowerShell manager as Administrator. It installs the console and the server as Windows services.
In an elevated PowerShell:
git clone https://github.com/UNITRONIX/BetterDesk.git; cd BetterDeskSet-ExecutionPolicy Bypass -Scope Process -Force; ./betterdesk.ps1Requires PowerShell 5.1 or newer and .NET runtime. The script checks prerequisites before changing anything.
Verify the install
Run these before you touch a client. They separate a server problem from a network problem.
ss -tlnp | grep -E ':(5000|5443)\b'curl -sf https://your-server.example.com/api/healthnc -vz your-server.example.com 21116
nc -vzu your-server.example.com 21116nc -vz your-server.example.com 21117Ports you need open
21116 must be open on both TCP and UDP. TCP alone breaks hole punching.
| Port | Protocol | Purpose | Exposure |
|---|---|---|---|
| 21116 | TCP + UDP | Signal: registration and hole punching | WAN |
| 21117 | TCP | Relay when a direct path fails | WAN |
| 21114 | TCP | Client API: pairing, branding, login | WAN via TLS |
| 5000 | TCP | Web console | Localhost only |
| 21118 / 21119 | TCP | WebSocket signal and relay | Via proxy |
| 21122 | TCP | CDAP gateway for IoT agents | Optional |
Installation questions
Do I need a licence key or account?
No. BetterDesk is free software under AGPL-3.0. There is no account, no trial period and no key to activate.
Can I use a normal RustDesk client?
Yes. Stock RustDesk clients connect to BetterDesk without patching. Enter your host as the ID server and relay server.
Why is the panel on port 5000 over plain HTTP?
The panel binds to localhost by default and expects a reverse proxy to terminate TLS. Never expose port 5000 directly to the internet.
Do I have to open port 21116 UDP?
Yes. TCP alone is not enough — UDP carries hole punching. With UDP blocked, connections fall back to relay or fail behind symmetric NAT.
How do I update?
Docker: pull the new tag and restart. Native: rerun the manager and pick update. Panel updates are also available from the console.
Does it work behind Cloudflare?
Only with DNS-only records. Cloudflare cannot proxy UDP, so the orange-cloud mode breaks port 21116.