@lobehub/lobehub 2.0.0-next.332 → 2.0.0-next.333
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/apps/desktop/src/main/const/dir.ts +3 -0
- package/apps/desktop/src/main/controllers/SystemCtr.ts +19 -0
- package/apps/desktop/src/main/controllers/__tests__/SystemCtr.test.ts +1 -0
- package/apps/desktop/src/main/menus/impls/macOS.test.ts +1 -0
- package/changelog/v1.json +12 -0
- package/docs/changelog/2023-09-09-plugin-system.mdx +3 -2
- package/docs/changelog/2023-11-14-gpt4-vision.mdx +6 -4
- package/docs/changelog/2023-11-19-tts-stt.mdx +3 -2
- package/docs/changelog/2023-12-22-dalle-3.mdx +5 -2
- package/docs/changelog/2023-12-22-dalle-3.zh-CN.mdx +2 -2
- package/docs/changelog/2024-02-08-sso-oauth.mdx +2 -2
- package/docs/changelog/2024-06-19-lobe-chat-v1.mdx +3 -2
- package/docs/changelog/2024-06-19-lobe-chat-v1.zh-CN.mdx +2 -2
- package/docs/changelog/2024-07-19-gpt-4o-mini.mdx +3 -2
- package/docs/changelog/2024-07-19-gpt-4o-mini.zh-CN.mdx +2 -2
- package/docs/changelog/2024-08-02-lobe-chat-database-docker.mdx +3 -2
- package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.mdx +5 -4
- package/docs/changelog/2024-09-13-openai-o1-models.mdx +2 -2
- package/docs/changelog/2024-09-20-artifacts.mdx +3 -2
- package/docs/changelog/2024-09-20-artifacts.zh-CN.mdx +2 -2
- package/docs/changelog/2024-10-27-pin-assistant.mdx +3 -2
- package/docs/changelog/2024-11-06-share-text-json.mdx +4 -2
- package/docs/changelog/2024-11-06-share-text-json.zh-CN.mdx +2 -2
- package/docs/changelog/2024-11-25-november-providers.mdx +2 -2
- package/docs/changelog/2024-11-27-forkable-chat.mdx +2 -2
- package/docs/changelog/2025-01-03-user-profile.mdx +2 -2
- package/docs/changelog/2025-01-22-new-ai-provider.mdx +2 -2
- package/docs/changelog/2025-02-02-deepseek-r1.mdx +4 -4
- package/docs/development/basic/add-new-authentication-providers.mdx +4 -0
- package/docs/development/basic/add-new-authentication-providers.zh-CN.mdx +4 -0
- package/docs/development/basic/add-new-image-model.mdx +4 -0
- package/docs/development/basic/add-new-image-model.zh-CN.mdx +4 -0
- package/docs/development/basic/architecture.mdx +4 -0
- package/docs/development/basic/architecture.zh-CN.mdx +4 -0
- package/docs/development/basic/chat-api.mdx +4 -0
- package/docs/development/basic/chat-api.zh-CN.mdx +4 -0
- package/docs/development/basic/comfyui-development.mdx +3 -1
- package/docs/development/basic/contributing-guidelines.mdx +4 -0
- package/docs/development/basic/contributing-guidelines.zh-CN.mdx +4 -0
- package/docs/development/basic/feature-development-frontend.mdx +11 -3
- package/docs/development/basic/feature-development-frontend.zh-CN.mdx +11 -3
- package/docs/development/basic/feature-development.mdx +14 -5
- package/docs/development/basic/feature-development.zh-CN.mdx +14 -5
- package/docs/development/basic/folder-structure.mdx +7 -0
- package/docs/development/basic/folder-structure.zh-CN.mdx +7 -0
- package/docs/development/basic/resources.mdx +4 -0
- package/docs/development/basic/resources.zh-CN.mdx +4 -0
- package/docs/development/basic/setup-development.mdx +4 -0
- package/docs/development/basic/setup-development.zh-CN.mdx +4 -0
- package/docs/development/basic/test.mdx +4 -0
- package/docs/development/basic/test.zh-CN.mdx +4 -0
- package/docs/development/basic/work-with-server-side-database.mdx +5 -5
- package/docs/development/basic/work-with-server-side-database.zh-CN.mdx +5 -5
- package/docs/development/internationalization/add-new-locale.mdx +4 -0
- package/docs/development/internationalization/add-new-locale.zh-CN.mdx +4 -0
- package/docs/development/internationalization/internationalization-implementation.mdx +4 -0
- package/docs/development/internationalization/internationalization-implementation.zh-CN.mdx +4 -0
- package/docs/development/others/lighthouse.mdx +4 -0
- package/docs/development/others/lighthouse.zh-CN.mdx +4 -0
- package/docs/development/start.mdx +4 -0
- package/docs/development/start.zh-CN.mdx +4 -0
- package/docs/development/state-management/state-management-intro.mdx +4 -2
- package/docs/development/state-management/state-management-intro.zh-CN.mdx +4 -2
- package/docs/development/state-management/state-management-selectors.mdx +6 -1
- package/docs/development/state-management/state-management-selectors.zh-CN.mdx +6 -1
- package/docs/development/tests/integration-testing.zh-CN.mdx +4 -0
- package/docs/self-hosting/advanced/analytics.mdx +2 -2
- package/docs/self-hosting/advanced/auth/better-auth/apple.mdx +132 -0
- package/docs/self-hosting/advanced/auth/better-auth/apple.zh-CN.mdx +127 -0
- package/docs/self-hosting/advanced/auth/better-auth/auth0.mdx +111 -0
- package/docs/self-hosting/advanced/auth/better-auth/auth0.zh-CN.mdx +107 -0
- package/docs/self-hosting/advanced/auth/better-auth/authelia.mdx +66 -0
- package/docs/self-hosting/advanced/auth/better-auth/authelia.zh-CN.mdx +62 -0
- package/docs/self-hosting/advanced/auth/better-auth/authentik.mdx +67 -0
- package/docs/self-hosting/advanced/auth/better-auth/authentik.zh-CN.mdx +63 -0
- package/docs/self-hosting/advanced/auth/better-auth/casdoor.mdx +62 -0
- package/docs/self-hosting/advanced/auth/better-auth/casdoor.zh-CN.mdx +58 -0
- package/docs/self-hosting/advanced/auth/better-auth/cloudflare-zero-trust.mdx +59 -0
- package/docs/self-hosting/advanced/auth/better-auth/cloudflare-zero-trust.zh-CN.mdx +55 -0
- package/docs/self-hosting/advanced/auth/better-auth/cognito.mdx +88 -0
- package/docs/self-hosting/advanced/auth/better-auth/cognito.zh-CN.mdx +85 -0
- package/docs/self-hosting/advanced/auth/better-auth/feishu.mdx +73 -0
- package/docs/self-hosting/advanced/auth/better-auth/feishu.zh-CN.mdx +69 -0
- package/docs/self-hosting/advanced/auth/better-auth/generic-oidc.mdx +86 -0
- package/docs/self-hosting/advanced/auth/better-auth/generic-oidc.zh-CN.mdx +83 -0
- package/docs/self-hosting/advanced/auth/better-auth/github.mdx +93 -0
- package/docs/self-hosting/advanced/auth/better-auth/github.zh-CN.mdx +90 -0
- package/docs/self-hosting/advanced/auth/better-auth/google.mdx +80 -0
- package/docs/self-hosting/advanced/auth/better-auth/google.zh-CN.mdx +77 -0
- package/docs/self-hosting/advanced/auth/better-auth/keycloak.mdx +77 -0
- package/docs/self-hosting/advanced/auth/better-auth/keycloak.zh-CN.mdx +74 -0
- package/docs/self-hosting/advanced/auth/better-auth/logto.mdx +64 -0
- package/docs/self-hosting/advanced/auth/better-auth/logto.zh-CN.mdx +60 -0
- package/docs/self-hosting/advanced/auth/better-auth/microsoft.mdx +113 -0
- package/docs/self-hosting/advanced/auth/better-auth/microsoft.zh-CN.mdx +109 -0
- package/docs/self-hosting/advanced/auth/better-auth/okta.mdx +67 -0
- package/docs/self-hosting/advanced/auth/better-auth/okta.zh-CN.mdx +63 -0
- package/docs/self-hosting/advanced/auth/better-auth/wechat.mdx +77 -0
- package/docs/self-hosting/advanced/auth/better-auth/wechat.zh-CN.mdx +72 -0
- package/docs/self-hosting/advanced/auth/better-auth/zitadel.mdx +73 -0
- package/docs/self-hosting/advanced/auth/better-auth/zitadel.zh-CN.mdx +69 -0
- package/docs/self-hosting/advanced/auth/clerk.mdx +2 -2
- package/docs/self-hosting/advanced/auth/legacy.mdx +106 -0
- package/docs/self-hosting/advanced/auth/legacy.zh-CN.mdx +101 -0
- package/docs/self-hosting/advanced/auth/next-auth/auth0.mdx +3 -2
- package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +3 -2
- package/docs/self-hosting/advanced/auth/next-auth/authentik.mdx +3 -2
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +5 -2
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +2 -0
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx +3 -2
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx +2 -2
- package/docs/self-hosting/advanced/auth/next-auth/github.mdx +3 -2
- package/docs/self-hosting/advanced/auth/next-auth/google.mdx +10 -12
- package/docs/self-hosting/advanced/auth/next-auth/keycloak.mdx +3 -2
- package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +2 -2
- package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx +3 -2
- package/docs/self-hosting/advanced/auth/next-auth/okta.mdx +3 -2
- package/docs/self-hosting/advanced/auth/next-auth/okta.zh-CN.mdx +1 -3
- package/docs/self-hosting/advanced/auth/next-auth/wechat.mdx +2 -2
- package/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx +3 -2
- package/docs/self-hosting/advanced/auth.mdx +86 -139
- package/docs/self-hosting/advanced/auth.zh-CN.mdx +84 -135
- package/docs/self-hosting/advanced/desktop.mdx +9 -3
- package/docs/self-hosting/advanced/desktop.zh-CN.mdx +9 -3
- package/docs/self-hosting/advanced/feature-flags.mdx +3 -2
- package/docs/self-hosting/advanced/knowledge-base.mdx +2 -2
- package/docs/self-hosting/advanced/model-list.mdx +2 -2
- package/docs/self-hosting/advanced/observability/grafana.mdx +4 -2
- package/docs/self-hosting/advanced/observability/grafana.zh-CN.mdx +2 -1
- package/docs/self-hosting/advanced/observability/langfuse.mdx +3 -2
- package/docs/self-hosting/advanced/online-search.mdx +4 -6
- package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +2 -2
- package/docs/self-hosting/advanced/settings-url-share.mdx +3 -2
- package/docs/self-hosting/advanced/upstream-sync.mdx +3 -4
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +0 -2
- package/docs/self-hosting/environment-variables/analytics.mdx +3 -2
- package/docs/self-hosting/environment-variables/auth.mdx +5 -12
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +2 -9
- package/docs/self-hosting/environment-variables/basic.mdx +3 -10
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +0 -7
- package/docs/self-hosting/environment-variables/model-provider.mdx +3 -4
- package/docs/self-hosting/environment-variables/s3.mdx +2 -2
- package/docs/self-hosting/environment-variables.mdx +2 -3
- package/docs/self-hosting/examples/azure-openai.mdx +2 -3
- package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +0 -1
- package/docs/self-hosting/examples/ollama.mdx +3 -2
- package/docs/self-hosting/faq/no-v1-suffix.mdx +4 -4
- package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx +3 -2
- package/docs/self-hosting/faq/vercel-ai-image-timeout.mdx +2 -2
- package/docs/self-hosting/migration/v2/breaking-changes.mdx +73 -0
- package/docs/self-hosting/migration/v2/breaking-changes.zh-CN.mdx +71 -0
- package/docs/self-hosting/platform/alibaba-cloud.mdx +2 -7
- package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +1 -6
- package/docs/self-hosting/platform/btpanel.mdx +4 -2
- package/docs/self-hosting/platform/btpanel.zh-CN.mdx +2 -2
- package/docs/self-hosting/platform/docker-compose.mdx +3 -3
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +0 -1
- package/docs/self-hosting/platform/docker.mdx +2 -11
- package/docs/self-hosting/platform/docker.zh-CN.mdx +0 -8
- package/docs/self-hosting/platform/netlify.mdx +5 -17
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +3 -17
- package/docs/self-hosting/platform/railway.mdx +3 -7
- package/docs/self-hosting/platform/railway.zh-CN.mdx +1 -7
- package/docs/self-hosting/platform/repocloud.mdx +3 -7
- package/docs/self-hosting/platform/repocloud.zh-CN.mdx +1 -6
- package/docs/self-hosting/platform/sealos.mdx +2 -7
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +1 -6
- package/docs/self-hosting/platform/tencentcloud-lighthouse.mdx +2 -7
- package/docs/self-hosting/platform/tencentcloud-lighthouse.zh-CN.mdx +1 -6
- package/docs/self-hosting/platform/vercel.mdx +4 -9
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +3 -8
- package/docs/self-hosting/platform/zeabur.mdx +2 -11
- package/docs/self-hosting/platform/zeabur.zh-CN.mdx +1 -10
- package/docs/self-hosting/server-database/docker-compose.mdx +11 -19
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +12 -21
- package/docs/self-hosting/server-database/docker.mdx +9 -24
- package/docs/self-hosting/server-database/docker.zh-CN.mdx +7 -24
- package/docs/self-hosting/server-database/dokploy.mdx +27 -25
- package/docs/self-hosting/server-database/dokploy.zh-CN.mdx +23 -21
- package/docs/self-hosting/server-database/netlify.mdx +2 -2
- package/docs/self-hosting/server-database/netlify.zh-CN.mdx +2 -2
- package/docs/self-hosting/server-database/railway.mdx +2 -2
- package/docs/self-hosting/server-database/repocloud.mdx +2 -2
- package/docs/self-hosting/server-database/sealos.mdx +2 -2
- package/docs/self-hosting/server-database/vercel.mdx +19 -72
- package/docs/self-hosting/server-database/vercel.zh-CN.mdx +17 -68
- package/docs/self-hosting/server-database/zeabur.mdx +2 -2
- package/docs/self-hosting/server-database.mdx +1 -19
- package/docs/self-hosting/server-database.zh-CN.mdx +0 -17
- package/docs/self-hosting/start.mdx +2 -2
- package/docs/self-hosting/start.zh-CN.mdx +2 -2
- package/locales/en-US/desktop-onboarding.json +1 -0
- package/locales/zh-CN/desktop-onboarding.json +1 -0
- package/package.json +2 -2
- package/packages/builtin-tool-cloud-sandbox/src/systemRole.ts +62 -2
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/tasks/index.ts +2 -0
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/tasks/multi-tasks-with-summary.json +234 -0
- package/packages/conversation-flow/src/__tests__/parse.test.ts +25 -0
- package/packages/conversation-flow/src/transformation/ContextTreeBuilder.ts +15 -0
- package/packages/conversation-flow/src/transformation/FlatListBuilder.ts +20 -0
- package/packages/types/src/serverConfig.ts +0 -1
- package/src/app/[variants]/(desktop)/desktop-onboarding/features/LoginStep.tsx +39 -1
- package/src/app/[variants]/(main)/settings/common/features/Common/Common.tsx +34 -14
- package/src/envs/app.ts +0 -13
- package/src/locales/default/desktop-onboarding.ts +1 -0
- package/src/server/globalConfig/index.ts +1 -2
- package/src/services/electron/system.ts +4 -0
- package/src/store/serverConfig/selectors.ts +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Deploying LobeChat with Docker Compose
|
|
3
3
|
description: >-
|
|
4
|
-
Learn how to deploy the LobeChat service using Docker Compose, including
|
|
5
|
-
|
|
4
|
+
Learn how to deploy the LobeChat service using Docker Compose, including
|
|
5
|
+
configuration tutorials for various services.
|
|
6
6
|
tags:
|
|
7
7
|
- Docker Compose
|
|
8
8
|
- LobeChat
|
|
@@ -20,15 +20,6 @@ tags:
|
|
|
20
20
|
[![][docker-pulls-shield]][docker-pulls-link]
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
|
-
<Callout type="warning">
|
|
24
|
-
**Note on Docker Deployment Limitations**
|
|
25
|
-
The Docker and Docker Compose deployment options do not support injecting the `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` through environment variables, which prevents enabling the Clerk authentication service. Recommended alternatives include:
|
|
26
|
-
|
|
27
|
-
- Hosting deployment via Vercel
|
|
28
|
-
|
|
29
|
-
- Running a local image build process
|
|
30
|
-
</Callout>
|
|
31
|
-
|
|
32
23
|
## Quick Start
|
|
33
24
|
|
|
34
25
|
<Callout type="info">
|
|
@@ -246,15 +237,15 @@ The script supports the following deployment modes; please choose the appropriat
|
|
|
246
237
|
- Choose the access protocol: `http` or `https`
|
|
247
238
|
- Regenerate secure keys: We highly recommend regenerating the secure keys; if you lack the key generation library required by the script, we suggest referring to the [Custom Deployment](#custom-deployment) section for key modifications.
|
|
248
239
|
|
|
249
|
-
|
|
250
|
-
|
|
240
|
+
<Callout type="warning">
|
|
241
|
+
The following issues may impede access to your service:
|
|
251
242
|
|
|
252
|
-
|
|
243
|
+
- The domain configuration here must match the reverse proxy configuration in step `1`.
|
|
253
244
|
|
|
254
|
-
|
|
245
|
+
- If you are using Cloudflare for domain resolution and have activated `full proxy`, please use the `https` protocol.
|
|
255
246
|
|
|
256
|
-
|
|
257
|
-
|
|
247
|
+
- If you have used the HTTPS protocol, ensure that your domain certificate is correctly configured; one-click deployment does not support self-signed certificates by default.
|
|
248
|
+
</Callout>
|
|
258
249
|
|
|
259
250
|
### Check Configuration Generation Report
|
|
260
251
|
|
|
@@ -701,12 +692,14 @@ environment:
|
|
|
701
692
|
```
|
|
702
693
|
|
|
703
694
|
**How it works:**
|
|
695
|
+
|
|
704
696
|
- `APP_URL`: Used for browser/client access, OAuth callbacks, webhooks, etc. (goes through CDN/proxy)
|
|
705
697
|
- `INTERNAL_APP_URL`: Used for internal server-to-server communication (bypasses CDN/proxy)
|
|
706
698
|
|
|
707
699
|
If `INTERNAL_APP_URL` is not set, it defaults to `APP_URL`.
|
|
708
700
|
|
|
709
701
|
**Configuration options:**
|
|
702
|
+
|
|
710
703
|
- `http://localhost:3210` - If using Docker with host network mode
|
|
711
704
|
- `http://lobe:3210` - If using Docker network with service name
|
|
712
705
|
- `http://127.0.0.1:3210` - Alternative localhost address
|
|
@@ -726,7 +719,7 @@ For convenience, here is a summary of example configuration files required for t
|
|
|
726
719
|
# HTTP_PROXY=http://localhost:7890
|
|
727
720
|
# HTTPS_PROXY=http://localhost:7890
|
|
728
721
|
|
|
729
|
-
# Other environment variables, as needed. You can refer to the environment variables configuration for the client version
|
|
722
|
+
# Other environment variables, as needed. You can refer to the environment variables configuration for the client version.
|
|
730
723
|
# OPENAI_API_KEY=sk-xxxx
|
|
731
724
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
732
725
|
# OPENAI_MODEL_LIST=...
|
|
@@ -808,7 +801,6 @@ services:
|
|
|
808
801
|
command: >
|
|
809
802
|
server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
|
|
810
803
|
|
|
811
|
-
|
|
812
804
|
casdoor:
|
|
813
805
|
image: casbin/casdoor
|
|
814
806
|
container_name: lobe-casdoor
|
|
@@ -18,16 +18,6 @@ tags:
|
|
|
18
18
|
[![][docker-pulls-shield]][docker-pulls-link]
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
|
-
<Callout type="warning">
|
|
22
|
-
**Docker 部署限制说明**
|
|
23
|
-
Docker 及 Docker Compose 部署方案不支持通过环境变量注入 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`,
|
|
24
|
-
因此无法启用 Clerk 身份验证服务。建议替代方案:
|
|
25
|
-
|
|
26
|
-
- 采用 Vercel 托管部署
|
|
27
|
-
|
|
28
|
-
- 执行本地镜像构建流程
|
|
29
|
-
</Callout>
|
|
30
|
-
|
|
31
21
|
## 快速启动
|
|
32
22
|
|
|
33
23
|
<Callout type="info">
|
|
@@ -234,15 +224,15 @@ bash <(curl -fsSL https://lobe.li/setup.sh) -l zh_CN
|
|
|
234
224
|
- 选择访问协议:`http` 或 `https`
|
|
235
225
|
- 安全密钥重新生成:我们强烈建议你重新生成安全密钥,如果你缺少脚本所需的密钥生成库,我们建议你参考 [自定义部署](#自定义部署) 章节对密钥进行修改。
|
|
236
226
|
|
|
237
|
-
|
|
238
|
-
|
|
227
|
+
<Callout type="warning">
|
|
228
|
+
以下问题可能导致你的服务无法正常访问:
|
|
239
229
|
|
|
240
|
-
|
|
230
|
+
- 此处的域名配置需要与步骤`1`中的反向代理配置保持一致。
|
|
241
231
|
|
|
242
|
-
|
|
232
|
+
- 如果你使用 Cloudflare 的域名解析服务并开启了 `全程代理`,请使用 `https` 协议。
|
|
243
233
|
|
|
244
|
-
|
|
245
|
-
|
|
234
|
+
- 如果你使用了 HTTPS 协议,请确保你的域名证书已经正确配置,一键部署默认不支持自签发证书。
|
|
235
|
+
</Callout>
|
|
246
236
|
|
|
247
237
|
### 查看配置生成报告
|
|
248
238
|
|
|
@@ -665,7 +655,7 @@ docker compose up -d # 重新启动
|
|
|
665
655
|
#### 使用 `INTERNAL_APP_URL` 配置内部服务器通信
|
|
666
656
|
|
|
667
657
|
<Callout type="info">
|
|
668
|
-
如果你在 CDN(如 Cloudflare)或反向代理后部署 LobeChat,你可以配置内部服务器到服务器通信以绕过 CDN
|
|
658
|
+
如果你在 CDN(如 Cloudflare)或反向代理后部署 LobeChat,你可以配置内部服务器到服务器通信以绕过 CDN / 代理层,以获得更好的性能。
|
|
669
659
|
</Callout>
|
|
670
660
|
|
|
671
661
|
你可以配置 `INTERNAL_APP_URL` 环境变量:
|
|
@@ -677,12 +667,14 @@ environment:
|
|
|
677
667
|
```
|
|
678
668
|
|
|
679
669
|
**工作原理:**
|
|
680
|
-
|
|
681
|
-
- `
|
|
670
|
+
|
|
671
|
+
- `APP_URL`:用于浏览器 / 客户端访问、OAuth 回调、webhook 等(通过 CDN / 代理)
|
|
672
|
+
- `INTERNAL_APP_URL`:用于内部服务器到服务器通信(绕过 CDN / 代理)
|
|
682
673
|
|
|
683
674
|
如果未设置 `INTERNAL_APP_URL`,它将默认为 `APP_URL`。
|
|
684
675
|
|
|
685
676
|
**配置选项:**
|
|
677
|
+
|
|
686
678
|
- `http://localhost:3210` - 如果使用 Docker 主机网络模式
|
|
687
679
|
- `http://lobe:3210` - 如果使用 Docker 网络与服务名称
|
|
688
680
|
- `http://127.0.0.1:3210` - 备用本地主机地址
|
|
@@ -702,7 +694,7 @@ environment:
|
|
|
702
694
|
# HTTP_PROXY=http://localhost:7890
|
|
703
695
|
# HTTPS_PROXY=http://localhost:7890
|
|
704
696
|
|
|
705
|
-
# Other environment variables, as needed. You can refer to the environment variables configuration for the client version
|
|
697
|
+
# Other environment variables, as needed. You can refer to the environment variables configuration for the client version.
|
|
706
698
|
# OPENAI_API_KEY=sk-xxxx
|
|
707
699
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
708
700
|
# OPENAI_MODEL_LIST=...
|
|
@@ -784,7 +776,6 @@ services:
|
|
|
784
776
|
command: >
|
|
785
777
|
server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
|
|
786
778
|
|
|
787
|
-
|
|
788
779
|
casdoor:
|
|
789
780
|
image: casbin/casdoor
|
|
790
781
|
container_name: lobe-casdoor
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Deploying LobeChat Database with Docker
|
|
3
3
|
description: >-
|
|
4
|
-
Learn how to deploy the LobeChat server database version using Docker on Linux
|
|
5
|
-
|
|
4
|
+
Learn how to deploy the LobeChat server database version using Docker on Linux
|
|
5
|
+
and local machines.
|
|
6
6
|
tags:
|
|
7
7
|
- LobeChat
|
|
8
8
|
- Docker
|
|
@@ -28,11 +28,6 @@ tags:
|
|
|
28
28
|
Database](/docs/self-hosting/server-database) first.
|
|
29
29
|
</Callout>
|
|
30
30
|
|
|
31
|
-
<Callout type="warning">
|
|
32
|
-
Due to the inability to expose `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` using Docker environment variables, you cannot use Clerk as an authentication service when deploying LobeChat using Docker / Docker Compose.
|
|
33
|
-
|
|
34
|
-
If you do need Clerk as an authentication service, you might consider deploying using Vercel or building your own image.
|
|
35
|
-
</Callout>
|
|
36
31
|
|
|
37
32
|
## Deploying on a Linux Server
|
|
38
33
|
|
|
@@ -74,13 +69,11 @@ Here is the process for deploying the LobeChat server database version on a Linu
|
|
|
74
69
|
# Format: postgres://username:password@host:port/dbname; if your pg instance is a Docker container, use the container name
|
|
75
70
|
DATABASE_URL=postgres://postgres:mysecretpassword@my-postgres:5432/postgres
|
|
76
71
|
|
|
77
|
-
#
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
AUTH_AUTH0_SECRET=cSX_xxxxx
|
|
83
|
-
AUTH_AUTH0_ISSUER=https://lobe-chat-demo.us.auth0.com
|
|
72
|
+
# Authentication (Better Auth)
|
|
73
|
+
# Session encryption key (generate with: openssl rand -base64 32)
|
|
74
|
+
AUTH_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk=
|
|
75
|
+
# JWKS key for signing and verifying JWTs (generate at: https://lobehub.com/docs/self-hosting/environment-variables/auth#jwks_key)
|
|
76
|
+
JWKS_KEY='{"keys":[...]}'
|
|
84
77
|
|
|
85
78
|
# S3 related
|
|
86
79
|
S3_ACCESS_KEY_ID=xxxxxxxxxx
|
|
@@ -89,10 +82,6 @@ Here is the process for deploying the LobeChat server database version on a Linu
|
|
|
89
82
|
S3_BUCKET=lobechat
|
|
90
83
|
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
|
|
91
84
|
|
|
92
|
-
# Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE.
|
|
93
|
-
# OPENAI_API_KEY=sk-xxxx
|
|
94
|
-
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
95
|
-
# OPENAI_MODEL_LIST=...
|
|
96
85
|
```
|
|
97
86
|
|
|
98
87
|
### Start the lobe-chat-database Docker image
|
|
@@ -141,13 +130,9 @@ The script command you need to execute is:
|
|
|
141
130
|
$ docker run -it -d --name lobe-chat-database -p 3210:3210 \
|
|
142
131
|
-e DATABASE_URL=postgres://postgres:mysecretpassword@host.docker.internal:5432/postgres \
|
|
143
132
|
-e KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= \
|
|
144
|
-
-e
|
|
145
|
-
-e
|
|
146
|
-
-e AUTH_AUTH0_ID=xxxxxx \
|
|
147
|
-
-e AUTH_AUTH0_SECRET=cSX_xxxxx \
|
|
148
|
-
-e AUTH_AUTH0_ISSUER=https://lobe-chat-demo.us.auth0.com \
|
|
133
|
+
-e AUTH_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= \
|
|
134
|
+
-e JWKS_KEY='{"keys":[...]}' \
|
|
149
135
|
-e APP_URL=http://localhost:3210 \
|
|
150
|
-
-e NEXTAUTH_URL=http://localhost:3210/api/auth \
|
|
151
136
|
-e S3_ACCESS_KEY_ID=xxxxxxxxxx \
|
|
152
137
|
-e S3_SECRET_ACCESS_KEY=xxxxxxxxxx \
|
|
153
138
|
-e S3_ENDPOINT=https://xxxxxxxxxx.r2.cloudflarestorage.com \
|
|
@@ -26,12 +26,6 @@ tags:
|
|
|
26
26
|
存储服务](/zh/docs/self-hosting/advanced/s3/tencent-cloud)。
|
|
27
27
|
</Callout>
|
|
28
28
|
|
|
29
|
-
<Callout type="warning">
|
|
30
|
-
由于无法使用 Docker 环境变量暴露 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`,使用 Docker / Docker Compose
|
|
31
|
-
部署 LobeChat 时,你不能使用 Clerk 作为登录鉴权服务。
|
|
32
|
-
|
|
33
|
-
如果你确实需要 Clerk 作为登录鉴权服务,你可以考虑使用 Vercel 部署或者自行构建镜像。
|
|
34
|
-
</Callout>
|
|
35
29
|
|
|
36
30
|
## 在 Linux 服务器上部署
|
|
37
31
|
|
|
@@ -72,13 +66,11 @@ tags:
|
|
|
72
66
|
# 格式:postgres://username:password@host:port/dbname,如果你的 pg 实例为 Docker 容器,请使用容器名
|
|
73
67
|
DATABASE_URL=postgres://postgres:mysecretpassword@my-postgres:5432/postgres
|
|
74
68
|
|
|
75
|
-
#
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
AUTH_AUTH0_SECRET=cSX_xxxxx
|
|
81
|
-
AUTH_AUTH0_ISSUER=https://lobe-chat-demo.us.auth0.com
|
|
69
|
+
# 身份验证(Better Auth)
|
|
70
|
+
# 会话加密密钥(使用以下命令生成:openssl rand -base64 32)
|
|
71
|
+
AUTH_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk=
|
|
72
|
+
# JWKS 密钥,用于签名和验证 JWT(在此生成:https://lobehub.com/zh/docs/self-hosting/environment-variables/auth#jwks_key)
|
|
73
|
+
JWKS_KEY='{"keys":[...]}'
|
|
82
74
|
|
|
83
75
|
# S3 相关
|
|
84
76
|
S3_ACCESS_KEY_ID=xxxxxxxxxx
|
|
@@ -90,11 +82,6 @@ tags:
|
|
|
90
82
|
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
|
|
91
83
|
# S3_REGION=ap-chengdu # 如果需要指定地域
|
|
92
84
|
|
|
93
|
-
# 其他环境变量,视需求而定
|
|
94
|
-
# OPENAI_API_KEY=sk-xxxx
|
|
95
|
-
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
96
|
-
# OPENAI_MODEL_LIST=...
|
|
97
|
-
# ...
|
|
98
85
|
```
|
|
99
86
|
|
|
100
87
|
### 启动 lobe-chat-database docker 镜像
|
|
@@ -143,13 +130,9 @@ LobeChat 的 DB 版也支持直接在本地的 Mac/Windows 本地使用。
|
|
|
143
130
|
$ docker run -it -d --name lobe-chat-database -p 3210:3210 \
|
|
144
131
|
-e DATABASE_URL=postgres://postgres:mysecretpassword@host.docker.internal:5432/postgres \
|
|
145
132
|
-e KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= \
|
|
146
|
-
-e
|
|
147
|
-
-e
|
|
148
|
-
-e AUTH_AUTH0_ID=xxxxxx \
|
|
149
|
-
-e AUTH_AUTH0_SECRET=cSX_xxxxx \
|
|
150
|
-
-e AUTH_AUTH0_ISSUER=https://lobe-chat-demo.us.auth0.com \
|
|
133
|
+
-e AUTH_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= \
|
|
134
|
+
-e JWKS_KEY='{"keys":[...]}' \
|
|
151
135
|
-e APP_URL=http://localhost:3210 \
|
|
152
|
-
-e NEXTAUTH_URL=http://localhost:3210/api/auth \
|
|
153
136
|
-e S3_ACCESS_KEY_ID=xxxxxxxxxx \
|
|
154
137
|
-e S3_SECRET_ACCESS_KEY=xxxxxxxxxx \
|
|
155
138
|
-e S3_ENDPOINT=https://xxxxxxxxxx.r2.cloudflarestorage.com \
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Deploy LobeChat with database on Dokploy
|
|
3
3
|
description: >-
|
|
4
|
-
Learn how to deploy LobeChat with database on Dokploy with ease, including:
|
|
5
|
-
|
|
4
|
+
Learn how to deploy LobeChat with database on Dokploy with ease, including:
|
|
5
|
+
database, authentication and S3 storage service.
|
|
6
6
|
tags:
|
|
7
7
|
- Deploy LobeChat
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
8
|
+
- Dokploy Deployment
|
|
9
|
+
- Better Auth
|
|
10
|
+
- S3 Storage
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
# Deploying Server Database Version on Dokploy.
|
|
@@ -43,15 +43,27 @@ S3_PUBLIC_DOMAIN=
|
|
|
43
43
|
S3_ENABLE_PATH_STYLE=
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
### Configure
|
|
46
|
+
### Configure KEY_VAULTS_SECRET Environment Variable
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
`KEY_VAULTS_SECRET` is used to encrypt sensitive information such as API keys stored by users. Click the button below to generate:
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
<GenerateSecret envName="KEY_VAULTS_SECRET" />
|
|
51
|
+
|
|
52
|
+
### Configure authentication environment variables
|
|
53
|
+
|
|
54
|
+
Prepare the following authentication environment variables (powered by [Better Auth](https://www.better-auth.com)):
|
|
55
|
+
|
|
56
|
+
Click the button below to generate `AUTH_SECRET` (session encryption key):
|
|
57
|
+
|
|
58
|
+
<GenerateSecret envName="AUTH_SECRET" />
|
|
59
|
+
|
|
60
|
+
You also need to configure the `JWKS_KEY` environment variable for signing and verifying JWTs. Click the button below to generate:
|
|
61
|
+
|
|
62
|
+
<GenerateJWKSKey />
|
|
63
|
+
|
|
64
|
+
<Callout type={'info'}>
|
|
65
|
+
For advanced features like SSO providers, magic link login, and email verification, see [Authentication Service](/docs/self-hosting/advanced/auth).
|
|
66
|
+
</Callout>
|
|
55
67
|
|
|
56
68
|
## 2. Deploying the database on Dokploy
|
|
57
69
|
|
|
@@ -92,20 +104,14 @@ NIXPACKS_START_CMD="pnpm start"
|
|
|
92
104
|
|
|
93
105
|
APP_URL=
|
|
94
106
|
|
|
95
|
-
# Set the service mode to server
|
|
96
|
-
NEXT_PUBLIC_SERVICE_MODE=server
|
|
97
|
-
|
|
98
107
|
# Configuration related to Postgres database
|
|
99
108
|
DATABASE_DRIVER=node
|
|
100
109
|
DATABASE_URL=
|
|
101
110
|
|
|
102
|
-
#
|
|
111
|
+
# Use the values generated above
|
|
103
112
|
KEY_VAULTS_SECRET=
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
|
|
107
|
-
CLERK_SECRET_KEY=
|
|
108
|
-
CLERK_WEBHOOK_SECRET=
|
|
113
|
+
AUTH_SECRET=
|
|
114
|
+
JWKS_KEY=
|
|
109
115
|
|
|
110
116
|
# S3 related configuration
|
|
111
117
|
S3_ACCESS_KEY_ID=
|
|
@@ -115,10 +121,6 @@ S3_BUCKET=
|
|
|
115
121
|
S3_PUBLIC_DOMAIN=
|
|
116
122
|
S3_ENABLE_PATH_STYLE=
|
|
117
123
|
|
|
118
|
-
# OpenAI related configuration
|
|
119
|
-
OPENAI_API_KEY=
|
|
120
|
-
OPENAI_MODEL_LIST=
|
|
121
|
-
OPENAI_PROXY_URL=
|
|
122
124
|
```
|
|
123
125
|
|
|
124
126
|
After adding the environment variables and saving, click Deploy to initiate the deployment. You can check the deployment progress and log information under Deployments.
|
|
@@ -4,7 +4,7 @@ description: 本文详细介绍如何在 Dokploy 中部署服务端数据库版
|
|
|
4
4
|
tags:
|
|
5
5
|
- 服务端数据库
|
|
6
6
|
- Postgres
|
|
7
|
-
-
|
|
7
|
+
- Better Auth
|
|
8
8
|
- Dokploy部署
|
|
9
9
|
- 数据库配置
|
|
10
10
|
- 身份验证服务
|
|
@@ -44,15 +44,27 @@ S3_PUBLIC_DOMAIN=
|
|
|
44
44
|
S3_ENABLE_PATH_STYLE=
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
### 配置
|
|
47
|
+
### 配置 KEY_VAULTS_SECRET 环境变量
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
`KEY_VAULTS_SECRET` 用于加密用户存储的 API Key 等敏感信息。点击下方按钮一键生成:
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
<GenerateSecret envName="KEY_VAULTS_SECRET" />
|
|
52
|
+
|
|
53
|
+
### 配置身份验证环境变量
|
|
54
|
+
|
|
55
|
+
准备以下身份验证环境变量(基于 [Better Auth](https://www.better-auth.com)):
|
|
56
|
+
|
|
57
|
+
点击下方按钮一键生成 `AUTH_SECRET`(会话加密密钥):
|
|
58
|
+
|
|
59
|
+
<GenerateSecret envName="AUTH_SECRET" />
|
|
60
|
+
|
|
61
|
+
同时需要配置 `JWKS_KEY` 环境变量,用于签名和验证 JWT。点击下方按钮一键生成:
|
|
62
|
+
|
|
63
|
+
<GenerateJWKSKey />
|
|
64
|
+
|
|
65
|
+
<Callout type={'info'}>
|
|
66
|
+
如需 SSO 登录、魔法链接登录、邮箱验证等高级功能,请参阅 [身份验证服务](/zh/docs/self-hosting/advanced/auth)。
|
|
67
|
+
</Callout>
|
|
56
68
|
|
|
57
69
|
## 二、在 Dokploy 上部署数据库
|
|
58
70
|
|
|
@@ -93,20 +105,14 @@ NIXPACKS_START_CMD="pnpm start"
|
|
|
93
105
|
|
|
94
106
|
APP_URL=
|
|
95
107
|
|
|
96
|
-
# 指定服务模式为 server
|
|
97
|
-
NEXT_PUBLIC_SERVICE_MODE=server
|
|
98
|
-
|
|
99
108
|
# Postgres 数据库相关配置
|
|
100
109
|
DATABASE_DRIVER=node
|
|
101
110
|
DATABASE_URL=
|
|
102
111
|
|
|
103
|
-
#
|
|
112
|
+
# 使用上方生成的值
|
|
104
113
|
KEY_VAULTS_SECRET=
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
|
|
108
|
-
CLERK_SECRET_KEY=
|
|
109
|
-
CLERK_WEBHOOK_SECRET=
|
|
114
|
+
AUTH_SECRET=
|
|
115
|
+
JWKS_KEY=
|
|
110
116
|
|
|
111
117
|
# S3 相关配置
|
|
112
118
|
S3_ACCESS_KEY_ID=
|
|
@@ -116,10 +122,6 @@ S3_BUCKET=
|
|
|
116
122
|
S3_PUBLIC_DOMAIN=
|
|
117
123
|
S3_ENABLE_PATH_STYLE=
|
|
118
124
|
|
|
119
|
-
# OpenAI 相关配置
|
|
120
|
-
OPENAI_API_KEY=
|
|
121
|
-
OPENAI_MODEL_LIST=
|
|
122
|
-
OPENAI_PROXY_URL=
|
|
123
125
|
```
|
|
124
126
|
|
|
125
127
|
添加完环境变量并保存后,点击 Deploy 进行部署,你可以在 Deployments 处查看部署进程及日志信息
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Deploy LobeChat with Database on Netlify
|
|
3
3
|
description: >-
|
|
4
|
-
Learn how to deploy LobeChat on Netlify with ease, including: database,
|
|
5
|
-
|
|
4
|
+
Learn how to deploy LobeChat on Netlify with ease, including: database,
|
|
5
|
+
authentication and S3 storage service.
|
|
6
6
|
tags:
|
|
7
7
|
- Deploy LobeChat
|
|
8
8
|
- Netlify Deployment
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 在 Netlify 上部署 LobeChat 服务端数据库版
|
|
3
3
|
description: >-
|
|
4
|
-
学习如何在 Netlify 上部署 LobeChat,包括 Fork 仓库、准备 OpenAI API Key、导入到 Netlify
|
|
5
|
-
|
|
4
|
+
学习如何在 Netlify 上部署 LobeChat,包括 Fork 仓库、准备 OpenAI API Key、导入到 Netlify
|
|
5
|
+
工作台、配置站点名称与环境变量等步骤。
|
|
6
6
|
tags:
|
|
7
7
|
- Netlify
|
|
8
8
|
- LobeChat
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Deploy LobeChat with Database on Railway
|
|
3
3
|
description: >-
|
|
4
|
-
Learn how to deploy LobeChat on Railway with ease, including: database,
|
|
5
|
-
|
|
4
|
+
Learn how to deploy LobeChat on Railway with ease, including: database,
|
|
5
|
+
authentication and S3 storage service.
|
|
6
6
|
tags:
|
|
7
7
|
- Deploy LobeChat
|
|
8
8
|
- Railway Deployment
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Deploy LobeChat with Database on RepoCloud
|
|
3
3
|
description: >-
|
|
4
|
-
Learn how to deploy LobeChat on RepoCloud with ease, including database,
|
|
5
|
-
|
|
4
|
+
Learn how to deploy LobeChat on RepoCloud with ease, including database,
|
|
5
|
+
authentication and S3 storage service.
|
|
6
6
|
tags:
|
|
7
7
|
- Deploy LobeChat
|
|
8
8
|
- RepoCloud Deployment
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Deploy Lobe Chat Database Version on Sealos
|
|
3
3
|
description: >-
|
|
4
|
-
Learn how to deploy LobeChat on Sealos with ease. Follow the provided steps to
|
|
5
|
-
|
|
4
|
+
Learn how to deploy LobeChat on Sealos with ease. Follow the provided steps to
|
|
5
|
+
set up LobeChat and start using it efficiently.
|
|
6
6
|
tags:
|
|
7
7
|
- Deploy LobeChat
|
|
8
8
|
- Sealos Deployment
|