Skip to content

Commit de28b31

Browse files
authored
docs(deploy): document optional runtime tokens (#2431)
Co-authored-by: dadachann <185672915+dadachann@users.noreply.github.com>
1 parent 79773b6 commit de28b31

10 files changed

Lines changed: 49 additions & 7 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ cd LangBot/docker
8383
docker compose --profile all up -d
8484
```
8585

86+
> If the deployment is accessible from the Internet, protect the internal Runtime connections with strong tokens:
87+
>
88+
> ```bash
89+
> export LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN="$(openssl rand -hex 32)"
90+
> export LANGBOT_BOX_CONTROL_TOKEN="$(openssl rand -hex 32)"
91+
> docker compose --profile all up -d
92+
> ```
93+
>
94+
> Compose passes each value to both ends of its connection. If both ends leave a token unset, the open-source deployment permits a tokenless connection for backward compatibility. Store configured values in your deployment secret manager; do not commit them.
95+
8696
### One-Click Cloud Deploy
8797
8898
[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/en-US/templates/ZKTBDH)

README_CN.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ cd LangBot/docker
8383
docker compose --profile all up -d
8484
```
8585

86+
> 如果部署环境可从公网访问,建议为内部 Runtime 连接设置强 Token:
87+
>
88+
> ```bash
89+
> export LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN="$(openssl rand -hex 32)"
90+
> export LANGBOT_BOX_CONTROL_TOKEN="$(openssl rand -hex 32)"
91+
> docker compose --profile all up -d
92+
> ```
93+
>
94+
> Compose 会把每个 Token 传给对应连接的两端。开源版在两端都未设置 Token 时仍允许无 Token 连接,以保持向后兼容。已配置的 Token 应保存在部署平台的 Secret 管理中,不要提交到仓库。
95+
8696
### 一键云部署
8797
8898
[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/zh-CN/templates/ZKTBDH)

README_ES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ cd LangBot/docker
8282
docker compose --profile all up -d
8383
```
8484

85+
> Para despliegues accesibles desde Internet, recomendamos configurar `LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN` y `LANGBOT_BOX_CONTROL_TOKEN` con secretos compartidos robustos (al menos 32 caracteres que no sean espacios). Genera cada valor con `openssl rand -hex 32`; Compose lo proporciona a ambos extremos de la conexión correspondiente. Si ambos extremos dejan el Token sin configurar, la edición de código abierto permite la conexión sin Token por compatibilidad.
86+
8587
### Despliegue en la Nube con un Clic
8688

8789
[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/en-US/templates/ZKTBDH)

README_FR.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ cd LangBot/docker
8282
docker compose --profile all up -d
8383
```
8484

85+
> Pour un déploiement accessible depuis Internet, nous recommandons de définir `LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN` et `LANGBOT_BOX_CONTROL_TOKEN` avec des secrets partagés robustes (au moins 32 caractères non blancs). Générez chaque valeur avec `openssl rand -hex 32` ; Compose la transmet aux deux extrémités de la connexion concernée. Si les deux extrémités ne définissent aucun Token, l’édition open source autorise la connexion sans Token pour assurer la compatibilité.
86+
8587
### Déploiement Cloud en un Clic
8688

8789
[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/en-US/templates/ZKTBDH)

README_JP.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ cd LangBot/docker
8282
docker compose --profile all up -d
8383
```
8484

85+
> インターネットからアクセス可能な環境では、`LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN``LANGBOT_BOX_CONTROL_TOKEN` に強力な共有シークレット(空白以外の文字を32文字以上)を設定することを推奨します。各値は `openssl rand -hex 32` で生成でき、Compose が対応する接続の両端に同じ値を渡します。両端とも Token を未設定にした場合、オープンソース版では互換性のため Token なしの接続を許可します。
86+
8587
### ワンクリッククラウドデプロイ
8688

8789
[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/en-US/templates/ZKTBDH)

README_KO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ cd LangBot/docker
8282
docker compose --profile all up -d
8383
```
8484

85+
> 인터넷에서 접근 가능한 배포 환경에서는 `LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN``LANGBOT_BOX_CONTROL_TOKEN`에 강력한 공유 시크릿(공백이 아닌 문자 32자 이상)을 설정하는 것을 권장합니다. 각 값은 `openssl rand -hex 32`로 생성할 수 있으며 Compose가 해당 연결의 양쪽에 동일한 값을 전달합니다. 양쪽 모두 Token을 설정하지 않으면 오픈 소스 버전은 호환성을 위해 Token 없는 연결을 허용합니다.
86+
8587
### 원클릭 클라우드 배포
8688

8789
[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/en-US/templates/ZKTBDH)

README_RU.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ cd LangBot/docker
8282
docker compose --profile all up -d
8383
```
8484

85+
> Для развёртываний, доступных из Интернета, рекомендуем задать `LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN` и `LANGBOT_BOX_CONTROL_TOKEN` как надёжные общие секреты (не менее 32 непробельных символов). Каждое значение можно создать командой `openssl rand -hex 32`; Compose передаст его обеим сторонам соответствующего соединения. Если Token не задан с обеих сторон, версия с открытым исходным кодом разрешает соединение без Token для обратной совместимости.
86+
8587
### Облачное развертывание одним кликом
8688

8789
[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/en-US/templates/ZKTBDH)

README_TW.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ cd LangBot/docker
8484
docker compose --profile all up -d
8585
```
8686

87+
> 如果部署環境可從公網存取,建議為內部 Runtime 連線設定強 Token:
88+
>
89+
> ```bash
90+
> export LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN="$(openssl rand -hex 32)"
91+
> export LANGBOT_BOX_CONTROL_TOKEN="$(openssl rand -hex 32)"
92+
> docker compose --profile all up -d
93+
> ```
94+
>
95+
> Compose 會將每個 Token 傳給對應連線的兩端。開源版在兩端都未設定 Token 時仍允許無 Token 連線,以保持向後相容。已設定的 Token 應儲存在部署平台的 Secret 管理中,不要提交至儲存庫。
96+
8797
### 一鍵雲端部署
8898
8999
[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/zh-CN/templates/ZKTBDH)

README_VI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ cd LangBot/docker
8282
docker compose --profile all up -d
8383
```
8484

85+
> Với triển khai có thể truy cập từ Internet, bạn nên đặt `LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN``LANGBOT_BOX_CONTROL_TOKEN` thành các khóa bí mật dùng chung đủ mạnh (ít nhất 32 ký tự không phải khoảng trắng). Có thể tạo từng giá trị bằng `openssl rand -hex 32`; Compose sẽ truyền cùng giá trị tới hai đầu của kết nối tương ứng. Nếu cả hai đầu đều không đặt Token, bản mã nguồn mở vẫn cho phép kết nối không Token để duy trì khả năng tương thích.
86+
8587
### Triển khai đám mây một cú nhấp
8688

8789
[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/en-US/templates/ZKTBDH)

docker/docker-compose.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ services:
4747
restart: on-failure
4848
environment:
4949
- TZ=Asia/Shanghai
50-
# Shared control-plane secret used to authenticate both the RPC socket
51-
# and managed-process relay. Generate once (for example with
52-
# ``openssl rand -hex 32``) and export it before enabling this profile.
53-
# An empty value is accepted by Compose so Box can remain optional, but
54-
# the Box runtime itself fails closed when the profile is started.
50+
# Optional shared control-plane secret used to authenticate both the RPC
51+
# socket and managed-process relay. Leave unset on both OSS services, or
52+
# generate one with ``openssl rand -hex 32`` and set the same value on
53+
# both ends. Strongly recommended when the deployment is Internet-accessible.
5554
- LANGBOT_BOX_CONTROL_TOKEN=${LANGBOT_BOX_CONTROL_TOKEN:-}
5655
# Box has its own process-wide blocking-work budget.
5756
- LANGBOT_BLOCKING_EXECUTOR_MAX_WORKERS=${LANGBOT_BLOCKING_EXECUTOR_MAX_WORKERS:-8}
@@ -79,8 +78,9 @@ services:
7978
- TZ=Asia/Shanghai
8079
# Optional. Leave unset on both OSS services, or match plugin Runtime.
8180
- LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN=${LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN:-}
82-
# Must match the value supplied to langbot_box. The token is sent only
83-
# in WebSocket handshake headers, never in URLs or action payloads.
81+
# When set, this must match langbot_box. If both ends leave it unset,
82+
# OSS permits the connection without token authentication. The token is
83+
# sent only in WebSocket handshake headers, never in URLs or payloads.
8484
- LANGBOT_BOX_CONTROL_TOKEN=${LANGBOT_BOX_CONTROL_TOKEN:-}
8585
# Core process-wide blocking-work admission. These are native config
8686
# overrides and are persisted with the effective data/config.yaml.

0 commit comments

Comments
 (0)