|
|
@@ -179,44 +179,50 @@ logger:
|
|
179
|
179
|
proxy:
|
|
180
|
180
|
enable: false
|
|
181
|
181
|
host: ""
|
|
|
182
|
+jwt:
|
|
|
183
|
+ key: ""
|
|
|
184
|
+ expire-duration: 360000
|
|
182
|
185
|
```
|
|
183
|
186
|
|
|
184
|
187
|
### Environment Variables
|
|
185
|
188
|
The prefix for variable names is `RUSTDESK_API`. If environment variables exist, they will override the configurations in the configuration file.
|
|
186
|
189
|
|
|
187
|
|
-| Variable Name | Description | Example |
|
|
188
|
|
-|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------|-------------------------------|
|
|
189
|
|
-| TZ | timezone | Asia/Shanghai |
|
|
190
|
|
-| RUSTDESK_API_LANG | Language | `en`,`zh-CN` |
|
|
191
|
|
-| RUSTDESK_API_APP_WEB_CLIENT | web client on/off; 1: on, 0 off, default: 1 | 1 |
|
|
192
|
|
-| RUSTDESK_API_APP_REGISTER | register enable; `true`, `false`; default:`false` | `false` |
|
|
193
|
|
-| RUSTDESK_API_APP_SHOW_SWAGGER | swagger visible; 1: yes, 0: no; default: 0 | `0` |
|
|
194
|
|
-| ----- ADMIN Configuration----- | ---------- | ---------- |
|
|
195
|
|
-| RUSTDESK_API_ADMIN_TITLE | Admin Title | `RustDesk Api Admin` |
|
|
196
|
|
-| RUSTDESK_API_ADMIN_HELLO | Admin welcome message, you can use `html` | |
|
|
197
|
|
-| RUSTDESK_API_ADMIN_HELLO_FILE | Admin welcome message file,<br>will override `RUSTDESK_API_ADMIN_HELLO` | `./conf/admin/hello.html` |
|
|
198
|
|
-| ----- GIN Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
199
|
|
-| RUSTDESK_API_GIN_TRUST_PROXY | Trusted proxy IPs, separated by commas. | 192.168.1.2,192.168.1.3 |
|
|
200
|
|
-| ----- GORM Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
201
|
|
-| RUSTDESK_API_GORM_TYPE | Database type (`sqlite` or `mysql`). Default is `sqlite`. | sqlite |
|
|
202
|
|
-| RUSTDESK_API_GORM_MAX_IDLE_CONNS | Maximum idle connections | 10 |
|
|
203
|
|
-| RUSTDESK_API_GORM_MAX_OPEN_CONNS | Maximum open connections | 100 |
|
|
204
|
|
-| RUSTDESK_API_RUSTDESK_PERSONAL | Open Personal Api 1:Enable,0:Disable | 1 |
|
|
205
|
|
-| ----- MYSQL Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
206
|
|
-| RUSTDESK_API_MYSQL_USERNAME | MySQL username | root |
|
|
207
|
|
-| RUSTDESK_API_MYSQL_PASSWORD | MySQL password | 111111 |
|
|
208
|
|
-| RUSTDESK_API_MYSQL_ADDR | MySQL address | 192.168.1.66:3306 |
|
|
209
|
|
-| RUSTDESK_API_MYSQL_DBNAME | MySQL database name | rustdesk |
|
|
210
|
|
-| ----- RUSTDESK Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
211
|
|
-| RUSTDESK_API_RUSTDESK_ID_SERVER | Rustdesk ID server address | 192.168.1.66:21116 |
|
|
212
|
|
-| RUSTDESK_API_RUSTDESK_RELAY_SERVER | Rustdesk relay server address | 192.168.1.66:21117 |
|
|
213
|
|
-| RUSTDESK_API_RUSTDESK_API_SERVER | Rustdesk API server address | http://192.168.1.66:21114 |
|
|
214
|
|
-| RUSTDESK_API_RUSTDESK_KEY | Rustdesk key | 123456789 |
|
|
215
|
|
-| RUSTDESK_API_RUSTDESK_KEY_FILE | Rustdesk key file | `./conf/data/id_ed25519.pub` |
|
|
216
|
|
-| RUSTDESK_API_RUSTDESK_WEBCLIENT_MAGIC_QUERYONLINE | New online query method is enabled in the web client v2; '1': Enabled, '0': Disabled, not enabled by default | `0` |
|
|
217
|
|
-| ---- PROXY ----- | --------------- | ---------- |
|
|
218
|
|
-| RUSTDESK_API_PROXY_ENABLE | proxy_enable :`false`, `true` | `false` |
|
|
219
|
|
-| RUSTDESK_API_PROXY_HOST | proxy_host | `http://127.0.0.1:1080` |
|
|
|
190
|
+| Variable Name | Description | Example |
|
|
|
191
|
+|---------------------------------------------------|--------------------------------------------------------------------------------------------------------------|-------------------------------|
|
|
|
192
|
+| TZ | timezone | Asia/Shanghai |
|
|
|
193
|
+| RUSTDESK_API_LANG | Language | `en`,`zh-CN` |
|
|
|
194
|
+| RUSTDESK_API_APP_WEB_CLIENT | web client on/off; 1: on, 0 off, default: 1 | 1 |
|
|
|
195
|
+| RUSTDESK_API_APP_REGISTER | register enable; `true`, `false`; default:`false` | `false` |
|
|
|
196
|
+| RUSTDESK_API_APP_SHOW_SWAGGER | swagger visible; 1: yes, 0: no; default: 0 | `0` |
|
|
|
197
|
+| ----- ADMIN Configuration----- | ---------- | ---------- |
|
|
|
198
|
+| RUSTDESK_API_ADMIN_TITLE | Admin Title | `RustDesk Api Admin` |
|
|
|
199
|
+| RUSTDESK_API_ADMIN_HELLO | Admin welcome message, you can use `html` | |
|
|
|
200
|
+| RUSTDESK_API_ADMIN_HELLO_FILE | Admin welcome message file,<br>will override `RUSTDESK_API_ADMIN_HELLO` | `./conf/admin/hello.html` |
|
|
|
201
|
+| ----- GIN Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
|
202
|
+| RUSTDESK_API_GIN_TRUST_PROXY | Trusted proxy IPs, separated by commas. | 192.168.1.2,192.168.1.3 |
|
|
|
203
|
+| ----- GORM Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
|
204
|
+| RUSTDESK_API_GORM_TYPE | Database type (`sqlite` or `mysql`). Default is `sqlite`. | sqlite |
|
|
|
205
|
+| RUSTDESK_API_GORM_MAX_IDLE_CONNS | Maximum idle connections | 10 |
|
|
|
206
|
+| RUSTDESK_API_GORM_MAX_OPEN_CONNS | Maximum open connections | 100 |
|
|
|
207
|
+| RUSTDESK_API_RUSTDESK_PERSONAL | Open Personal Api 1:Enable,0:Disable | 1 |
|
|
|
208
|
+| ----- MYSQL Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
|
209
|
+| RUSTDESK_API_MYSQL_USERNAME | MySQL username | root |
|
|
|
210
|
+| RUSTDESK_API_MYSQL_PASSWORD | MySQL password | 111111 |
|
|
|
211
|
+| RUSTDESK_API_MYSQL_ADDR | MySQL address | 192.168.1.66:3306 |
|
|
|
212
|
+| RUSTDESK_API_MYSQL_DBNAME | MySQL database name | rustdesk |
|
|
|
213
|
+| ----- RUSTDESK Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
|
214
|
+| RUSTDESK_API_RUSTDESK_ID_SERVER | Rustdesk ID server address | 192.168.1.66:21116 |
|
|
|
215
|
+| RUSTDESK_API_RUSTDESK_RELAY_SERVER | Rustdesk relay server address | 192.168.1.66:21117 |
|
|
|
216
|
+| RUSTDESK_API_RUSTDESK_API_SERVER | Rustdesk API server address | http://192.168.1.66:21114 |
|
|
|
217
|
+| RUSTDESK_API_RUSTDESK_KEY | Rustdesk key | 123456789 |
|
|
|
218
|
+| RUSTDESK_API_RUSTDESK_KEY_FILE | Rustdesk key file | `./conf/data/id_ed25519.pub` |
|
|
|
219
|
+| RUSTDESK_API_RUSTDESK_WEBCLIENT_MAGIC_QUERYONLINE | New online query method is enabled in the web client v2; '1': Enabled, '0': Disabled, not enabled by default | `0` |
|
|
|
220
|
+| ---- PROXY ----- | --------------- | ---------- |
|
|
|
221
|
+| RUSTDESK_API_PROXY_ENABLE | proxy_enable :`false`, `true` | `false` |
|
|
|
222
|
+| RUSTDESK_API_PROXY_HOST | proxy_host | `http://127.0.0.1:1080` |
|
|
|
223
|
+| ----JWT---- | -------- | -------- |
|
|
|
224
|
+| RUSTDESK_API_JWT_KEY | JWT KEY. Set empty to disable jwt | |
|
|
|
225
|
+| RUSTDESK_API_JWT_EXPIRE_DURATION | JWT expire duration | 360000 |
|
|
220
|
226
|
|
|
221
|
227
|
### Installation Steps
|
|
222
|
228
|
|
|
|
@@ -313,10 +319,11 @@ Download the release from [release](https://github.com/lejianwen/rustdesk-api/re
|
|
313
|
319
|
- RUSTDESK_API_RUSTDESK_ID_SERVER=<id_server[:21116]>
|
|
314
|
320
|
- RUSTDESK_API_RUSTDESK_RELAY_SERVER=<relay_server[:21117]>
|
|
315
|
321
|
- RUSTDESK_API_RUSTDESK_API_SERVER=http://<api_server[:21114]>
|
|
|
322
|
+ - RUSTDESK_API_KEY_FILE=/data/id_ed25519.pub
|
|
|
323
|
+ - RUSTDESK_API_JWT_KEY=xxxxxx # jwt key
|
|
316
|
324
|
volumes:
|
|
317
|
325
|
- /data/rustdesk/server:/data
|
|
318
|
326
|
- /data/rustdesk/api:/app/data #将数据库挂载
|
|
319
|
|
- - /data/rustdesk/server:/app/conf/data #挂载key文件到api容器,可以不用使用 RUSTDESK_API_RUSTDESK_KEY
|
|
320
|
327
|
networks:
|
|
321
|
328
|
- rustdesk-net
|
|
322
|
329
|
restart: unless-stopped
|