Install RustDesk Server (Hbbs & Hbbr)
RustDesk has two main components:
- Hbbs (ID Server)
- Hbbr (Relay Server)
🔹 On Ubuntu / Debian
1️⃣ Update your system:
sudo apt update && sudo apt upgrade -y
2️⃣ Download RustDesk Server binaries:
wget <https://github.com/rustdesk/rustdesk/releases/latest/download/rustdesk-server-linux-amd64.zip>
3️⃣ Extract the files:
sudo apt install unzip -y
unzip rustdesk-server-linux-amd64.zip
cd rustdesk-server-linux-amd64
4️⃣ Start the RustDesk server:
sudo ./hbbs &
sudo ./hbbr &
🔹 On Windows Server
1️⃣ Download RustDesk Server from GitHub: https://github.com/rustdesk/rustdesk/releases
2️⃣ Extract the ZIP file to C:\\RustDesk-Server
3️⃣ Open PowerShell as Administrator and navigate to the folder:
cd C:\\RustDesk-Server
4️⃣ Run the ID Server (Hbbs) and Relay Server (Hbbr):
./hbbs.exe
./hbbr.exe
Step 3: Configure Firewall Rules
For RustDesk to function properly, allow these ports:
- UDP & TCP 21115-21119 (ID Server and Relay)
Ubuntu/Linux:
sudo ufw allow 21115:21119/tcp
sudo ufw allow 21115:21119/udp
sudo ufw enable
Windows Server:
New-NetFirewallRule -DisplayName "RustDesk Ports" -Direction Inbound -Protocol TCP -LocalPort 21115-21119 -Action Allow
New-NetFirewallRule -DisplayName "RustDesk Ports" -Direction Inbound -Protocol UDP -LocalPort 21115-21119 -Action Allow
Step 4: Configure RustDesk Clients to Use Your Server
To use your self-hosted server, configure RustDesk clients manually:
- Open RustDesk
- Go to Settings > Network
- Enter your Server IP in the ID Server and Relay Server fields
- Click OK
Alternatively, deploy RustDesk with the correct config automatically:
- Windows:
msiexec /i rustdesk.msi ID_SERVER=your_server_ip RELAY_SERVER=your_server_ip /qn
- Linux:
echo -e "[network]\\nid_server=your_server_ip
relay_server=your_server_ip" > ~/.config/rustdesk/RustDesk.toml
Troubleshooting & Common Issues
❌ RustDesk Clients Cannot Connect
✅ Check if the server is running:
ps aux | grep hbbs
ps aux | grep hbbr
If not running, restart them.
✅ Check if firewall ports are open:
sudo ufw status
Ensure ports 21115-21119 are allowed.
✅ Verify server logs:
tail -f /var/log/syslog
❌ RustDesk Clients Show Wrong ID
✅ Ensure clients are set to your correct server IP.
❌ RustDesk Disconnects Frequently
✅ Use a stable internet connection and ensure no double NAT or VPN issues.
Conclusion
Setting up a self-hosted RustDesk server enhances security and privacy by giving you full control over remote access. Once configured, you can mass-deploy it across your organization, ensuring all users connect through your private server.
Happy remote accessing! 🚀
Leave a Reply