Skip to content

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

recommended

One container runs the Go server, the relay and the web console. This is the path the project recommends for every new deployment.

1

Download the compose file

bash
curl -fsSL https://raw.githubusercontent.com/UNITRONIX/BetterDesk/main/docker-compose.quick.single.yml -o docker-compose.yml
2

Pull and start

bash
docker compose pull && docker compose up -d
3

Print the admin credentials

bash
docker compose exec betterdesk betterdesk-show-admin-credentials

Open 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.

pinning a release
BETTERDESK_IMAGE_TAG=3.5.289 docker compose up -d

Linux native install

Uses git and systemd. Choose the interactive manager or the non-interactive flag.

Clone the repository

bash
git clone https://github.com/UNITRONIX/BetterDesk.git && cd BetterDesk

Interactive manager (choose 1 for a fresh install)

bash
sudo ./betterdesk.sh

Or fully non-interactive

bash
sudo ./betterdesk.sh --auto

The 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:

powershell
git clone https://github.com/UNITRONIX/BetterDesk.git; cd BetterDesk
powershell
Set-ExecutionPolicy Bypass -Scope Process -Force; ./betterdesk.ps1

Requires 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.

Panel answers on loopback
ss -tlnp | grep -E ':(5000|5443)\b'
Client API responds over TLS
curl -sf https://your-server.example.com/api/health
Signal port reachable
nc -vz your-server.example.com 21116
nc -vzu your-server.example.com 21116
Relay port reachable
nc -vz your-server.example.com 21117

Ports you need open

21116 must be open on both TCP and UDP. TCP alone breaks hole punching.

PortProtocolPurposeExposure
21116TCP + UDPSignal: registration and hole punchingWAN
21117TCPRelay when a direct path failsWAN
21114TCPClient API: pairing, branding, loginWAN via TLS
5000TCPWeb consoleLocalhost only
21118 / 21119TCPWebSocket signal and relayVia proxy
21122TCPCDAP gateway for IoT agentsOptional

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.