doc.rustdesk.com/content/self-host/client-configuration/_index.en.md

102 lines
5.2 KiB
Markdown
Raw Normal View History

2023-08-28 22:05:14 +02:00
---
2023-08-29 05:37:35 +02:00
title: Client Configuration
weight: 300
2023-08-29 05:45:11 +02:00
pre: "<b>2.3. </b>"
2023-08-28 22:05:14 +02:00
---
### Overview
2023-10-01 13:51:00 +02:00
There are a number of ways to configure RustDesk Clients to use your own self-hosted server, we will cover some below.
2023-08-28 22:05:14 +02:00
2024-02-09 21:33:28 +01:00
### 1. Manual Config
2023-08-28 22:05:14 +02:00
2023-09-05 00:01:31 +02:00
In the main RustDesk Client home click on the Menu button [ &#8942; ] next to your ID then click on Network, you can now unlock the settings using elevated privileges and set your ID, Relay, API and Keys.
2023-08-28 22:05:14 +02:00
2023-10-21 21:49:28 +02:00
![](/docs/en/self-host/client-configuration/images/network-config.png)
2023-08-28 22:15:42 +02:00
2023-08-29 05:37:35 +02:00
Enter the `hbbs` host or IP Address in the **ID Server** input box (local side + remote side). The other two addresses can be left blank, RustDesk will automatically deduce (if not specially set), and the Relay Server refers to `hbbr` (port 21117).
e.g.
```nolang
hbbs.example.com
```
or
```nolang
hbbs.example.com:21116
```
2023-11-23 10:37:44 +01:00
#### Set `Key`
2023-10-20 19:39:38 +02:00
2023-10-20 19:41:31 +02:00
As a `Pro` user you will be able to retrieve the `Key` from the [web console](https://rustdesk.com/docs/en/self-host/rustdesk-server-pro/console/), or you can find it in `id_ed25519.pub` file under your working directory.
2023-10-20 14:27:45 +02:00
![](/docs/en/self-host/rustdesk-server-pro/console/images/console-home.png?v2)
2023-10-11 14:19:24 +02:00
2023-11-23 10:37:44 +01:00
#### Set `API Server`
2023-10-21 21:49:28 +02:00
This is for `Pro` user only. When you can log in on web console, but fail to log in on RustDesk client, it probably you have not set `API Server` correctly.
2023-10-20 19:32:50 +02:00
2023-10-21 22:05:19 +02:00
If your API Server does not run on default `21114` port, please specify `API Server` explicitly.
e.g. your API Server runs on default https port, please specify `API Server` with `https://hbbs.example.com`.
2023-10-20 19:32:50 +02:00
2023-10-21 22:05:19 +02:00
If you still can not confirm the value of `API Server`, please go to the welcome page of web console, the `API Server` is shown in above picture (The input box with `API:` label).
2023-10-20 19:32:50 +02:00
2024-02-09 21:33:28 +01:00
### 2. Setup Using Import or Export
2023-08-30 13:25:28 +02:00
2023-10-21 21:49:28 +02:00
1. Use the steps [above](https://rustdesk.com/docs/en/self-host/client-configuration/#manual-config) to configure RustDesk Client on a Device.
2023-09-05 00:01:31 +02:00
2. Using the above machine go to Settings then Network and unlock.
3. Click on `Export Server Config`.
4. Paste the copied string into Notepad or similar.
5. Go to new client, copy the above to clipboard.
6. Go to Settings then Network in RustDesk Client, unlock and click `Import Server Config`.
7. It will automatically paste the settings in.
8. Click `Apply`.
2023-08-29 05:37:35 +02:00
2024-02-09 21:33:28 +01:00
### 3. Automatic Config
2023-08-28 22:32:32 +02:00
2023-08-31 21:56:30 +02:00
The easiest way to setup automatically is using deployment scripts found [here](https://rustdesk.com/docs/en/self-host/client-deployment/).
2023-08-28 22:32:32 +02:00
2023-09-05 00:01:31 +02:00
You can fix the Password is required and use a reverse Base64 string in the format `{"host":"HOSTADDRESS","key":"HOSTKEY","api":"http://HOSTADDRESS:21114"}` to automatically configure the clients, this is available automatically with RustDesk Server Pro via the console.
2023-08-30 13:25:28 +02:00
2023-10-21 21:49:28 +02:00
You can also use the steps from [above](https://rustdesk.com/docs/en/self-host/client-configuration/#setup-using-import-or-export) to export the string, remove any `=` at the start or end of the string. Restart RustDesk Client if settings don't show.
2023-08-28 22:32:32 +02:00
2024-02-09 21:33:28 +01:00
### 4. Put config in rustdesk.exe file name (Windows only)
2023-08-28 22:32:32 +02:00
2023-08-29 05:37:35 +02:00
Change `rustdesk.exe` to rustdesk-`host=<host-ip-or-name>,key=<public-key-string>`.exe, e.g. rustdesk-`host=192.168.1.137,key=xfdsfsd32=32`.exe. You can see the config result in the About Window below.
2023-08-28 22:32:32 +02:00
2023-10-20 14:30:30 +02:00
As a `Pro` user you will be able to retrieve the whole encrypted string from the [web console](https://rustdesk.com/docs/en/self-host/rustdesk-server-pro/console/) then download and rename the RustDesk Client exe, you can upload this somewhere easy for your customers to use.
2023-09-14 16:11:17 +02:00
2023-10-20 14:22:07 +02:00
![](/docs/en/self-host/rustdesk-server-pro/console/images/console-home.png?v2)
2023-08-29 05:37:35 +02:00
<a name="invalidchar"></a>
{{% notice note %}}
You need to set both `host` and `key`, missing either one will not work.
2023-08-28 22:32:32 +02:00
2024-02-22 16:53:24 +01:00
Optionally add a `,` (comma) character after the key, before the `.exe` part as a delimiter, to avoid the key being mangled if Windows or the browser renames the file when downloading duplicated names. e.g. `host=<host-ip-or-name>,key=<public-key-string>,.exe`
2023-08-28 22:32:32 +02:00
2023-08-29 05:37:35 +02:00
If there are invalid characters in the key which can not be used in a Windows file name, please remove the
`id_ed25519` file from your server and restart `hbbs`/`hbbr`. This will cause the `id_ed25519.pub` file to regenerate. You may need to
repeat this process until you get valid characters.
{{% /notice %}}
2023-08-28 22:32:32 +02:00
2024-02-22 17:02:29 +01:00
#### Embrase config string with `--` in the name
2023-11-29 14:52:32 +01:00
2024-02-22 17:02:29 +01:00
Example: `rustdesk--{config string}--.exe`
2024-02-22 16:07:44 +01:00
{{% notice note %}}
2024-02-22 17:02:29 +01:00
Please do not use `-licensed-` together with `--`. e.g. `rustdesk-licensed-{config string}--.exe` does not work in 1.2.3. We will fix it in 1.2.4.
2024-02-22 16:07:44 +01:00
{{% /notice %}}
2023-11-29 14:52:32 +01:00
We have noticed that in some cases, when double downloaded, something like `copy (1)` is added to the end of the file name, and this ruins the config.
2024-02-09 21:33:28 +01:00
By adding `--` at the end right after our config string, even if something is added to the file name, it won't corrupt the config string, and RustDesk will correctly retrieve it.
2023-11-29 14:52:32 +01:00
2024-02-09 21:33:28 +01:00
### 5. [Hardcoding Custom Settings](https://rustdesk.com/docs/en/self-host/client-configuration/hardcode-settings/)
2023-10-20 14:19:23 +02:00
2024-02-17 21:48:54 +01:00
### 6. Use command line `--config`
2024-02-17 04:46:35 +01:00
`rustdesk.exe --config <config-string>`
2023-09-12 23:29:54 +02:00
2024-02-17 21:48:54 +01:00
You can get the config string from web console (you can see it on above picture) or from RustDesk client "Settings → Network" ([here](https://github.com/rustdesk/rustdesk/discussions/7118) is a discussion about this).