Security model
A remote desktop server you can audit
Self-hosting is only worth it if the software is honest about its threat model. Here is exactly what protects a session.
Layers of protection
Each layer is independent. Losing one does not silently disable the rest.
Transport
TLS terminates at your proxy or at the Go server on the same port. Plain and TLS connections are detected per connection, so a mistake does not silently downgrade everyone.
Session encryption
Remote sessions and operator chat are encrypted end to end with NaCl. The relay forwards ciphertext and cannot read the session.
Identity
TOTP two-factor authentication, four permission tiers, and enrollment approval before a device can connect at all.
Auditability
Every login, session and configuration change is written to an audit log with the operator, address and result.
Privacy by architecture
There is no vendor in the path. The project does not run analytics on your deployment.
- No vendor cloud, no telemetry endpoints, no seat counting.
- Devices, users and session metadata stay in your database on your hardware.
- Every line is published under AGPL-3.0 — read it, build it, patch it.
- Security issues go through a documented disclosure process, not a support ticket.
Protocol compatibility without copying the client.
BetterDesk implements the RustDesk wire protocol independently. It does not contain RustDesk source code, and it does not ship a patched client. That separation keeps the upstream project's work intact and makes the compatibility claim verifiable.
Clean-room implementationProduction hardening checklist
- 1Put the panel behind a reverse proxy and bind it to 127.0.0.1.
- 2Terminate TLS with a real certificate and set PUBLIC_SERVER_ID so clients get the right hostname.
- 3Enable TOTP for every administrator account.
- 4Deny port 21114 from the WAN and let the proxy reach it over loopback.
- 5Set TRUST_PROXY plus TRUSTED_PROXIES when a proxy sits in front.
- 6Keep the server clock accurate — pairing codes expire after ten minutes.
Reporting a vulnerability
Do not open a public issue for a security problem. Use the private reporting channel described in the repository security policy.
Security policy on GitHub