ScriptsApr 21, 2026·3 min read

RustDesk — Self-Hosted Open Source Remote Desktop

RustDesk is a full-featured open-source remote desktop application written in Rust. It offers a self-hosted alternative to TeamViewer and AnyDesk, giving you full control over your data with your own relay and rendezvous servers.

Introduction

RustDesk provides a self-hosted remote desktop solution written in Rust, designed as a drop-in replacement for commercial tools like TeamViewer. By running your own server, you keep full control over connections and data without depending on third-party infrastructure.

What RustDesk Does

  • Provides remote desktop access across Windows, macOS, Linux, iOS, and Android
  • Lets you run your own relay and rendezvous servers for private connectivity
  • Supports unattended access, file transfer, and TCP tunneling
  • Offers end-to-end encryption for all remote sessions
  • Includes a web-based admin console for managing devices and users

Architecture Overview

RustDesk consists of a client application and two server components: the rendezvous server (hbbs) that handles peer discovery, and the relay server (hbbr) that proxies traffic when direct P2P connections fail. The client is written in Rust with a Flutter-based UI on mobile platforms and Sciter/Flutter on desktop. Communication uses a custom protocol over TCP/UDP with optional encryption.

Self-Hosting & Configuration

  • Deploy hbbs and hbbr with a single Docker Compose file on any VPS
  • Requires ports 21115-21119 (TCP) and 21116 (UDP) open on your firewall
  • Configure clients to point to your server by setting the ID and relay server addresses
  • Supports key-based authentication to prevent unauthorized relay usage
  • Optional integration with LDAP or OIDC for centralized user management

Key Features

  • Works behind NATs and firewalls via hole-punching with relay fallback
  • Adaptive codec selection (VP8, VP9, AV1, H264, H265) for optimal quality
  • Built-in file transfer, clipboard sync, and chat
  • Supports 2FA and role-based access control in the Pro edition
  • Active development with frequent releases and a large contributor community

Comparison with Similar Tools

  • TeamViewer — commercial, no self-hosting, usage limits on free tier
  • AnyDesk — proprietary, limited self-hosted relay options
  • Apache Guacamole — web-only, uses RDP/VNC/SSH rather than its own protocol
  • MeshCentral — open-source with web UI but heavier to deploy
  • TigerVNC — lightweight VNC but lacks built-in NAT traversal and relay

FAQ

Q: Do I need a public server to use RustDesk? A: You can use the public servers for testing, but running your own hbbs/hbbr is recommended for privacy and reliability.

Q: What are the system requirements for the server? A: Minimal — a 1-core VPS with 1 GB RAM handles hundreds of concurrent connections.

Q: Is RustDesk truly free? A: The client and server are open source (AGPL-3.0). A Pro edition adds features like OIDC, web console, and audit logs.

Q: Can I use RustDesk for unattended access? A: Yes, set a permanent password on the remote machine and enable the system service for boot-time availability.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets