RustDesk is a self-hosted remote desktop application designed as a privacy-focused, open-source alternative to proprietary tools like TeamViewer and AnyDesk. It empowers individuals and organizations to securely control remote devices without relying on third-party cloud services, ensuring data sovereignty and compliance. Built with Rust for performance and safety, it supports peer-to-peer connections via TCP hole punching and optional relay servers.
The application uses Flutter for cross-platform UIs and Sciter (deprecated) for legacy desktop interfaces. It integrates with WebRTC-like protocols for screen sharing, clipboard sync, and file transfer. Deployment options include Docker-based server setups, native binaries for all major OSes, and a web client that can be hosted on your own domain. The ecosystem includes a modular architecture with separate libraries for screen capture (scrap), input control (enigo), and clipboard handling.
What You Get
- Peer-to-Peer (P2P) Connections - Uses TCP hole punching to establish direct device-to-device connections, reducing latency and eliminating reliance on intermediary servers for data transfer.
- Self-Hosted Server Option - Deploy your own rendezvous and relay server using Docker or source code, giving you full control over authentication, logging, and network traffic.
- Multi-Platform Support - Native clients for Windows, macOS, Linux, Android, and a web-based client that runs in browsers with full clipboard and file transfer support.
- File Transfer & Clipboard Sync - Real-time bidirectional file copying and clipboard synchronization between local and remote machines across all platforms.
- Web Client with Custom Domain Hosting - Host the web-based remote access interface on your own server and domain, enabling branded, secure access without installing client software.
- Advanced Access Control (Server Pro) - User-level ACLs, device groups, LDAP/OIDC integration, and centralized settings for enterprise-grade permission management.
- Audit Logs & 2FA - Track login attempts and remote sessions with detailed audit trails, and enforce two-factor authentication for added security.
- Custom Client Generator - Generate branded desktop clients with your logo, name, and custom configurations for internal deployment across your organization.
Common Use Cases
- IT Support Teams - IT staff use RustDesk to remotely troubleshoot employee devices without exposing internal networks to third-party SaaS platforms.
- Remote Workers - Professionals working from home use RustDesk to securely access their office computers while maintaining compliance with data residency laws.
- Small Businesses - Companies deploy self-hosted RustDesk servers to replace expensive TeamViewer licenses, reducing costs and increasing data control.
- Educational Institutions - Universities and labs use RustDesk to manage lab computers and provide remote access to students and researchers without cloud dependencies.
Under The Hood
Architecture
- Modular design with distinct layers for UI, services, and platform-specific logic, enforcing clear boundaries through well-defined directories and abstractions
- Service-oriented architecture leveraging Rust traits and dependency injection to decouple components, enabling flexible substitution and centralized lifecycle management
- Platform-specific functionality isolated via conditional compilation and adapter patterns, ensuring consistent behavior across operating systems without code duplication
- IPC and inter-process communication abstracted through a shared crate, allowing seamless communication between UI and backend without tight coupling
Tech Stack
- Rust 1.75+ as the foundational language, with a modular crate structure that separates core logic from platform integrations
- Cross-platform media processing powered by industry-standard libraries like FFmpeg, libvpx, and libyuv, managed via VCPkg for consistent native dependency resolution
- Flutter Rust Bridge enables a unified UI experience across mobile and desktop platforms while maintaining high-performance backend logic in Rust
- Dockerized build environment with CMake and VCPkg ensures reproducible compilation of low-level dependencies across Linux, Windows, and macOS
- Platform integrations for Windows, Linux, and macOS leverage native APIs through conditional features, minimizing bloat while maximizing system compatibility
Code Quality
- Strong type safety and comprehensive error handling using Rust’s Result and custom error types, ensuring robustness in network and I/O operations
- Clean, idiomatic Rust patterns applied consistently, including Option for optional values, Arc/RwLock for shared state, and VecDeque for bounded buffers
- Modular components follow single-responsibility principles with clear naming and documentation, though test coverage is limited and relies heavily on runtime validation
- Async/await with Tokio is used extensively and appropriately for non-blocking operations, demonstrating mature concurrency practices
What Makes It Unique
- Native TOTP-based two-factor authentication with encrypted secret storage, eliminating dependency on third-party auth providers
- Unified Rust core that dynamically adapts to OS-specific services like Wayland, DBus, and platform clipboards without fragmentation
- Real-time video QoS engine that intelligently adjusts quality based on network latency and screen activity, not static thresholds
- Extensible plugin system with callback hooks that allow runtime behavior modification without forking or recompilation
- Reliable file transfer system with atomic retries, stale cleanup, and in-memory fallbacks for unstable network conditions
- Terminal emulation layer with state-synchronized tabs via FFI-bound models, avoiding redundant connections across sessions