RustDesk
An open-source remote desktop application written in Rust, designed for self-hosting as an alternative to TeamViewer and AnyDesk.
RustDesk is a full-featured remote desktop application with a Rust core and a
Flutter UI, available on Linux, Windows, macOS, iOS, and Android. It works out
of the box using RustDesk's hosted relay infrastructure, but its primary
distinction from TeamViewer and AnyDesk is that the entire server stack is open
source and self-hostable — you can run your own rendezvous and relay servers so
that no remote desktop traffic ever passes through third-party infrastructure.
Features
- Self-hostable server — the companion
rustdesk-serveris open source and runs on any Linux host; all rendezvous and relay traffic can be kept entirely on your own infrastructure. - Cross-platform — client apps for Linux, Windows, macOS, iOS, and Android are all built from the same Rust core with a Flutter UI.
- P2P with relay fallback — attempts a direct peer-to-peer connection via TCP hole punching first; falls back to relay only when NAT traversal fails.
- End-to-end encryption — sessions are encrypted using the NaCl/libsodium box construction; the relay server cannot read session content.
- Unattended access — set a fixed password on the remote machine for access without user interaction at the remote end.
- File transfer — drag-and-drop file transfer between the local and remote machine within an active session.
- Clipboard sync — text and file clipboard contents are synchronised bidirectionally during a session.
- Audio forwarding — remote audio is streamed to the local machine.
- Multi-monitor support — switch between monitors on the remote machine from the session toolbar.
- Wayland support — Linux client and server support Wayland as well as X11.
- Web client — a browser-based client is available for connecting without installing the native app.
Installation
RustDesk distributes pre-built binaries for all platforms. There is no
cargo install path for end users due to the Flutter UI build complexity.
# Debian / Ubuntu — download and install the .deb from the releases page
wget https://github.com/rustdesk/rustdesk/releases/download/1.4.6/rustdesk-1.4.6-x86_64.deb
apt install ./rustdesk-1.4.6-x86_64.deb
# Fedora / RHEL — download and install the .rpm
wget https://github.com/rustdesk/rustdesk/releases/download/1.4.6/rustdesk-1.4.6-x86_64.rpm
dnf install ./rustdesk-1.4.6-x86_64.rpm
# macOS
brew install --cask rustdesk
# Arch Linux (AUR)
yay -S rustdesk-bin
A Flatpak is also available for any Linux distribution:
flatpak install flathub com.rustdesk.RustDesk
Windows, iOS, and Android builds are available from rustdesk.com and the releases page.
Quick Start
Connecting to a remote machine
- Install RustDesk on both machines.
- On the remote machine, note the ID and one-time password shown on the RustDesk home screen.
- On the local machine, enter the remote ID in the connection bar and click Connect.
- Enter the one-time password when prompted. The session opens.
Setting up unattended access
On the remote machine, open Settings → Security and set a fixed password. The machine can then be connected to at any time without someone present at the remote end — useful for home servers, headless machines, and IT support scenarios.
Self-hosting the server
RustDesk's relay and rendezvous server is a separate open source project:
# Run with Docker (simplest)
docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp \
-v ./data:/root -td --net=host rustdesk/rustdesk-server hbbs
docker run --name hbbr -p 21117:21117 \
-v ./data:/root -td --net=host rustdesk/rustdesk-server hbbr
Then, in the RustDesk client, open Settings → Network and enter your server's IP or hostname as the ID/Relay Server. All traffic for your clients will now route through your own infrastructure.
The server exposes the following ports:
| Port | Protocol | Purpose |
|---|---|---|
| 21115 | TCP | NAT type test |
| 21116 | TCP + UDP | ID registration and heartbeat |
| 21117 | TCP | Relay traffic |
| 21118–21119 | TCP | Web client websocket (optional) |
RustDesk vs TeamViewer / AnyDesk
| Feature | RustDesk | TeamViewer | AnyDesk |
|---|---|---|---|
| Open source | ✅ (AGPL-3.0) | ❌ | ❌ |
| Self-hostable server | ✅ | ❌ | ❌ |
| Free for personal use | ✅ | Limited | Limited |
| Linux support | ✅ | ✅ | ✅ |
| Wayland support | ✅ | Partial | Partial |
| Mobile clients | ✅ | ✅ | ✅ |
| Web client | ✅ | ✅ | ✅ |
| End-to-end encryption | ✅ | ✅ | ✅ |
| File transfer | ✅ | ✅ | ✅ |