@lobehub/lobehub 2.1.1 → 2.1.3
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/.env.example +4 -3
- package/.github/workflows/release-desktop-stable.yml +1 -1
- package/CHANGELOG.md +50 -0
- package/Dockerfile +6 -4
- package/README.md +3 -4
- package/README.zh-CN.md +3 -4
- package/apps/desktop/src/main/controllers/McpInstallCtr.ts +10 -10
- package/apps/desktop/src/main/controllers/NetworkProxyCtr.ts +6 -6
- package/apps/desktop/src/main/controllers/RemoteServerSyncCtr.ts +2 -2
- package/changelog/v2.json +14 -0
- package/docs/changelog/2025-03-02-new-models.mdx +1 -1
- package/docs/changelog/2025-03-02-new-models.zh-CN.mdx +1 -1
- package/docs/changelog/2025-04-06-exports.mdx +1 -1
- package/docs/changelog/2025-04-06-exports.zh-CN.mdx +1 -1
- package/docs/changelog/2025-05-08-desktop-app.mdx +2 -2
- package/docs/changelog/2025-05-08-desktop-app.zh-CN.mdx +2 -2
- package/docs/changelog/2025-06-08-claude-4.mdx +1 -1
- package/docs/changelog/2025-06-08-claude-4.zh-CN.mdx +1 -1
- package/docs/changelog/2025-07-08-mcp-market.mdx +1 -1
- package/docs/changelog/2025-07-08-mcp-market.zh-CN.mdx +1 -1
- package/docs/changelog/2025-08-08-image-generation.mdx +1 -1
- package/docs/changelog/2025-08-08-image-generation.zh-CN.mdx +1 -1
- package/docs/changelog/2025-09-08-gemini.mdx +1 -1
- package/docs/changelog/2025-09-08-gemini.zh-CN.mdx +1 -1
- package/docs/changelog/2025-10-08-python.mdx +1 -1
- package/docs/changelog/2025-10-08-python.zh-CN.mdx +1 -1
- package/docs/changelog/2025-11-08-comfy-ui.mdx +1 -1
- package/docs/changelog/2025-11-08-comfy-ui.zh-CN.mdx +1 -1
- package/docs/changelog/2025-12-20-mcp.mdx +1 -1
- package/docs/changelog/2025-12-20-mcp.zh-CN.mdx +1 -1
- package/docs/development/basic/add-new-authentication-providers.zh-CN.mdx +1 -1
- package/docs/development/basic/add-new-image-model.mdx +3 -3
- package/docs/development/basic/add-new-image-model.zh-CN.mdx +3 -3
- package/docs/development/basic/chat-api.mdx +10 -10
- package/docs/development/basic/chat-api.zh-CN.mdx +10 -10
- package/docs/development/basic/feature-development.mdx +4 -4
- package/docs/development/basic/feature-development.zh-CN.mdx +4 -4
- package/docs/development/basic/setup-development.mdx +4 -4
- package/docs/development/basic/setup-development.zh-CN.mdx +4 -4
- package/docs/development/internationalization/add-new-locale.mdx +1 -1
- package/docs/development/internationalization/add-new-locale.zh-CN.mdx +1 -1
- package/docs/development/internationalization/internationalization-implementation.mdx +5 -5
- package/docs/development/internationalization/internationalization-implementation.zh-CN.mdx +5 -5
- package/docs/development/others/lighthouse.mdx +8 -8
- package/docs/development/others/lighthouse.zh-CN.mdx +8 -8
- package/docs/development/start.mdx +3 -3
- package/docs/development/start.zh-CN.mdx +3 -3
- package/docs/self-hosting/advanced/feature-flags.mdx +1 -1
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/knowledge-base.mdx +2 -2
- package/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx +2 -2
- package/docs/self-hosting/advanced/online-search.mdx +1 -1
- package/docs/self-hosting/advanced/online-search.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/redis/upstash.mdx +3 -3
- package/docs/self-hosting/advanced/redis/upstash.zh-CN.mdx +3 -3
- package/docs/self-hosting/advanced/redis.mdx +6 -6
- package/docs/self-hosting/advanced/redis.zh-CN.mdx +6 -6
- package/docs/self-hosting/advanced/s3/rustfs.mdx +116 -116
- package/docs/self-hosting/advanced/s3/rustfs.zh-CN.mdx +116 -117
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +5 -5
- package/docs/self-hosting/auth/email.mdx +70 -0
- package/docs/self-hosting/auth/email.zh-CN.mdx +70 -0
- package/docs/self-hosting/{advanced/auth → auth}/legacy.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/legacy.zh-CN.mdx +5 -5
- package/docs/self-hosting/{advanced/auth → auth}/next-auth/casdoor.zh-CN.mdx +3 -3
- package/docs/self-hosting/{advanced/auth → auth}/next-auth/keycloak.zh-CN.mdx +2 -2
- package/docs/self-hosting/{advanced/auth → auth}/next-auth/logto.zh-CN.mdx +2 -2
- package/docs/self-hosting/{advanced/auth → auth}/providers/apple.mdx +6 -6
- package/docs/self-hosting/{advanced/auth → auth}/providers/apple.zh-CN.mdx +6 -6
- package/docs/self-hosting/{advanced/auth → auth}/providers/auth0.mdx +12 -12
- package/docs/self-hosting/{advanced/auth → auth}/providers/auth0.zh-CN.mdx +12 -12
- package/docs/self-hosting/{advanced/auth → auth}/providers/authelia.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/authelia.zh-CN.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/authentik.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/authentik.zh-CN.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/casdoor.mdx +8 -8
- package/docs/self-hosting/{advanced/auth → auth}/providers/casdoor.zh-CN.mdx +7 -7
- package/docs/self-hosting/{advanced/auth → auth}/providers/cloudflare-zero-trust.mdx +7 -7
- package/docs/self-hosting/{advanced/auth → auth}/providers/cloudflare-zero-trust.zh-CN.mdx +6 -6
- package/docs/self-hosting/{advanced/auth → auth}/providers/cognito.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/cognito.zh-CN.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/feishu.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/feishu.zh-CN.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/generic-oidc.mdx +12 -12
- package/docs/self-hosting/{advanced/auth → auth}/providers/generic-oidc.zh-CN.mdx +12 -12
- package/docs/self-hosting/{advanced/auth → auth}/providers/github.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/github.zh-CN.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/google.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/google.zh-CN.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/keycloak.mdx +11 -11
- package/docs/self-hosting/{advanced/auth → auth}/providers/keycloak.zh-CN.mdx +11 -11
- package/docs/self-hosting/{advanced/auth → auth}/providers/logto.mdx +8 -8
- package/docs/self-hosting/{advanced/auth → auth}/providers/logto.zh-CN.mdx +7 -7
- package/docs/self-hosting/{advanced/auth → auth}/providers/microsoft.mdx +11 -11
- package/docs/self-hosting/{advanced/auth → auth}/providers/microsoft.zh-CN.mdx +11 -11
- package/docs/self-hosting/{advanced/auth → auth}/providers/okta.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/okta.zh-CN.mdx +13 -13
- package/docs/self-hosting/auth/providers/password.mdx +112 -0
- package/docs/self-hosting/auth/providers/password.zh-CN.mdx +103 -0
- package/docs/self-hosting/{advanced/auth → auth}/providers/wechat.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/wechat.zh-CN.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/zitadel.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/zitadel.zh-CN.mdx +13 -13
- package/docs/self-hosting/{advanced/auth.mdx → auth.mdx} +24 -81
- package/docs/self-hosting/{advanced/auth.zh-CN.mdx → auth.zh-CN.mdx} +23 -80
- package/docs/self-hosting/environment-variables/auth.mdx +7 -0
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +7 -0
- package/docs/self-hosting/environment-variables/basic.mdx +0 -7
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +0 -7
- package/docs/self-hosting/environment-variables/redis.mdx +1 -1
- package/docs/self-hosting/environment-variables/redis.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables.mdx +1 -1
- package/docs/self-hosting/examples/azure-openai.mdx +0 -1
- package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +0 -1
- package/docs/self-hosting/faq/no-v1-suffix.mdx +3 -3
- package/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx +3 -3
- package/docs/self-hosting/{advanced → migration/v2}/auth/clerk-to-betterauth.mdx +7 -7
- package/docs/self-hosting/{advanced → migration/v2}/auth/clerk-to-betterauth.zh-CN.mdx +7 -7
- package/docs/self-hosting/{advanced → migration/v2}/auth/migration-internals.mdx +2 -2
- package/docs/self-hosting/{advanced → migration/v2}/auth/migration-internals.zh-CN.mdx +2 -2
- package/docs/self-hosting/{advanced → migration/v2}/auth/nextauth-to-betterauth.mdx +11 -11
- package/docs/self-hosting/{advanced → migration/v2}/auth/nextauth-to-betterauth.zh-CN.mdx +11 -11
- package/docs/self-hosting/migration/v2/breaking-changes.mdx +1 -1
- package/docs/self-hosting/migration/v2/breaking-changes.zh-CN.mdx +1 -1
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +4 -4
- package/docs/self-hosting/platform/docker.mdx +5 -5
- package/docs/self-hosting/platform/docker.zh-CN.mdx +10 -10
- package/docs/self-hosting/platform/dokploy.mdx +1 -1
- package/docs/self-hosting/platform/dokploy.zh-CN.mdx +5 -5
- package/docs/self-hosting/platform/sealos.mdx +12 -12
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +17 -17
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +4 -4
- package/docs/self-hosting/start.mdx +3 -3
- package/docs/self-hosting/start.zh-CN.mdx +4 -4
- package/locales/en-US/auth.json +2 -1
- package/locales/en-US/authError.json +1 -0
- package/locales/en-US/metadata.json +1 -1
- package/locales/zh-CN/auth.json +1 -0
- package/locales/zh-CN/authError.json +1 -0
- package/netlify.toml +0 -1
- package/package.json +1 -1
- package/packages/types/src/serverConfig.ts +1 -0
- package/src/app/[variants]/(auth)/auth-error/page.tsx +4 -2
- package/src/app/[variants]/(auth)/signin/SignInEmailStep.tsx +57 -50
- package/src/app/[variants]/(auth)/signin/SignInPasswordStep.tsx +1 -1
- package/src/app/[variants]/(auth)/signin/page.tsx +2 -0
- package/src/app/[variants]/(auth)/signin/useSignIn.ts +2 -0
- package/src/app/[variants]/(auth)/signup/[[...signup]]/page.tsx +7 -0
- package/src/envs/app.ts +0 -2
- package/src/envs/auth.ts +3 -0
- package/src/libs/better-auth/define-config.ts +1 -1
- package/src/libs/better-auth/sso/providers/feishu.ts +15 -14
- package/src/libs/better-auth/sso/providers/wechat.ts +6 -3
- package/src/libs/next/proxy/define-config.ts +1 -1
- package/src/locales/default/auth.ts +3 -1
- package/src/locales/default/authError.ts +2 -0
- package/src/locales/default/metadata.ts +1 -1
- package/src/server/globalConfig/index.ts +1 -0
- package/src/server/ld.ts +1 -1
- package/src/store/chat/slices/topic/action.ts +1 -1
- package/src/store/electron/actions/settings.ts +7 -7
- package/src/store/electron/actions/sync.ts +11 -11
- package/src/store/global/actions/general.ts +12 -12
- package/src/store/global/initialState.ts +11 -11
- package/src/store/global/selectors/clientDB.ts +1 -1
- package/src/store/global/selectors/systemStatus.ts +1 -1
- package/src/store/image/slices/generationConfig/action.ts +12 -12
- package/src/store/image/utils/size.ts +11 -11
- package/src/store/library/slices/ragEval/actions/dataset.ts +1 -1
- package/src/store/serverConfig/selectors.ts +1 -0
- package/src/store/session/slices/session/initialState.ts +6 -6
- package/src/store/session/slices/session/reducers.ts +1 -1
- package/src/store/session/slices/sessionGroup/initialState.ts +2 -2
- package/src/store/tool/slices/customPlugin/action.ts +2 -2
- package/src/store/tool/slices/oldStore/action.ts +5 -5
- package/src/store/userMemory/slices/preference/action.ts +6 -6
- /package/docs/self-hosting/{advanced/auth → auth}/clerk.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/clerk.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/auth0.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/auth0.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authelia.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authelia.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authentik.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authentik.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/casdoor.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/cloudflare-zero-trust.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/cloudflare-zero-trust.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/github.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/github.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/google.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/google.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/keycloak.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/logto.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/microsoft-entra-id.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/microsoft-entra-id.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/okta.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/okta.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/wechat.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/wechat.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/zitadel.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/zitadel.zh-CN.mdx +0 -0
|
@@ -190,13 +190,6 @@ SSRF_ALLOW_IP_ADDRESS_LIST=192.168.1.100,10.0.0.50
|
|
|
190
190
|
- Allow access to internal API gateway: `10.0.0.50`
|
|
191
191
|
- Allow access to internal documentation server: `172.16.0.10`
|
|
192
192
|
|
|
193
|
-
### `ENABLE_AUTH_PROTECTION`
|
|
194
|
-
|
|
195
|
-
- Type: Optional
|
|
196
|
-
- Description: Controls whether to enable route protection. When set to `1`, all routes except public routes (like `/api/auth`, `/login`, `/signup`) will require authentication. When set to `0` or not set, only specific protected routes (like `/settings`, `/files`) will require authentication.
|
|
197
|
-
- Default: `0`
|
|
198
|
-
- Example: `1` or `0`
|
|
199
|
-
|
|
200
193
|
### `NEXT_PUBLIC_ASSET_PREFIX`
|
|
201
194
|
|
|
202
195
|
- Type: Optional
|
|
@@ -185,13 +185,6 @@ SSRF_ALLOW_IP_ADDRESS_LIST=192.168.1.100,10.0.0.50
|
|
|
185
185
|
- 允许访问内网 API 网关:`10.0.0.50`
|
|
186
186
|
- 允许访问内网文档服务器:`172.16.0.10`
|
|
187
187
|
|
|
188
|
-
### `ENABLE_AUTH_PROTECTION`
|
|
189
|
-
|
|
190
|
-
- 类型:可选
|
|
191
|
-
- 说明:控制是否启用路由保护。当设置为 `1` 时,除了公共路由(如 `/api/auth`、`/login`、`/signup`)外,所有路由都需要认证。当设置为 `0` 或未设置时,只有特定的受保护路由(如 `/settings`、`/files` 等)需要认证。
|
|
192
|
-
- 默认值:`0`
|
|
193
|
-
- 示例:`1` 或 `0`
|
|
194
|
-
|
|
195
188
|
### `NEXT_PUBLIC_ASSET_PREFIX`
|
|
196
189
|
|
|
197
190
|
- 类型:可选
|
|
@@ -10,7 +10,7 @@ tags:
|
|
|
10
10
|
|
|
11
11
|
# Configure Redis Cache Service
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
LobeHub uses Redis as a high-performance cache and session storage service. Configuring Redis can optimize authentication session management, file proxy caching, and more.
|
|
14
14
|
|
|
15
15
|
## Core Environment Variables
|
|
16
16
|
|
|
@@ -40,4 +40,3 @@ If you want the deployed version to be pre-configured with Azure OpenAI for end
|
|
|
40
40
|
| `AZURE_ENDPOINT` | Required | Azure API address, can be found in the "Keys and Endpoints" section when checking resources in the Azure portal | - | `https://docs-test-001.openai.azure.com` |
|
|
41
41
|
| `AZURE_API_VERSION` | Required | Azure API version, following the format YYYY-MM-DD | 2023-08-01-preview | `-`, see [latest version](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions) |
|
|
42
42
|
| `AZURE_MODEL_LIST` | Required | Used to control the model list, use `+` to add a model, use `-` to hide a model, use `id->deplymentName=displayName` to customize the display name of a model, separated by commas. Definition syntax rules see [Model List](/docs/self-hosting/advanced/model-list) | - | `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` or `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>` |
|
|
43
|
-
| `ACCESS_CODE` | Optional | Add a password to access LobeHub. You can set a long password to prevent brute force attacks. When this value is separated by commas, it becomes an array of passwords | - | `awCT74` or `e3@09!` or `code1,code2,code3` |
|
|
@@ -42,4 +42,3 @@ LobeHub 支持使用 [Azure OpenAI](https://learn.microsoft.com/zh-cn/azure/ai-s
|
|
|
42
42
|
| `AZURE_ENDPOINT` | 必选 | Azure API 地址,从 Azure 门户检查资源时,可在 “密钥和终结点” 部分中找到此值 | - | `https://docs-test-001.openai.azure.com` |
|
|
43
43
|
| `AZURE_API_VERSION` | 必选 | Azure 的 API 版本,遵循 YYYY-MM-DD 格式 | 2023-08-01-preview | `-`,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions) |
|
|
44
44
|
| `AZURE_MODEL_LIST` | 必选 | 用来控制模型列表,使用 `模型名->部署名=展示名` 来自定义模型的展示名,用英文逗号隔开。支持扩展能力,其余语法规则详见 [模型列表](/zh/docs/self-hosting/advanced/model-list) | - | `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` 或 `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>` |
|
|
45
|
-
| `ACCESS_CODE` | 可选 | 添加访问 LobeHub 的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | - | `awCT74` 或 `e3@09!` or `code1,code2,code3` |
|
|
@@ -21,8 +21,8 @@ Recheck and confirm whether `OPENAI_PROXY_URL` is set correctly, including wheth
|
|
|
21
21
|
|
|
22
22
|
### Related Discussion Links
|
|
23
23
|
|
|
24
|
-
- [Why is the return value blank after configuring environment variables in Docker?](https://github.com/lobehub/
|
|
25
|
-
- [Reasons for errors when using third-party interfaces](https://github.com/lobehub/
|
|
26
|
-
- [No response when the proxy server address is filled in for chat](https://github.com/lobehub/
|
|
24
|
+
- [Why is the return value blank after configuring environment variables in Docker?](https://github.com/lobehub/lobehub/discussions/623)
|
|
25
|
+
- [Reasons for errors when using third-party interfaces](https://github.com/lobehub/lobehub/discussions/734)
|
|
26
|
+
- [No response when the proxy server address is filled in for chat](https://github.com/lobehub/lobehub/discussions/1065)
|
|
27
27
|
|
|
28
28
|
If the problem still cannot be resolved, it is recommended to raise the issue in the community, providing relevant logs and configuration information for other developers or maintainers to offer assistance.
|
|
@@ -20,8 +20,8 @@ tags:
|
|
|
20
20
|
|
|
21
21
|
### 相关讨论链接
|
|
22
22
|
|
|
23
|
-
- [Docker 安装,配置好环境变量后,为何返回值是空白?](https://github.com/lobehub/
|
|
24
|
-
- [使用第三方接口报错的原因](https://github.com/lobehub/
|
|
25
|
-
- [代理服务器地址填了聊天没任何反应](https://github.com/lobehub/
|
|
23
|
+
- [Docker 安装,配置好环境变量后,为何返回值是空白?](https://github.com/lobehub/lobehub/discussions/623)
|
|
24
|
+
- [使用第三方接口报错的原因](https://github.com/lobehub/lobehub/discussions/734)
|
|
25
|
+
- [代理服务器地址填了聊天没任何反应](https://github.com/lobehub/lobehub/discussions/1065)
|
|
26
26
|
|
|
27
27
|
如果问题依旧无法解决,建议在社区中提出问题,附上相关日志和配置信息,以便其他开发者或维护者提供帮助。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Migrating from Clerk to Better Auth
|
|
3
3
|
description: >-
|
|
4
|
-
Guide for migrating your
|
|
4
|
+
Guide for migrating your LobeHub deployment from Clerk authentication to
|
|
5
5
|
Better Auth, including simple and full migration options.
|
|
6
6
|
tags:
|
|
7
7
|
- Authentication Service
|
|
@@ -12,17 +12,17 @@ tags:
|
|
|
12
12
|
|
|
13
13
|
# Migrating from Clerk to Better Auth
|
|
14
14
|
|
|
15
|
-
This guide helps you migrate your existing Clerk-based
|
|
15
|
+
This guide helps you migrate your existing Clerk-based LobeHub deployment to Better Auth.
|
|
16
16
|
|
|
17
17
|
<Callout type={'info'}>
|
|
18
|
-
Better Auth is the recommended authentication solution for
|
|
18
|
+
Better Auth is the recommended authentication solution for LobeHub. It offers simpler configuration, more SSO providers, and better self-hosting support.
|
|
19
19
|
</Callout>
|
|
20
20
|
|
|
21
21
|
<Callout type={'error'}>
|
|
22
22
|
**Important Notice**:
|
|
23
23
|
|
|
24
24
|
- **Always backup your database first!** For Neon users, create a backup via [Fork Branch](https://neon.tech/docs/manage/branches#create-a-branch)
|
|
25
|
-
-
|
|
25
|
+
- LobeHub is not responsible for any data loss or issues that may occur during the migration process
|
|
26
26
|
- This guide is intended for users with development experience; not recommended for users without technical background
|
|
27
27
|
- If you have any questions, feel free to ask in our [Discord](https://discord.com/invite/AYFPHvv2jT) community or [GitHub Issue](https://github.com/lobehub/lobe-chat/issues/11707)
|
|
28
28
|
</Callout>
|
|
@@ -83,7 +83,7 @@ For small self-hosted deployments, the simplest approach is to let users reset t
|
|
|
83
83
|
See [Authentication Service Configuration](/docs/self-hosting/advanced/auth) for complete environment variables and SSO provider setup.
|
|
84
84
|
</Callout>
|
|
85
85
|
|
|
86
|
-
3. **Redeploy
|
|
86
|
+
3. **Redeploy LobeHub**
|
|
87
87
|
|
|
88
88
|
Deploy the new version with Better Auth enabled.
|
|
89
89
|
|
|
@@ -102,7 +102,7 @@ For small self-hosted deployments, the simplest approach is to let users reset t
|
|
|
102
102
|
- Log in using their previously linked social account (e.g., Google, GitHub)
|
|
103
103
|
- Click "Set Password" to receive an email and set a new password
|
|
104
104
|
|
|
105
|
-

|
|
106
106
|
|
|
107
107
|
3. (Optional) After logging in, users can manage their account in the Profile page:
|
|
108
108
|
- Linked Accounts: Link additional social accounts
|
|
@@ -139,7 +139,7 @@ For larger deployments or when you need to preserve user passwords and SSO conne
|
|
|
139
139
|
|
|
140
140
|
**Preparation:**
|
|
141
141
|
|
|
142
|
-
1. Clone the
|
|
142
|
+
1. Clone the LobeHub repository and install dependencies:
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
145
|
git clone https://github.com/lobehub/lobe-chat.git
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 从 Clerk 迁移到 Better Auth
|
|
3
|
-
description: 将
|
|
3
|
+
description: 将 LobeHub 部署从 Clerk 身份验证迁移到 Better Auth 的指南,包括简单迁移和完整迁移选项。
|
|
4
4
|
tags:
|
|
5
5
|
- 身份验证服务
|
|
6
6
|
- Better Auth
|
|
@@ -10,17 +10,17 @@ tags:
|
|
|
10
10
|
|
|
11
11
|
# 从 Clerk 迁移到 Better Auth
|
|
12
12
|
|
|
13
|
-
本指南帮助您将现有的基于 Clerk 的
|
|
13
|
+
本指南帮助您将现有的基于 Clerk 的 LobeHub 部署迁移到 Better Auth。
|
|
14
14
|
|
|
15
15
|
<Callout type={'info'}>
|
|
16
|
-
Better Auth 是
|
|
16
|
+
Better Auth 是 LobeHub 推荐的身份验证解决方案。它提供更简单的配置、更多的 SSO 提供商支持,以及更好的自托管体验。
|
|
17
17
|
</Callout>
|
|
18
18
|
|
|
19
19
|
<Callout type={'error'}>
|
|
20
20
|
**重要提醒**:
|
|
21
21
|
|
|
22
22
|
- **务必先备份数据库**!如使用 Neon,可通过 [Fork 分支](https://neon.tech/docs/manage/branches#create-a-branch) 创建备份
|
|
23
|
-
- 迁移过程中可能出现的任何数据丢失或问题,
|
|
23
|
+
- 迁移过程中可能出现的任何数据丢失或问题,LobeHub 概不负责
|
|
24
24
|
- 本指南适合有一定开发背景的用户,不建议无技术经验的用户自行操作
|
|
25
25
|
- 如有任何疑问,欢迎到 [Discord](https://discord.com/invite/AYFPHvv2jT) 社区或 [GitHub Issue](https://github.com/lobehub/lobe-chat/issues/11707) 提问
|
|
26
26
|
</Callout>
|
|
@@ -81,7 +81,7 @@ tags:
|
|
|
81
81
|
查阅 [身份验证服务配置](/zh/docs/self-hosting/advanced/auth) 了解完整的环境变量和 SSO 提供商配置。
|
|
82
82
|
</Callout>
|
|
83
83
|
|
|
84
|
-
3. **重新部署
|
|
84
|
+
3. **重新部署 LobeHub**
|
|
85
85
|
|
|
86
86
|
部署启用 Better Auth 的新版本。
|
|
87
87
|
|
|
@@ -99,7 +99,7 @@ tags:
|
|
|
99
99
|
- 使用之前关联的社交账号(如 Google、GitHub)登录
|
|
100
100
|
- 点击「设置密码」链接,通过邮件设置新密码后登录
|
|
101
101
|
|
|
102
|
-

|
|
103
103
|
|
|
104
104
|
3. (可选)登录后可在个人资料页进行以下操作:
|
|
105
105
|
- 已关联账号:手动关联其他社交账号
|
|
@@ -134,7 +134,7 @@ tags:
|
|
|
134
134
|
|
|
135
135
|
**准备工作:**
|
|
136
136
|
|
|
137
|
-
1. Clone
|
|
137
|
+
1. Clone LobeHub 仓库并安装依赖:
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
140
|
git clone https://github.com/lobehub/lobe-chat.git
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Understanding Auth Migration - Technical Deep Dive
|
|
3
3
|
description: >-
|
|
4
|
-
Technical explanation of how authentication migration works in
|
|
4
|
+
Technical explanation of how authentication migration works in LobeHub,
|
|
5
5
|
including database schema, migration principles, and troubleshooting guide.
|
|
6
6
|
tags:
|
|
7
7
|
- Authentication
|
|
@@ -12,7 +12,7 @@ tags:
|
|
|
12
12
|
|
|
13
13
|
# Understanding Auth Migration
|
|
14
14
|
|
|
15
|
-
This document explains the technical principles behind authentication migration in
|
|
15
|
+
This document explains the technical principles behind authentication migration in LobeHub. It's intended for users with database and development experience who want to understand how migration works under the hood.
|
|
16
16
|
|
|
17
17
|
<Callout type={'info'}>
|
|
18
18
|
For step-by-step migration instructions, see [NextAuth Migration](/docs/self-hosting/advanced/auth/nextauth-to-betterauth) or [Clerk Migration](/docs/self-hosting/advanced/auth/clerk-to-betterauth).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 认证迁移原理 - 技术深入解析
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
4
|
+
LobeHub 认证迁移的技术原理解析,包括数据库 Schema、迁移原理和问题排查指南。
|
|
5
5
|
tags:
|
|
6
6
|
- 认证
|
|
7
7
|
- 迁移
|
|
@@ -11,7 +11,7 @@ tags:
|
|
|
11
11
|
|
|
12
12
|
# 认证迁移原理
|
|
13
13
|
|
|
14
|
-
本文档解释
|
|
14
|
+
本文档解释 LobeHub 认证迁移的技术原理,适合有数据库和开发经验的用户,帮助理解迁移的底层逻辑。
|
|
15
15
|
|
|
16
16
|
<Callout type={'info'}>
|
|
17
17
|
如需分步迁移指南,请参阅 [NextAuth 迁移](/docs/self-hosting/advanced/auth/nextauth-to-betterauth) 或 [Clerk 迁移](/docs/self-hosting/advanced/auth/clerk-to-betterauth)。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Migrating from NextAuth to Better Auth
|
|
3
3
|
description: >-
|
|
4
|
-
Guide for migrating your
|
|
4
|
+
Guide for migrating your LobeHub deployment from NextAuth authentication to
|
|
5
5
|
Better Auth, including simple and full migration options.
|
|
6
6
|
tags:
|
|
7
7
|
- Authentication Service
|
|
@@ -12,17 +12,17 @@ tags:
|
|
|
12
12
|
|
|
13
13
|
# Migrating from NextAuth to Better Auth
|
|
14
14
|
|
|
15
|
-
This guide helps you migrate your existing NextAuth-based
|
|
15
|
+
This guide helps you migrate your existing NextAuth-based LobeHub deployment to Better Auth.
|
|
16
16
|
|
|
17
17
|
<Callout type={'info'}>
|
|
18
|
-
Better Auth is the recommended authentication solution for
|
|
18
|
+
Better Auth is the recommended authentication solution for LobeHub. It offers simpler configuration, more SSO providers, and better self-hosting support.
|
|
19
19
|
</Callout>
|
|
20
20
|
|
|
21
21
|
<Callout type={'error'}>
|
|
22
22
|
**Important Notice**:
|
|
23
23
|
|
|
24
24
|
- **Always backup your database first!** For Neon users, create a backup via [Fork Branch](https://neon.tech/docs/manage/branches#create-a-branch)
|
|
25
|
-
-
|
|
25
|
+
- LobeHub is not responsible for any data loss or issues that may occur during the migration process
|
|
26
26
|
- This guide is intended for users with development experience; not recommended for users without technical background
|
|
27
27
|
- If you have any questions, feel free to ask in our [Discord](https://discord.com/invite/AYFPHvv2jT) community or [GitHub Issue](https://github.com/lobehub/lobe-chat/issues)
|
|
28
28
|
</Callout>
|
|
@@ -136,7 +136,7 @@ For small self-hosted deployments, the simplest approach is to let users re-logi
|
|
|
136
136
|
See [Authentication Service Configuration](/docs/self-hosting/advanced/auth) for complete environment variables and SSO provider setup.
|
|
137
137
|
</Callout>
|
|
138
138
|
|
|
139
|
-
2. **Redeploy
|
|
139
|
+
2. **Redeploy LobeHub**
|
|
140
140
|
|
|
141
141
|
Deploy the new version with Better Auth enabled.
|
|
142
142
|
|
|
@@ -172,7 +172,7 @@ For larger deployments or when you need to preserve SSO connections, use the mig
|
|
|
172
172
|
|
|
173
173
|
**Preparation:**
|
|
174
174
|
|
|
175
|
-
1. Clone the
|
|
175
|
+
1. Clone the LobeHub repository and install dependencies:
|
|
176
176
|
|
|
177
177
|
```bash
|
|
178
178
|
git clone https://github.com/lobehub/lobe-chat.git
|
|
@@ -337,7 +337,7 @@ This error occurs because the database schema is outdated. Run `pnpm db:migrate`
|
|
|
337
337
|
|
|
338
338
|
### email\_not\_found error
|
|
339
339
|
|
|
340
|
-
If you see a redirect to `signin?callbackUrl=...&error=email_not_found`, it means
|
|
340
|
+
If you see a redirect to `signin?callbackUrl=...&error=email_not_found`, it means LobeHub cannot get the user's email.
|
|
341
341
|
|
|
342
342
|
<Callout type={'warning'}>
|
|
343
343
|
**Important**: Better Auth currently **requires user email** for authentication. All SSO providers must be configured to return email information, otherwise users cannot log in.
|
|
@@ -347,23 +347,23 @@ Common causes:
|
|
|
347
347
|
|
|
348
348
|
**Cause 1: SSO connection not requesting email permission**
|
|
349
349
|
|
|
350
|
-
When configuring SSO connections (e.g., GitHub in Auth0), make sure to enable **Email Address** permission in the Attributes section.
|
|
350
|
+
When configuring SSO connections (e.g., GitHub in Auth0), make sure to enable **Email Address** permission in the Attributes section. LobeHub requires user email for authentication.
|
|
351
351
|
|
|
352
352
|
**Cause 2: User email not configured in identity provider**
|
|
353
353
|
|
|
354
354
|
For identity providers like Casdoor or Logto, users may not have an email configured.
|
|
355
355
|
|
|
356
356
|
<Callout type={'warning'}>
|
|
357
|
-
**Note for Casdoor Users**: Casdoor does not require users to have an email configured, but
|
|
357
|
+
**Note for Casdoor Users**: Casdoor does not require users to have an email configured, but LobeHub strongly depends on email for authentication. If you find migration difficult due to many users without email addresses, we recommend staying on [v2.0.0-next.344](https://github.com/lobehub/lobe-chat/releases/tag/v2.0.0-next.344) for now. We plan to provide a self-service migration feature in the future, where users without email will be redirected to a bind-email page when they log in.
|
|
358
358
|
</Callout>
|
|
359
359
|
|
|
360
360
|
Solution:
|
|
361
361
|
|
|
362
|
-
1. First configure the Webhook in
|
|
362
|
+
1. First configure the Webhook in LobeHub to sync user data from the identity provider:
|
|
363
363
|
- [Casdoor Webhook Configuration](/docs/self-hosting/advanced/auth/providers/casdoor)
|
|
364
364
|
- [Logto Webhook Configuration](/docs/self-hosting/advanced/auth/providers/logto)
|
|
365
365
|
2. Then configure the user's email in the identity provider's admin console
|
|
366
|
-
3. The user data will be synced to
|
|
366
|
+
3. The user data will be synced to LobeHub via Webhook, and the user can then log in
|
|
367
367
|
|
|
368
368
|
## Related Reading
|
|
369
369
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 从 NextAuth 迁移到 Better Auth
|
|
3
|
-
description: 将
|
|
3
|
+
description: 将 LobeHub 部署从 NextAuth 身份验证迁移到 Better Auth 的指南,包括简单迁移和完整迁移选项。
|
|
4
4
|
tags:
|
|
5
5
|
- 身份验证服务
|
|
6
6
|
- Better Auth
|
|
@@ -10,17 +10,17 @@ tags:
|
|
|
10
10
|
|
|
11
11
|
# 从 NextAuth 迁移到 Better Auth
|
|
12
12
|
|
|
13
|
-
本指南帮助您将现有的基于 NextAuth 的
|
|
13
|
+
本指南帮助您将现有的基于 NextAuth 的 LobeHub 部署迁移到 Better Auth。
|
|
14
14
|
|
|
15
15
|
<Callout type={'info'}>
|
|
16
|
-
Better Auth 是
|
|
16
|
+
Better Auth 是 LobeHub 推荐的身份验证解决方案。它提供更简单的配置、更多的 SSO 提供商支持,以及更好的自托管体验。
|
|
17
17
|
</Callout>
|
|
18
18
|
|
|
19
19
|
<Callout type={'error'}>
|
|
20
20
|
**重要提醒**:
|
|
21
21
|
|
|
22
22
|
- **务必先备份数据库**!如使用 Neon,可通过 [Fork 分支](https://neon.tech/docs/manage/branches#create-a-branch) 创建备份
|
|
23
|
-
- 迁移过程中可能出现的任何数据丢失或问题,
|
|
23
|
+
- 迁移过程中可能出现的任何数据丢失或问题,LobeHub 概不负责
|
|
24
24
|
- 本指南适合有一定开发背景的用户,不建议无技术经验的用户自行操作
|
|
25
25
|
- 如有任何疑问,欢迎到 [Discord](https://discord.com/invite/AYFPHvv2jT) 社区或 [GitHub Issue](https://github.com/lobehub/lobe-chat/issues) 提问
|
|
26
26
|
</Callout>
|
|
@@ -131,7 +131,7 @@ Better Auth 支持更多功能,以下是新增的环境变量:
|
|
|
131
131
|
查阅 [身份验证服务配置](/zh/docs/self-hosting/advanced/auth) 了解完整的环境变量和 SSO 提供商配置。
|
|
132
132
|
</Callout>
|
|
133
133
|
|
|
134
|
-
2. **重新部署
|
|
134
|
+
2. **重新部署 LobeHub**
|
|
135
135
|
|
|
136
136
|
部署启用 Better Auth 的新版本。
|
|
137
137
|
|
|
@@ -167,7 +167,7 @@ Better Auth 支持更多功能,以下是新增的环境变量:
|
|
|
167
167
|
|
|
168
168
|
**准备工作:**
|
|
169
169
|
|
|
170
|
-
1. Clone
|
|
170
|
+
1. Clone LobeHub 仓库并安装依赖:
|
|
171
171
|
|
|
172
172
|
```bash
|
|
173
173
|
git clone https://github.com/lobehub/lobe-chat.git
|
|
@@ -331,7 +331,7 @@ npx tsx scripts/nextauth-to-betterauth/verify.ts
|
|
|
331
331
|
|
|
332
332
|
### email\_not\_found 错误
|
|
333
333
|
|
|
334
|
-
如果登录时跳转到 `signin?callbackUrl=...&error=email_not_found`,说明
|
|
334
|
+
如果登录时跳转到 `signin?callbackUrl=...&error=email_not_found`,说明 LobeHub 无法获取用户邮箱。
|
|
335
335
|
|
|
336
336
|
<Callout type={'warning'}>
|
|
337
337
|
**重要提示**:Better Auth 目前**强依赖用户邮箱**进行身份认证。所有 SSO 提供商必须配置为返回邮箱信息,否则用户无法登录。
|
|
@@ -341,23 +341,23 @@ npx tsx scripts/nextauth-to-betterauth/verify.ts
|
|
|
341
341
|
|
|
342
342
|
**原因 1:SSO 连接未请求邮箱权限**
|
|
343
343
|
|
|
344
|
-
配置 SSO 连接时(如 Auth0 中的 GitHub 连接),务必在 **Attributes** 部分勾选 **Email Address** 权限。
|
|
344
|
+
配置 SSO 连接时(如 Auth0 中的 GitHub 连接),务必在 **Attributes** 部分勾选 **Email Address** 权限。LobeHub 需要用户邮箱进行身份认证。
|
|
345
345
|
|
|
346
346
|
**原因 2:用户在身份提供商中未配置邮箱**
|
|
347
347
|
|
|
348
348
|
对于 Casdoor、Logto 等身份提供商,用户可能没有配置邮箱。
|
|
349
349
|
|
|
350
350
|
<Callout type={'warning'}>
|
|
351
|
-
**Casdoor 用户注意**:Casdoor 不要求用户必须配置邮箱,但
|
|
351
|
+
**Casdoor 用户注意**:Casdoor 不要求用户必须配置邮箱,但 LobeHub 强依赖邮箱进行身份认证。如果因为大量用户没有邮箱而感觉迁移困难,建议暂时停留在 [v2.0.0-next.344](https://github.com/lobehub/lobe-chat/releases/tag/v2.0.0-next.344) 版本。后续官方计划提供用户端自助迁移功能,届时没有邮箱的用户登录时会被重定向到绑定邮箱页面。
|
|
352
352
|
</Callout>
|
|
353
353
|
|
|
354
354
|
解决方案:
|
|
355
355
|
|
|
356
|
-
1. 先在
|
|
356
|
+
1. 先在 LobeHub 中配置身份提供商的 Webhook 以同步用户数据:
|
|
357
357
|
- [Casdoor Webhook 配置](/zh/docs/self-hosting/advanced/auth/providers/casdoor)
|
|
358
358
|
- [Logto Webhook 配置](/zh/docs/self-hosting/advanced/auth/providers/logto)
|
|
359
359
|
2. 然后在身份提供商的管理后台为用户配置邮箱
|
|
360
|
-
3. 用户数据通过 Webhook 同步到
|
|
360
|
+
3. 用户数据通过 Webhook 同步到 LobeHub 后即可正常登录
|
|
361
361
|
|
|
362
362
|
## 相关阅读
|
|
363
363
|
|
|
@@ -78,4 +78,4 @@ LobeHub 2.0 recommends using **PostgreSQL 17** or higher.
|
|
|
78
78
|
|
|
79
79
|
This is because LobeHub 2.0 uses the [pg\_search](https://github.com/paradedb/paradedb/tree/main/pg_search) extension for full-text search capabilities. If you use Serverless Postgres services like Neon, the pg\_search extension is only available on PostgreSQL 17.
|
|
80
80
|
|
|
81
|
-
If you self-host your database with Docker, we recommend using the `
|
|
81
|
+
If you self-host your database with Docker, we recommend using the `paradedb/paradedb:latest-pg17` image.
|
|
@@ -76,4 +76,4 @@ LobeHub 2.0 推荐使用 **PostgreSQL 17** 及以上版本。
|
|
|
76
76
|
|
|
77
77
|
这是因为 LobeHub 2.0 使用了 [pg\_search](https://github.com/paradedb/paradedb/tree/main/pg_search) 插件来提供全文搜索能力。如果您使用 Neon 等 Serverless Postgres 服务,pg\_search 插件仅在 PostgreSQL 17 上可用。
|
|
78
78
|
|
|
79
|
-
如果您使用 Docker 自建数据库,推荐使用 `
|
|
79
|
+
如果您使用 Docker 自建数据库,推荐使用 `paradedb/paradedb:latest-pg17` 镜像。
|
|
@@ -8,7 +8,7 @@ tags:
|
|
|
8
8
|
- 部署指引
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# 使用 Docker Compose 部署 LobeHub
|
|
11
|
+
# 使用 Docker Compose 部署 LobeHub
|
|
12
12
|
|
|
13
13
|
<div style={{display:"flex", gap: 4}}>
|
|
14
14
|
[![][docker-release-shield]][docker-release-link]
|
|
@@ -254,13 +254,13 @@ mv .env.zh-CN.example .env
|
|
|
254
254
|
|
|
255
255
|
### 预备知识
|
|
256
256
|
|
|
257
|
-
一般来讲,想要完整的运行 LobeHub
|
|
257
|
+
一般来讲,想要完整的运行 LobeHub,你需要至少拥有如下三个服务:
|
|
258
258
|
|
|
259
|
-
- LobeHub
|
|
259
|
+
- LobeHub 自身
|
|
260
260
|
- 带有 PGVector 插件的 PostgreSQL 数据库
|
|
261
261
|
- 支持 S3 协议的对象存储服务
|
|
262
262
|
|
|
263
|
-
这些服务可以通过自建或者在线云服务组合搭配,以满足不同层次的部署需求。本文中,我们提供了完全基于开源自建服务的 Docker Compose 配置,你可以直接使用这份配置文件来启动 LobeHub
|
|
263
|
+
这些服务可以通过自建或者在线云服务组合搭配,以满足不同层次的部署需求。本文中,我们提供了完全基于开源自建服务的 Docker Compose 配置,你可以直接使用这份配置文件来启动 LobeHub,也可以对之进行修改以适应你的需求。
|
|
264
264
|
|
|
265
265
|
我们默认使用 [RustFS](https://github.com/rustfs/rustfs) 作为本地 S3 对象存储服务。如需配置 SSO 登录鉴权服务,请参考 [身份验证服务](/zh/docs/self-hosting/advanced/auth) 文档。
|
|
266
266
|
|
|
@@ -35,19 +35,19 @@ Here is the process for deploying the LobeHub server database version on a Linux
|
|
|
35
35
|
<Steps>
|
|
36
36
|
### Create a Postgres Database Instance
|
|
37
37
|
|
|
38
|
-
Please create a Postgres database instance
|
|
38
|
+
Please create a Postgres database instance according to your needs, for example:
|
|
39
39
|
|
|
40
40
|
```sh
|
|
41
41
|
docker network create pg
|
|
42
42
|
|
|
43
|
-
docker run --name my-postgres --network pg -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d
|
|
43
|
+
docker run --name my-postgres --network pg -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d paradedb/paradedb:latest-pg17
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
The above command will create a PG instance named `my-postgres` on the network `pg`, where `
|
|
46
|
+
The above command will create a PG instance named `my-postgres` on the network `pg`, where `paradedb/paradedb:latest-pg17` is a Postgres 17 image with pgvector and pg\_search plugins installed by default.
|
|
47
47
|
|
|
48
48
|
<Callout type="info">
|
|
49
|
-
The
|
|
50
|
-
|
|
49
|
+
The ParadeDB image includes pgvector (vector search) and pg\_search (full-text search) plugins, which are important
|
|
50
|
+
components for LobeHub to implement RAG and knowledge base search.
|
|
51
51
|
</Callout>
|
|
52
52
|
|
|
53
53
|
<Callout type="warning">
|
|
@@ -8,7 +8,7 @@ tags:
|
|
|
8
8
|
- Postgres
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# 使用 Docker
|
|
11
|
+
# 使用 Docker 部署 LobeHub
|
|
12
12
|
|
|
13
13
|
<div style={{display:"flex", gap: 4}}>
|
|
14
14
|
[![][docker-release-shield]][docker-release-link]
|
|
@@ -19,32 +19,32 @@ tags:
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<Callout type="info">
|
|
22
|
-
本文已经假定你了解了 LobeHub
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
本文已经假定你了解了 LobeHub
|
|
23
|
+
的部署基本原理和流程,因此只包含核心环境变量配置的内容。如果你还不了解 LobeHub
|
|
24
|
+
的部署原理,请先查阅 [使用服务端数据库部署](/zh/docs/self-hosting/server-database) 。
|
|
25
25
|
此外,针对国内的腾讯云储存桶用户,可查询[配置腾讯云 COS
|
|
26
26
|
存储服务](/zh/docs/self-hosting/advanced/s3/tencent-cloud)。
|
|
27
27
|
</Callout>
|
|
28
28
|
|
|
29
29
|
## 在 Linux 服务器上部署
|
|
30
30
|
|
|
31
|
-
以下是在 Linux 服务器上部署 LobeHub
|
|
31
|
+
以下是在 Linux 服务器上部署 LobeHub 的流程:
|
|
32
32
|
|
|
33
33
|
<Steps>
|
|
34
34
|
### 创建 Postgres 数据库实例
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
请按照你自己的诉求创建一个 Postgres 数据库实例,例如:
|
|
37
37
|
|
|
38
38
|
```sh
|
|
39
39
|
docker network create pg
|
|
40
40
|
|
|
41
|
-
docker run --name my-postgres --network pg -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d
|
|
41
|
+
docker run --name my-postgres --network pg -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d paradedb/paradedb:latest-pg17
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
上述指令会创建一个名为 `my-postgres`,并且网络为 `pg` 的 PG 实例,其中 `
|
|
44
|
+
上述指令会创建一个名为 `my-postgres`,并且网络为 `pg` 的 PG 实例,其中 `paradedb/paradedb:latest-pg17` 是一个 Postgres 17 的镜像,且默认安装了 pgvector 和 pg\_search 插件。
|
|
45
45
|
|
|
46
46
|
<Callout type="info">
|
|
47
|
-
|
|
47
|
+
ParadeDB 镜像包含了 pgvector(向量搜索)和 pg\_search(全文搜索)插件,是 LobeHub 实现 RAG 和知识库搜索的重要构件。
|
|
48
48
|
</Callout>
|
|
49
49
|
|
|
50
50
|
<Callout type="warning">
|
|
@@ -125,7 +125,7 @@ tags:
|
|
|
125
125
|
|
|
126
126
|
## 在本地(Mac / Windows) 上使用
|
|
127
127
|
|
|
128
|
-
LobeHub
|
|
128
|
+
LobeHub 也支持直接在本地的 Mac/Windows 本地使用。
|
|
129
129
|
|
|
130
130
|
在此我们已假设你的本地有一个 5432 端口可用,账号为 `postgres` ,密码是 `mysecretpassword` 的 pg 实例,它在 `localhost:5432` 可用。
|
|
131
131
|
|
|
@@ -67,7 +67,7 @@ You also need to configure the `JWKS_KEY` environment variable for signing and v
|
|
|
67
67
|
|
|
68
68
|
## 2. Deploying the database on Dokploy
|
|
69
69
|
|
|
70
|
-
Enter the previously created Project, click on Create Service, and select Database. In the Database interface, choose PostgreSQL, then set the database name, user, and password. In the Docker image field, enter `
|
|
70
|
+
Enter the previously created Project, click on Create Service, and select Database. In the Database interface, choose PostgreSQL, then set the database name, user, and password. In the Docker image field, enter `paradedb/paradedb:latest-pg17`, and finally click Create to create the database.
|
|
71
71
|
|
|
72
72
|

|
|
73
73
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: 在 Dokploy 上部署 LobeHub
|
|
3
|
-
description: 本文详细介绍如何在 Dokploy
|
|
2
|
+
title: 在 Dokploy 上部署 LobeHub
|
|
3
|
+
description: 本文详细介绍如何在 Dokploy 中部署 LobeHub,包括数据库配置、身份验证服务配置的设置步骤。
|
|
4
4
|
tags:
|
|
5
5
|
- 服务端数据库
|
|
6
6
|
- Postgres
|
|
@@ -11,9 +11,9 @@ tags:
|
|
|
11
11
|
- 环境变量配置
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
# 在 Dokploy
|
|
14
|
+
# 在 Dokploy 上部署 LobeHub
|
|
15
15
|
|
|
16
|
-
本文将详细介绍如何在 Dokploy
|
|
16
|
+
本文将详细介绍如何在 Dokploy 中部署 LobeHub。
|
|
17
17
|
|
|
18
18
|
## 一、准备工作
|
|
19
19
|
|
|
@@ -68,7 +68,7 @@ S3_ENABLE_PATH_STYLE=
|
|
|
68
68
|
|
|
69
69
|
## 二、在 Dokploy 上部署数据库
|
|
70
70
|
|
|
71
|
-
进入前面创建的 Project,点击 Create Service 选择 Database,在 Database 界面选择 PostgreSQL ,然后设置数据库名、用户、密码,在 Docker image 中填入 `
|
|
71
|
+
进入前面创建的 Project,点击 Create Service 选择 Database,在 Database 界面选择 PostgreSQL ,然后设置数据库名、用户、密码,在 Docker image 中填入 `paradedb/paradedb:latest-pg17` 最后点击 Create 创建数据库。
|
|
72
72
|
|
|
73
73
|

|
|
74
74
|
|