can you guide me up on setting up s self-hosted instance of rustdesk on windows?
- User
can you guide me up on setting up s self-hosted instance of rustdesk on windows?
- Assistant
can you guide me up on setting up s self-hosted instance of rustdesk on windows?
Certainly! Setting up a self-hosted instance of RustDesk on Windows involves several steps, including downloading RustDesk, setting up the necessary server components (such as the Relay and Rendezvous servers), configuring them, and ensuring that your network settings allow for proper communication. Below is a comprehensive guide to help you through the process.
Before you begin, ensure you have the following:
Official Website: Visit the RustDesk official website to download the latest version.
Download Client: For Windows, download the rustdesk-<version>-x86_64.exe installer.
Download Server Components: RustDesk provides server components that you'll need to set up. You can find them on the RustDesk GitHub repository.
hbbs.exe.hbbs.exe.Note: Ensure you're downloading the latest stable releases to avoid compatibility issues.
RustDesk requires two main server components:
The Rendezvous Server is responsible for bridging the clients together, especially when they are behind NATs or firewalls.
Steps:
Download hbbr.exe: This is the Rendezvous Server executable. You can find it in the RustDesk Releases section.
Create a Directory for the Server: For example, C:\RustDesk\Server.
Place hbbr.exe: Move the downloaded hbbr.exe into the server directory.
Configure the Server:
hbbr.json file in the server directory with the following content:
{
"listen": "0.0.0.0:21115",
"public_addr": "your.domain.com:21115",
"short_id": 1,
"allow_non_tls": true
}
your.domain.com with your server's domain or IP address.Run the Rendezvous Server:
cd C:\RustDesk\Server
hbbr.exe -c hbbr.json
hbbr.exe --listen 0.0.0.0:21115 --public_addr your.domain.com:21115
The Relay Server handles the actual data transmission between connected clients.
Steps:
Download hbbs.exe: This is the Relay Server executable. Available in the RustDesk Releases.
Place hbbs.exe: Move hbbs.exe into the same server directory (e.g., C:\RustDesk\Server).
Create a Password:
Configure the Relay Server:
hbbs.json file with the following content:
{
"listen": "0.0.0.0:21116",
"public_addr": "your.domain.com:21116",
"password": "your_secure_password",
"tls": {
"cert": "path_to_cert.pem",
"key": "path_to_key.pem"
}
}
your.domain.com with your server's domain or IP address."your_secure_password" with the password you generated."allow_non_tls": true to run without TLS (not recommended for production).Run the Relay Server:
hbbs.exe -c hbbs.json
hbbs.exe --listen 0.0.0.0:21116 --public_addr your.domain.com:21116 --password your_secure_password
Optional: Setting Up TLS
For secure connections, it's advisable to use TLS certificates.
Obtain SSL Certificates:
Configure the Relay Server with TLS:
hbbs.json points to the correct certificate and key files.Example hbbs.json with TLS:
{
"listen": "0.0.0.0:21116",
"public_addr": "your.domain.com:21116",
"password": "your_secure_password",
"tls": {
"cert": "C:\\RustDesk\\Server\\cert.pem",
"key": "C:\\RustDesk\\Server\\key.pem"
}
}
To ensure that your servers run continuously without needing to keep the Command Prompt open, consider using tools like NSSM (Non-Sucking Service Manager) to set up hbbr.exe and hbbs.exe as Windows services.
Download NSSM: nssm.cc
Install Services:
hbbr:
nssm install RustDesk-Rendezvous "C:\RustDesk\Server\hbbr.exe" -c "C:\RustDesk\Server\hbbr.json"
hbbs:
nssm install RustDesk-Relay "C:\RustDesk\Server\hbbs.exe" -c "C:\RustDesk\Server\hbbs.json"
Start Services:
services.msc) to start and manage your newly created services.Once your servers are up and running, you need to configure RustDesk clients to use your self-hosted servers instead of the default RustDesk servers.
Steps:
Open RustDesk Client on your Windows machine.
Access Settings:
Configure Direct Connections:
your.domain.com:21115).your.domain.com:21116).hbbs.json.Save Settings: Apply and save your configurations.
Optional - Set as Default:
Note: If you're managing multiple clients, consider deploying these settings via scripts or group policies for consistency.
To allow external connections to your RustDesk servers, you need to configure your Windows Firewall and, if applicable, your router's port forwarding.
Steps:
Open Ports in Windows Firewall:
21115 (default)21116 (default)How to Open Ports:
21115, 21116).RustDesk Ports) and finish.Configure Router for Port Forwarding (if hosting behind a NAT):
192.168.1.1 or similar).21115 and 21116 to the internal IP address of your Windows server.Verify Ports are Open:
Test-NetConnection -ComputerName your.domain.com -Port 21115
Test-NetConnection -ComputerName your.domain.com -Port 21116
Security Considerations:
After configuring both the server and client, perform the following tests to ensure everything is functioning correctly.
Check Server Status:
hbbr.exe and hbbs.exe are running without errors.Connect a Client:
Initiate Remote Desktop Session:
Monitor Traffic:
RustDesk GitHub Repository: https://github.com/rustdesk/rustdesk
RustDesk Server Documentation: Self-Hosted Server Guide
Community Support:
Following this guide should help you successfully set up a self-hosted RustDesk instance on your Windows machine. Ensure you maintain the server by keeping software updated and regularly reviewing security settings. If you encounter any issues, refer to the RustDesk community or documentation for assistance.
Not yet included in a published release.