docs(settings): document api.global_api_key in deploy config (zh/en/ja)

The deploy 'System Settings' page showed the api: block without the
global API key. Add the field + a note explaining it authenticates both
the HTTP API and the MCP server (/mcp) with no login session, reusing
the same key. Links to docs/API_KEY_AUTH.md.
This commit is contained in:
RockChinQ
2026-06-20 03:13:47 -04:00
parent 4c9817f8de
commit 17868b360d
3 changed files with 6 additions and 0 deletions
+2
View File
@@ -12,6 +12,7 @@ api:
port: 5300
webhook_prefix: 'http://127.0.0.1:5300'
extra_webhook_prefix: ''
global_api_key: '' # Global API key. When non-empty, it is accepted for both the HTTP API and the MCP server (/mcp) with no login session, no database record, and no lbk_ prefix required. Empty = disabled. Stored in plaintext — enable only on trusted/internal deployments and serve over HTTPS.
command:
enable: true
prefix:
@@ -150,6 +151,7 @@ space:
- When SQLite is used as the database, automatic monitoring cleanup directly releases database file space after deleting expired records.
- `plugin.binary_storage.max_value_bytes` limits the size of a single plugin binary storage value. The default is 10 MiB.
- The WebUI sidebar includes a “Storage Analysis” page for viewing database, logs, uploaded files, vector store, plugins, MCP, temporary files, and cleanup candidates.
- `api.global_api_key` is a global API key for agents / automation: once set, calls to the HTTP API or the built-in MCP server (`/mcp`) authenticate by sending `X-API-Key: <key>` or `Authorization: Bearer *** — no login session and no database-stored `lbk_` key required. It is stored in plaintext in `config.yaml`, so enable it only on trusted / internal deployments and serve it over HTTPS. See [API Key Authentication](https://github.com/langbot-app/LangBot/blob/master/docs/API_KEY_AUTH.md).
## Set Configuration Via Environment Variables
+2
View File
@@ -12,6 +12,7 @@ api:
port: 5300
webhook_prefix: 'http://127.0.0.1:5300'
extra_webhook_prefix: ''
global_api_key: '' # グローバル API キー。空でない場合、HTTP API と MCP サーバー(/mcp)の両方で、ログインセッション・データベースレコード・`lbk_` プレフィックス不要で認証されます。空 = 無効。平文で保存されるため、信頼できる / 内部デプロイでのみ有効化し、HTTPS で公開してください。
command:
enable: true
prefix:
@@ -149,6 +150,7 @@ space:
- SQLite をデータベースとして使用している場合、監視レコードの自動削除後にデータベースファイルの空き容量を直接解放します。
- `plugin.binary_storage.max_value_bytes` は 1 つのプラグインバイナリストレージ値のサイズを制限します。デフォルトは 10 MiB です。
- WebUI のサイドバーには「ストレージ分析」ページがあり、データベース、ログ、アップロードファイル、ベクターストア、プラグイン、MCP、一時ファイル、クリーンアップ候補を確認できます。
- `api.global_api_key` はエージェント / 自動化向けのグローバル API キーです。設定すると、HTTP API または組み込み MCP サーバー(`/mcp`)の呼び出し時に `X-API-Key: <key>` または `Authorization: Bearer *** を送るだけで認証されます(ログインセッションやデータベース保存の `lbk_` キーは不要)。`config.yaml` に平文で保存されるため、信頼できる / 内部デプロイでのみ有効化し、HTTPS で公開してください。[API キー認証](https://github.com/langbot-app/LangBot/blob/master/docs/API_KEY_AUTH.md) を参照。
## 環境変数による設定
+2
View File
@@ -12,6 +12,7 @@ api:
port: 5300
webhook_prefix: 'http://127.0.0.1:5300'
extra_webhook_prefix: ''
global_api_key: '' # 全局 API Key。非空时即可直接用于 HTTP API 与 MCP 服务(/mcp)鉴权,无需登录态、无需数据库记录、无需 lbk_ 前缀;留空则关闭。明文存储,仅在可信/内网部署启用并配合 HTTPS。
command:
enable: true
prefix:
@@ -150,6 +151,7 @@ space:
- SQLite 作为数据库时,监控记录自动清理后会直接释放数据库文件空间。
- `plugin.binary_storage.max_value_bytes` 用于限制插件单个二进制存储值大小,默认 10 MiB。
- WebUI 侧边栏的“存储分析”页面可查看数据库、日志、上传文件、向量库、插件、MCP、临时文件等空间占用和清理候选项。
- `api.global_api_key` 是面向 Agent / 自动化的全局 API Key:设置后,调用 HTTP API 或内置 MCP 服务(`/mcp`)时在请求头携带 `X-API-Key: <key>` 或 `Authorization: Bearer <key>` 即可鉴权,无需登录会话、无需在数据库中创建 `lbk_` 密钥。它是明文写在 `config.yaml` 中的,请仅在可信 / 内网环境启用,并通过 HTTPS 暴露。详见 [API Key 鉴权](https://github.com/langbot-app/LangBot/blob/master/docs/API_KEY_AUTH.md)。
## 通过环境变量设置