Configuring your RustDesk clients to connect to your self-hosted server is crucial for enhanced security and control. This guide focuses on setting up your RustDesk Windows clients, specifically addressing the importance and configuration of the server key. We’ll explore various methods to ensure your RustDesk deployment is securely connected to your private server.
Understanding the RustDesk Server Key
When you operate your own RustDesk server, security becomes paramount. The server key, specifically the public key, acts as a critical component in establishing encrypted and secure connections between your RustDesk clients and your self-hosted server. This key is generated when you first launch hbbs
, the RustDesk ID/ rendezvous server, and is stored in the id_ed25519.pub
file within your server’s working directory or data folder.
Think of the server key as a digital certificate that verifies the authenticity of your server to your RustDesk clients. Without correctly configuring this key on your clients, they won’t be able to establish a secure, encrypted connection to your private RustDesk infrastructure.
This guide will walk you through different methods to configure your RustDesk Windows client with your server key, ensuring secure and reliable remote access.
Methods to Configure RustDesk Clients with your Server Key
There are several approaches to configure your RustDesk clients to utilize your self-hosted server and its associated key. Let’s explore each method in detail:
1. Manual Configuration within the RustDesk Client
This method is straightforward and suitable for configuring individual Windows clients.
-
Access Network Settings: Open your RustDesk client on your Windows machine. Locate the menu button [ ⋮ ] usually found in the top right corner next to your RustDesk ID. Click on it and select “Network” from the dropdown menu.
This image shows the Network settings menu in the RustDesk client, highlighting the location to input server details.
-
Unlock Settings: To modify the network settings, you’ll need elevated privileges. Click the “Unlock Settings” button. You might be prompted for administrator credentials.
-
Enter Server Address: In the “ID Server” input box, enter the hostname or IP address of your
hbbs
server. This tells your RustDesk client where to find your self-hosted server for ID registration and connection brokering.For example:
hbbs.yourdomain.com
or if
hbbs
is running on a specific port (non-default 21116):hbbs.yourdomain.com:21116
Leave the “Relay Server” and “API Server” fields blank for now unless you have specific configurations for
hbbr
and the API server (Pro version). RustDesk can often automatically deduce these if they are running on standard ports and the same domain. -
Set the Server Key: This is the crucial step for secure connections. Locate the “Key” input box. You need to paste the public key from your
hbbs
server’sid_ed25519.pub
file here.Obtaining the Server Key:
- Access your server: Connect to your Windows server where
hbbs
is running. - Locate the key file: Navigate to the directory where you launched
hbbs
or the data folder you specified. Find the file namedid_ed25519.pub
. - Copy the key: Open
id_ed25519.pub
with a text editor and copy the entire content of the file. This is your public key. - Paste into RustDesk Client: Go back to your RustDesk client’s network settings and paste the copied key into the “Key” input box.
- Access your server: Connect to your Windows server where
-
Apply Settings: Click “Apply” to save the network configuration. Your RustDesk client should now attempt to connect to your self-hosted server using the provided key.
2. Utilizing the Custom Client Generator (Pro Feature)
For RustDesk Pro users, the custom client generator offers a more streamlined and branded approach for deployment. This feature allows you to create customized RustDesk clients pre-configured with your server settings, including the key.
-
Access the Web Console: Log in to your RustDesk Pro web console.
-
Navigate to Custom Client: Look for the “Custom Client” or similar section within the console.
-
Configure Custom Client: Here, you can customize various aspects of your client, such as:
- Branding: Set your own application name, logo, and icon.
- Default Settings: Pre-configure server addresses (ID Server, Relay Server, API Server), and importantly, the Server Key.
This image from the RustDesk Pro web console shows the custom client configuration interface, highlighting branding and server settings.
-
Generate Client: After configuring your desired settings, generate the custom client package for Windows (X64 is currently supported).
-
Deploy Custom Client: Distribute this custom-generated RustDesk client to your Windows users. These clients will be pre-configured to connect to your server with the embedded server key, simplifying deployment and ensuring consistent settings.
3. Import/Export Configuration for Multiple Clients
If you need to configure multiple Windows clients, exporting the configuration from one correctly set up client and importing it to others can save time.
-
Configure One Client Manually: Follow the steps in “Manual Configuration” (Method 1) to correctly configure one RustDesk client with your server address and key.
-
Export Configuration: On this configured client, go to “Settings” -> “Network” and unlock the settings. Click on “Export Server Config”. This will copy a configuration string to your clipboard.
-
Prepare Configuration String: Paste the copied string into a text editor like Notepad. You can save this for future use or directly copy it again for the next step.
-
Import Configuration on New Clients: On each new Windows client you want to configure, go to “Settings” -> “Network”, unlock settings, and click “Import Server Config”. The configuration string from your clipboard will be automatically pasted.
-
Apply Settings: Click “Apply” on each client. They will now be configured with the same server settings and key as the exported client.
4. Automated Configuration via Deployment Scripts
For larger deployments, utilizing deployment scripts is the most efficient method. RustDesk provides scripts that can automate the configuration process, including setting the server key.
-
Access Deployment Scripts: Find the deployment scripts provided by RustDesk (linked in the original article and readily available on the RustDesk documentation or GitHub repository).
-
Customize Scripts: Adapt the scripts to include your
hbbs
server address and, crucially, the server key. The scripts often allow you to set these parameters as variables. -
Deploy Scripts: Use your preferred deployment method (e.g., Group Policy, SCCM, Intune, or other scripting tools) to run these scripts on your target Windows machines. The scripts will automatically configure the RustDesk clients on these machines with the specified server settings and key.
5. Importing Configuration from Pro Web Console via Clipboard
RustDesk Pro offers a convenient way to retrieve the configuration string directly from the web console.
-
Access Pro Web Console: Log in to your RustDesk Pro web console.
-
Locate Configuration String: On the main dashboard or client management area, you should find an option to copy the client configuration string (often displayed with “Config:” label as shown in the image below).
This image from the RustDesk Pro console shows the location of the client configuration string that can be copied to the clipboard.
-
Copy Configuration String: Copy this string to your clipboard.
-
Import to Client: On your Windows RustDesk client, follow steps 4-5 from the “Import/Export Configuration” method: Go to “Settings” -> “Network”, unlock, “Import Server Config”, and “Apply”.
6. Command Line Configuration using --config
For advanced users or scripting scenarios, you can configure RustDesk using the command line with the --config
parameter.
-
Obtain Configuration String: You can get the configuration string from the Pro web console (as described in Method 5) or by exporting it from a configured RustDesk client (Method 3).
-
Run RustDesk with
--config
: Open Command Prompt or PowerShell and run RustDesk with the--config
flag followed by your configuration string.rustdesk.exe --config <your_config_string>
This command will launch RustDesk with the provided configuration, including the server key. You can incorporate this command into scripts or startup procedures for automated configuration.
Ensuring Secure Connection with the Server Key
Regardless of the configuration method you choose, verifying that the server key is correctly applied is vital for a secure RustDesk environment. After configuring your client, you should:
- Test the Connection: Attempt to connect to another device through your self-hosted RustDesk server. A successful connection indicates that the server key is likely configured correctly and encryption is in place.
- Verify Key in Settings: Double-check the “Network” settings in your RustDesk client after applying the configuration to ensure the “Key” field is populated with your server’s public key.
By correctly configuring the RustDesk server key on your Windows clients, you establish a secure and encrypted remote access solution, protecting your data and ensuring the privacy of your remote sessions. Choose the method that best suits your deployment scale and technical environment to effectively manage your RustDesk server key configuration.