RustDesk: The Complete Guide to Open-Source Remote Desktop Software
Ever found yourself locked out of your work computer while traveling, or desperately trying to help a family member troubleshoot their PC over the phone? If you're tired of TeamViewer's subscription walls and privacy concerns, RustDesk might be exactly what you need.
1. What Is RustDesk?
RustDesk is an open-source remote desktop application that serves as a free alternative to TeamViewer and AnyDesk. Its core value proposition is built on four pillars: fully open-source, self-hostable, secure, and cross-platform.
Problems it solves:
- TeamViewer requires paid subscriptions for commercial use
- Remote control software often carries security risks
- Data typically passes through third-party servers
- Feature limitations in free tiers
Ideal use cases:
- Remote work and telecommuting
- Technical support and helpdesk
- Family remote assistance
- Enterprise internal IT operations
2. Technical Architecture
Tech Stack:
- Language: Rust (core)
- UI Framework: Flutter / Tauri
- Video Encoding: H264/H265/VP8/VP9
- Audio Encoding: Opus
- Network Protocol: TCP/UDP + custom protocol
- Encryption: TLS 1.3 + Ed25519
Architecture highlights:
1. Rust guarantees memory safety
2. P2P direct connection for low latency
3. Self-hosted relay server support
4. End-to-end encryption
Core Components:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ RustDesk Client โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ่ง้ขๆ่ท โ ็ผ็ โ ็ฝ็ปไผ ่พ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ IDๆๅกๅจ โ ไธญ็ปงๆๅกๅจ โ ไฟกไปค โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3. Core Features
3.1 Remote Desktop
Basic Features
# Connection methods
- ID + Password connection
- Direct IP connection
- Group connection
Display settings
- Adaptive resolution
- Quality adjustment (Low/Medium/High/Best)
- Frame rate control (10-60fps)
- Fullscreen mode
Advanced Features
# Multi-monitor support
- Switch monitor
- Merge monitors
- Single monitor mode
Performance optimization
- Hardware encoding (GPU)
- Adaptive bitrate
- Network congestion control
3.2 File Transfer
Transfer Features
# File management
- Drag-and-drop transfer
- Batch transfer
- Resume broken transfers
- Transfer history
Clipboard sync
- Text copy/paste
- Image transfer
- File path sync
3.3 Remote Control
Permission Control
# Permission levels
- View only
- Keyboard and mouse control
- Full control
- Custom permissions
Security settings
- Password protection
- IP whitelist
- Connection logs
- Session recording
3.4 Cross-Platform Support
Supported Platforms
Desktop:
- Windows 7/8/10/11
- macOS 10.15+
- Linux (Ubuntu/Debian/CentOS/Arch)
Mobile:
- Android 5.0+
- iOS 12.0+
Web:
- WebRTC version (experimental)
4. Deployment Guide
Option 1: Using the Official Server
# The simplest way to get started
1. Download and install the client
https://rustdesk.com/download
2. Get your ID and password
- Open RustDesk
- Check the left panel for your ID
- Set a password
3. Connect to another device
- Enter the other party's ID
- Enter the password
- Start remote control
Pros
- No server configuration needed
- Global acceleration
- Free to use
Cons
- Data passes through official servers
- Not suitable for enterprise use
Option 2: Self-Hosted Server (Recommended)
1. Server Requirements
Hardware:
- CPU: 2 cores+
- RAM: 2GB+
- Disk: 20GB+
- Bandwidth: 10Mbps+
Software:
- Linux (Ubuntu 20.04+ recommended)
- Docker (optional)
Ports:
- 21115: NAT type test
- 21116: TCP hole punching
- 21116: UDP heartbeat
- 21117: Relay
- 21118: WebSocket
- 21119: WebSocket
2. Docker Deployment
# Create directory
mkdir -p /opt/rustdesk-server
cd /opt/rustdesk-server
Create docker-compose.yml
cat > docker-compose.yml << 'EOF'
version: "3"
services:
hbbs:
image: rustdesk/rustdesk-server:latest
container_name: rustdesk-hbbs
command: hbbs
restart: always
volumes:
- ./data:/root
network_mode: host
hbbr:
image: rustdesk/rustdesk-server:latest
container_name: rustdesk-hbbr
command: hbbr
restart: always
volumes:
- ./data:/root
network_mode: host
EOF
Start services
docker-compose up -d
View logs
docker-compose logs -f
Get public key
cat ./data/id_ed25519.pub
3. Configure Firewall
# UFW
sudo ufw allow 21115:21119/tcp
sudo ufw allow 21116/udp
iptables
sudo iptables -A INPUT -p tcp --dport 21115:21119 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 21116 -j ACCEPT
Cloud security group
Add rules:
- TCP 21115-21119
- UDP 21116
4. Client Configuration
# Method 1: ID server settings
1. Open RustDesk
2. Click "ID/Relay Server" on the left
3. Enter:
ID Server: your-server.com
Relay Server: your-server.com
API Server: (leave empty)
Key: (paste public key)
Method 2: Command line configuration
Windows
"C:\Program Files\RustDesk\rustdesk.exe" --server your-server.com --key your-public-key
Linux
rustdesk --server your-server.com --key your-public-key
macOS
/Applications/RustDesk.app/Contents/MacOS/rustdesk --server your-server.com --key your-public-key
Option 3: Build from Source
1. Install Rust
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Verify
rustc --version
2. Clone the Repository
git clone https://github.com/rustdesk/rustdesk.git
cd rustdesk
3. Install Dependencies
# Ubuntu/Debian
sudo apt install ca-certificates libasound2 libatk1.0-0 libc6 libgcc1 libglib2.0-0 libgtk-3-0 libpam0g libpulse0 libva2 libvpx6 libx11-6 libxext6 libxfixes3 libxrandr2 libxrender1 libxtst6 pam-runtime
Fedora
sudo dnf install alsa-lib-devel atk-devel cairo-devel clang cups-devel git gtk3-devel libXtst-devel libappindicator-gtk3-devel libappindicatorx-devel libclang-devel llvm-devel openssl-devel pango-devel pam-devel pkg-config rust vpx-devel
4. Build
# Build server
cargo build --release --bin hbbs
cargo build --release --bin hbbr
Build client (requires Flutter)
flutter build linux
flutter build windows
flutter build macos
5. Comparison with Alternatives
| Feature | RustDesk | TeamViewer | AnyDesk | Chrome Remote Desktop |
|---------|----------|------------|---------|----------------------|
| Open Source | Yes | No | No | No |
| Self-Hosted Server | Yes | No | No | No |
| Free for Commercial Use | Yes | No (paid plans) | Limited | Yes |
| End-to-End Encryption | Yes (TLS 1.3) | Yes | Yes | Yes |
| File Transfer | Yes | Yes | Yes | Limited |
| Multi-Monitor Support | Yes | Yes | Yes | No |
| Session Recording | Yes | Yes (paid) | Yes (paid) | No |
| Cross-Platform | Windows, macOS, Linux, Android, iOS | Windows, macOS, Linux, Android, iOS | Windows, macOS, Linux, Android, iOS | Chrome OS, Windows, macOS, Linux |
| Mobile Remote Control | Yes | Yes | Yes | Limited |
6. Common Issues & Troubleshooting
Issue 1: Cannot Connect to Server
# Troubleshooting steps
1. Check network connectivity
ping your-server.com
telnet your-server.com 21116
2. Check firewall rules
sudo ufw status
sudo netstat -tlnp | grep 2111
3. Check service status
docker ps
docker logs rustdesk-hbbs
4. Verify public key
The client and server public keys must match
5. Test connection
rustdesk --test-connection your-server.com
Issue 2: Screen Lag or Stuttering
# Solutions
1. Lower the quality
Settings -> Display -> Quality: Low
2. Reduce frame rate
Settings -> Display -> Frame rate: 15fps
3. Check bandwidth
Bandwidth should be at least 2Mbps
4. Enable hardware encoding
Settings -> Display -> H264/GPU
5. Disable unnecessary effects
Settings -> Display -> Turn off animations
Issue 3: Audio Not Working
# Solutions
1. Check audio device
Settings -> Audio -> Select the correct device
2. Update drivers
Windows: Update sound card drivers
Linux: Install pulseaudio
3. Check permissions
Linux: Add user to the audio group
macOS: Allow microphone access
4. Restart audio service
pulseaudio -k
pulseaudio --start
Issue 4: File Transfer Fails
# Solutions
1. Check available disk space on the remote machine
2. Verify write permissions on the target directory
3. Ensure the connection is stable (check for relay vs P2P)
4. Try smaller files first to isolate the issue
5. Restart the RustDesk client on both ends
Issue 5: High CPU Usage on Server
# Solutions
1. Increase server resources (CPU/RAM)
2. Limit concurrent connections
3. Enable connection limits in config.toml
4. Use a dedicated server (avoid shared hosting)
5. Monitor with: docker stats rustdesk-hbbs rustdesk-hbbr
7. FAQ
Q1: Is RustDesk really free for commercial use?
Yes. RustDesk is licensed under GPL-3.0 and is completely free for both personal and commercial use. You can self-host your own server for maximum privacy and control.
Q2: Can I use RustDesk without an internet connection?
Yes, if both devices are on the same local network, you can connect using direct IP. For remote connections over the internet, you'll need either the public RustDesk server or your own self-hosted server.
Q3: How secure is RustDesk?
RustDesk uses TLS 1.3 for transport encryption and Ed25519 for key exchange. All sessions are end-to-end encrypted. When self-hosting, no data ever passes through third-party servers.
Q4: Does RustDesk support unattended access?
Yes. You can set a permanent password in Settings -> Security, enable "Start on boot" in Settings -> General, and enable "Run in background" for always-on access.
Q5: Can I run multiple RustDesk servers for load balancing?
While RustDesk doesn't have built-in load balancing, you can deploy multiple relay servers and configure clients to use different servers. This is useful for organizations with geographically distributed teams.
Q6: What's the difference between hbbs and hbbr?
hbbs (heartbeat server) handles ID registration, connection signaling, and NAT traversal. hbbr (relay server) handles traffic relay when P2P connection fails. Both are required for a fully functional self-hosted setup.
8. Who Should Use This?
RustDesk is ideal for:
- Individual users needing free remote desktop access
- Small to medium businesses looking to cut software costs
- Privacy-conscious users who want full control over their data
- IT teams that need self-hosted infrastructure
- Open-source enthusiasts and developers
RustDesk may not be ideal for:
- Large-scale enterprise deployments requiring dedicated support
- Organizations needing advanced RBAC and audit compliance
- Teams requiring complex permission management systems
- Users who need an entirely plug-and-play solution without any configuration
Verdict
RustDesk is a powerful, secure, and genuinely free open-source remote desktop solution. It delivers all the core functionality of TeamViewer without the subscription fees or privacy trade-offs. The self-hosting capability makes it particularly attractive for businesses that need complete data sovereignty.
For anyone who relies on remote desktop software โ whether for work, tech support, or helping family members โ RustDesk is a must-try, especially if you value privacy and want to escape the recurring costs of commercial alternatives.
GitHub Repository: https://github.com/rustdesk/rustdesk
Comments (0)
No comments yet. Be the first to comment!