docs: Up readme

This commit is contained in:
lejianwen
2025-01-15 20:09:08 +08:00
parent edb095ab0b
commit cca191aad3
3 changed files with 50 additions and 36 deletions

View File

@@ -176,6 +176,9 @@ logger:
proxy: proxy:
enable: false enable: false
host: "" host: ""
jwt:
key: ""
expire-duration: 360000
``` ```
### 环境变量 ### 环境变量
@@ -214,6 +217,9 @@ proxy:
| ----PROXY配置----- | --------------- | ---------- | | ----PROXY配置----- | --------------- | ---------- |
| RUSTDESK_API_PROXY_ENABLE | 是否启用代理:`false`, `true` | `false` | | RUSTDESK_API_PROXY_ENABLE | 是否启用代理:`false`, `true` | `false` |
| RUSTDESK_API_PROXY_HOST | 代理地址 | `http://127.0.0.1:1080` | | RUSTDESK_API_PROXY_HOST | 代理地址 | `http://127.0.0.1:1080` |
| ----JWT配置---- | -------- | -------- |
| RUSTDESK_API_JWT_KEY | 自定义JWT KEY,为空则不启用JWT | |
| RUSTDESK_API_JWT_EXPIRE_DURATION | JWT有效时间 | 360000 |
### 运行 ### 运行
@@ -307,10 +313,11 @@ proxy:
- RUSTDESK_API_RUSTDESK_ID_SERVER=<id_server[:21116]> - RUSTDESK_API_RUSTDESK_ID_SERVER=<id_server[:21116]>
- RUSTDESK_API_RUSTDESK_RELAY_SERVER=<relay_server[:21117]> - RUSTDESK_API_RUSTDESK_RELAY_SERVER=<relay_server[:21117]>
- RUSTDESK_API_RUSTDESK_API_SERVER=http://<api_server[:21114]> - RUSTDESK_API_RUSTDESK_API_SERVER=http://<api_server[:21114]>
- RUSTDESK_API_KEY_FILE=/data/id_ed25519.pub
- RUSTDESK_API_JWT_KEY=xxxxxx # jwt key
volumes: volumes:
- /data/rustdesk/server:/data - /data/rustdesk/server:/data
- /data/rustdesk/api:/app/data #将数据库挂载 - /data/rustdesk/api:/app/data #将数据库挂载
- /data/rustdesk/server:/app/conf/data #挂载key文件到api容器可以不用使用 RUSTDESK_API_RUSTDESK_KEY
networks: networks:
- rustdesk-net - rustdesk-net
restart: unless-stopped restart: unless-stopped

View File

@@ -179,13 +179,16 @@ logger:
proxy: proxy:
enable: false enable: false
host: "" host: ""
jwt:
key: ""
expire-duration: 360000
``` ```
### Environment Variables ### Environment Variables
The prefix for variable names is `RUSTDESK_API`. If environment variables exist, they will override the configurations in the configuration file. The prefix for variable names is `RUSTDESK_API`. If environment variables exist, they will override the configurations in the configuration file.
| Variable Name | Description | Example | | Variable Name | Description | Example |
|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------|-------------------------------| |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------|-------------------------------|
| TZ | timezone | Asia/Shanghai | | TZ | timezone | Asia/Shanghai |
| RUSTDESK_API_LANG | Language | `en`,`zh-CN` | | RUSTDESK_API_LANG | Language | `en`,`zh-CN` |
| RUSTDESK_API_APP_WEB_CLIENT | web client on/off; 1: on, 0 off, default: 1 | 1 | | RUSTDESK_API_APP_WEB_CLIENT | web client on/off; 1: on, 0 off, default: 1 | 1 |
@@ -217,6 +220,9 @@ The prefix for variable names is `RUSTDESK_API`. If environment variables exist,
| ---- PROXY ----- | --------------- | ---------- | | ---- PROXY ----- | --------------- | ---------- |
| RUSTDESK_API_PROXY_ENABLE | proxy_enable :`false`, `true` | `false` | | RUSTDESK_API_PROXY_ENABLE | proxy_enable :`false`, `true` | `false` |
| RUSTDESK_API_PROXY_HOST | proxy_host | `http://127.0.0.1:1080` | | RUSTDESK_API_PROXY_HOST | proxy_host | `http://127.0.0.1:1080` |
| ----JWT---- | -------- | -------- |
| RUSTDESK_API_JWT_KEY | JWT KEY. Set empty to disable jwt | |
| RUSTDESK_API_JWT_EXPIRE_DURATION | JWT expire duration | 360000 |
### Installation Steps ### Installation Steps
@@ -313,10 +319,11 @@ Download the release from [release](https://github.com/lejianwen/rustdesk-api/re
- RUSTDESK_API_RUSTDESK_ID_SERVER=<id_server[:21116]> - RUSTDESK_API_RUSTDESK_ID_SERVER=<id_server[:21116]>
- RUSTDESK_API_RUSTDESK_RELAY_SERVER=<relay_server[:21117]> - RUSTDESK_API_RUSTDESK_RELAY_SERVER=<relay_server[:21117]>
- RUSTDESK_API_RUSTDESK_API_SERVER=http://<api_server[:21114]> - RUSTDESK_API_RUSTDESK_API_SERVER=http://<api_server[:21114]>
- RUSTDESK_API_KEY_FILE=/data/id_ed25519.pub
- RUSTDESK_API_JWT_KEY=xxxxxx # jwt key
volumes: volumes:
- /data/rustdesk/server:/data - /data/rustdesk/server:/data
- /data/rustdesk/api:/app/data #将数据库挂载 - /data/rustdesk/api:/app/data #将数据库挂载
- /data/rustdesk/server:/app/conf/data #挂载key文件到api容器可以不用使用 RUSTDESK_API_RUSTDESK_KEY
networks: networks:
- rustdesk-net - rustdesk-net
restart: unless-stopped restart: unless-stopped

View File

@@ -26,7 +26,7 @@ rustdesk:
relay-server: "192.168.1.66:21117" relay-server: "192.168.1.66:21117"
api-server: "http://127.0.0.1:21114" api-server: "http://127.0.0.1:21114"
key: "" key: ""
key-file: "./conf/data/id_ed25519.pub" key-file: "/data/id_ed25519.pub"
personal: 1 personal: 1
webclient-magic-queryonline: 0 webclient-magic-queryonline: 0
logger: logger: