@lobehub/lobehub 2.0.2 → 2.0.4
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/.github/ISSUE_TEMPLATE/1_bug_report.yml +0 -11
- package/CHANGELOG.md +51 -0
- package/README.md +9 -13
- package/README.zh-CN.md +6 -8
- package/apps/desktop/Development.md +1 -1
- package/changelog/v2.json +18 -0
- package/docker-compose/local/docker-compose.yml +2 -2
- package/docker-compose/local/grafana/docker-compose.yml +3 -3
- package/docker-compose/local/logto/docker-compose.yml +3 -4
- package/docker-compose/local/zitadel/.env.example +3 -4
- package/docker-compose/local/zitadel/.env.zh-CN.example +1 -2
- package/docker-compose/local/zitadel/docker-compose.yml +3 -3
- package/docker-compose/production/grafana/docker-compose.yml +3 -3
- package/docker-compose/production/logto/.env.example +7 -9
- package/docker-compose/production/logto/.env.zh-CN.example +7 -9
- package/docker-compose/production/logto/docker-compose.yml +3 -3
- package/docker-compose/production/zitadel/.env.example +4 -6
- package/docker-compose/production/zitadel/.env.zh-CN.example +3 -5
- package/docker-compose/production/zitadel/docker-compose.yml +3 -3
- package/docs/development/basic/folder-structure.mdx +1 -2
- package/docs/development/basic/folder-structure.zh-CN.mdx +1 -2
- package/docs/self-hosting/advanced/auth/legacy.mdx +1 -1
- package/docs/self-hosting/advanced/auth/legacy.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/auth/nextauth-to-betterauth.mdx +4 -0
- package/docs/self-hosting/advanced/auth/nextauth-to-betterauth.zh-CN.mdx +4 -0
- package/docs/self-hosting/advanced/auth/providers/casdoor.mdx +8 -0
- package/docs/self-hosting/advanced/auth/providers/casdoor.zh-CN.mdx +8 -0
- package/docs/self-hosting/advanced/auth.mdx +28 -1
- package/docs/self-hosting/advanced/auth.zh-CN.mdx +29 -2
- package/docs/self-hosting/advanced/upstream-sync.mdx +5 -5
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +5 -5
- package/docs/self-hosting/environment-variables/auth.mdx +2 -334
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +2 -307
- package/docs/self-hosting/environment-variables/basic.mdx +1 -1
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables.mdx +1 -1
- package/docs/self-hosting/platform/docker-compose.mdx +837 -90
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +809 -84
- package/docs/self-hosting/platform/docker.mdx +110 -111
- package/docs/self-hosting/platform/docker.zh-CN.mdx +103 -151
- package/docs/self-hosting/{server-database → platform}/dokploy.mdx +2 -2
- package/docs/self-hosting/{server-database → platform}/dokploy.zh-CN.mdx +2 -2
- package/docs/self-hosting/platform/repocloud.mdx +11 -10
- package/docs/self-hosting/platform/repocloud.zh-CN.mdx +13 -11
- package/docs/self-hosting/platform/sealos.mdx +79 -13
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +92 -11
- package/docs/self-hosting/platform/vercel.mdx +323 -19
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +318 -24
- package/docs/self-hosting/platform/zeabur.mdx +41 -37
- package/docs/self-hosting/platform/zeabur.zh-CN.mdx +34 -39
- package/docs/self-hosting/server-database.mdx +6 -6
- package/docs/self-hosting/server-database.zh-CN.mdx +5 -5
- package/locales/en-US/setting.json +2 -0
- package/locales/zh-CN/setting.json +2 -0
- package/package.json +2 -2
- package/packages/agent-runtime/src/agents/GeneralChatAgent.ts +18 -14
- package/packages/agent-runtime/src/types/generalAgent.ts +5 -4
- package/packages/types/src/user/preference.ts +2 -2
- package/scripts/_shared/checkDeprecatedAuth.js +16 -0
- package/src/features/ChatInput/ActionBar/Params/Controls.tsx +17 -1
- package/src/features/ModelSelect/index.tsx +1 -1
- package/src/libs/next/proxy/createRouteMatcher.test.ts +0 -8
- package/src/libs/trpc/middleware/userAuth.test.ts +0 -6
- package/src/locales/default/setting.ts +3 -0
- package/src/proxy.ts +0 -1
- package/src/server/routers/async/__tests__/caller.test.ts +2 -2
- package/src/server/routers/lambda/config/index.test.ts +0 -6
- package/src/server/services/agentRuntime/AgentRuntimeService.ts +4 -2
- package/src/store/chat/slices/aiChat/actions/streamingExecutor.ts +3 -0
- package/src/store/chat/slices/message/selectors/displayMessage.test.ts +21 -0
- package/src/store/chat/slices/message/selectors/displayMessage.ts +7 -2
- package/docs/self-hosting/platform/alibaba-cloud.mdx +0 -28
- package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +0 -25
- package/docs/self-hosting/platform/btpanel.mdx +0 -48
- package/docs/self-hosting/platform/btpanel.zh-CN.mdx +0 -51
- package/docs/self-hosting/platform/netlify.mdx +0 -91
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +0 -86
- package/docs/self-hosting/platform/railway.mdx +0 -29
- package/docs/self-hosting/platform/railway.zh-CN.mdx +0 -29
- package/docs/self-hosting/platform/tencentcloud-lighthouse.mdx +0 -29
- package/docs/self-hosting/platform/tencentcloud-lighthouse.zh-CN.mdx +0 -26
- package/docs/self-hosting/server-database/docker-compose.mdx +0 -879
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +0 -854
- package/docs/self-hosting/server-database/docker.mdx +0 -154
- package/docs/self-hosting/server-database/docker.zh-CN.mdx +0 -153
- package/docs/self-hosting/server-database/netlify.mdx +0 -13
- package/docs/self-hosting/server-database/netlify.zh-CN.mdx +0 -16
- package/docs/self-hosting/server-database/railway.mdx +0 -13
- package/docs/self-hosting/server-database/railway.zh-CN.mdx +0 -15
- package/docs/self-hosting/server-database/repocloud.mdx +0 -33
- package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +0 -32
- package/docs/self-hosting/server-database/sealos.mdx +0 -97
- package/docs/self-hosting/server-database/sealos.zh-CN.mdx +0 -112
- package/docs/self-hosting/server-database/vercel.mdx +0 -344
- package/docs/self-hosting/server-database/vercel.zh-CN.mdx +0 -337
- package/docs/self-hosting/server-database/zeabur.mdx +0 -76
- package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +0 -67
|
@@ -47,17 +47,6 @@ body:
|
|
|
47
47
|
validations:
|
|
48
48
|
required: false
|
|
49
49
|
|
|
50
|
-
- type: dropdown
|
|
51
|
-
attributes:
|
|
52
|
-
label: '🔧 Deployment Mode'
|
|
53
|
-
multiple: true
|
|
54
|
-
options:
|
|
55
|
-
- 'client db (lobe-chat image)'
|
|
56
|
-
- 'client pgelite db (lobe-chat-pglite image)'
|
|
57
|
-
- 'server db (lobe-chat-database image)'
|
|
58
|
-
validations:
|
|
59
|
-
required: true
|
|
60
|
-
|
|
61
50
|
- type: input
|
|
62
51
|
attributes:
|
|
63
52
|
label: '📌 Version'
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 2.0.4](https://github.com/lobehub/lobe-chat/compare/v2.0.3...v2.0.4)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2026-01-27**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Rename docker image and update docs for v2.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Rename docker image and update docs for v2, closes [#11911](https://github.com/lobehub/lobe-chat/issues/11911) ([e6cb6cb](https://github.com/lobehub/lobe-chat/commit/e6cb6cb))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 2.0.3](https://github.com/lobehub/lobe-chat/compare/v2.0.2...v2.0.3)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2026-01-27**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Fixed compressed group message & open the switch config to control compression config enabled, fixed the onboarding crash problem.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: Fixed compressed group message & open the switch config to control compression config enabled, closes [#11901](https://github.com/lobehub/lobe-chat/issues/11901) ([dc51838](https://github.com/lobehub/lobe-chat/commit/dc51838))
|
|
46
|
+
- **misc**: Fixed the onboarding crash problem, closes [#11905](https://github.com/lobehub/lobe-chat/issues/11905) ([439e4ee](https://github.com/lobehub/lobe-chat/commit/439e4ee))
|
|
47
|
+
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
<div align="right">
|
|
51
|
+
|
|
52
|
+
[](#readme-top)
|
|
53
|
+
|
|
54
|
+
</div>
|
|
55
|
+
|
|
5
56
|
### [Version 2.0.2](https://github.com/lobehub/lobe-chat/compare/v2.0.1...v2.0.2)
|
|
6
57
|
|
|
7
58
|
<sup>Released on **2026-01-27**</sup>
|
package/README.md
CHANGED
|
@@ -479,13 +479,9 @@ Regardless of which database you choose, LobeHub can provide you with an excelle
|
|
|
479
479
|
|
|
480
480
|
### [Support Multi-User Management][docs-feat-auth]
|
|
481
481
|
|
|
482
|
-
LobeHub supports multi-user management and provides
|
|
482
|
+
LobeHub supports multi-user management and provides flexible user authentication solutions:
|
|
483
483
|
|
|
484
|
-
- **
|
|
485
|
-
|
|
486
|
-
- [**Clerk**](https://go.clerk.com/exgqLG0): For users who need more advanced user management features, LobeHub also supports `Clerk`, a modern user management platform. `Clerk` provides richer functions, such as multi-factor authentication (MFA), user profile management, login activity monitoring, etc. With `Clerk`, you can get higher security and flexibility, and easily cope with complex user management needs.
|
|
487
|
-
|
|
488
|
-
Regardless of which user management solution you choose, LobeHub can provide you with an excellent user experience and powerful functional support.
|
|
484
|
+
- **Better Auth**: LobeHub integrates `Better Auth`, a modern and flexible authentication library that supports multiple authentication methods, including OAuth, email login, credential login, magic links, and more. With `Better Auth`, you can easily implement user registration, login, session management, social login, multi-factor authentication (MFA), and other functions to ensure the security and privacy of user data.
|
|
489
485
|
|
|
490
486
|
<div align="right">
|
|
491
487
|
|
|
@@ -845,12 +841,12 @@ This project is [LobeHub Community License](./LICENSE) licensed.
|
|
|
845
841
|
[discord-link]: https://discord.gg/AYFPHvv2jT
|
|
846
842
|
[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square
|
|
847
843
|
[discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge
|
|
848
|
-
[docker-pulls-link]: https://hub.docker.com/r/lobehub/
|
|
849
|
-
[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/
|
|
850
|
-
[docker-release-link]: https://hub.docker.com/r/lobehub/
|
|
851
|
-
[docker-release-shield]: https://img.shields.io/docker/v/lobehub/
|
|
852
|
-
[docker-size-link]: https://hub.docker.com/r/lobehub/
|
|
853
|
-
[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/
|
|
844
|
+
[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobehub
|
|
845
|
+
[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobehub?color=45cc11&labelColor=black&style=flat-square&sort=semver
|
|
846
|
+
[docker-release-link]: https://hub.docker.com/r/lobehub/lobehub
|
|
847
|
+
[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobehub?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square&sort=semver
|
|
848
|
+
[docker-size-link]: https://hub.docker.com/r/lobehub/lobehub
|
|
849
|
+
[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobehub?color=369eff&labelColor=black&style=flat-square&sort=semver
|
|
854
850
|
[docs]: https://lobehub.com/docs/usage/start
|
|
855
851
|
[docs-dev-guide]: https://lobehub.com/docs/development/start
|
|
856
852
|
[docs-docker]: https://lobehub.com/docs/self-hosting/server-database/docker-compose
|
|
@@ -964,5 +960,5 @@ This project is [LobeHub Community License](./LICENSE) licensed.
|
|
|
964
960
|
[submit-agents-shield]: https://img.shields.io/badge/🤖/🏪_submit_agent-%E2%86%92-c4f042?labelColor=black&style=for-the-badge
|
|
965
961
|
[submit-plugin-link]: https://github.com/lobehub/lobe-chat-plugins
|
|
966
962
|
[submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-95f3d9?labelColor=black&style=for-the-badge
|
|
967
|
-
[vercel-link]: https://
|
|
963
|
+
[vercel-link]: https://app.lobehub.com
|
|
968
964
|
[vercel-shield]: https://img.shields.io/badge/vercel-online-55b467?labelColor=black&logo=vercel&style=flat-square
|
package/README.zh-CN.md
CHANGED
|
@@ -461,8 +461,6 @@ LobeHub 支持多用户管理,提供了灵活的用户认证方案:
|
|
|
461
461
|
|
|
462
462
|
- **Better Auth**:LobeHub 集成了 `Better Auth`,一个现代化且灵活的身份验证库,支持多种身份验证方式,包括 OAuth、邮件登录、凭证登录、魔法链接等。通过 `Better Auth`,您可以轻松实现用户的注册、登录、会话管理、社交登录、多因素认证 (MFA) 等功能,确保用户数据的安全性和隐私性。
|
|
463
463
|
|
|
464
|
-
- **next-auth**:LobeHub 还支持 `next-auth`,一个广泛使用的身份验证库,具有丰富的 OAuth 提供商支持和灵活的会话管理选项。
|
|
465
|
-
|
|
466
464
|
<div align="right">
|
|
467
465
|
|
|
468
466
|
[![][back-to-top]](#readme-top)
|
|
@@ -855,12 +853,12 @@ This project is [LobeHub Community License](./LICENSE) licensed.
|
|
|
855
853
|
[discord-link]: https://discord.gg/AYFPHvv2jT
|
|
856
854
|
[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square
|
|
857
855
|
[discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge
|
|
858
|
-
[docker-pulls-link]: https://hub.docker.com/r/lobehub/
|
|
859
|
-
[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/
|
|
860
|
-
[docker-release-link]: https://hub.docker.com/r/lobehub/
|
|
861
|
-
[docker-release-shield]: https://img.shields.io/docker/v/lobehub/
|
|
862
|
-
[docker-size-link]: https://hub.docker.com/r/lobehub/
|
|
863
|
-
[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/
|
|
856
|
+
[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobehub
|
|
857
|
+
[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobehub?color=45cc11&labelColor=black&style=flat-square&sort=semver
|
|
858
|
+
[docker-release-link]: https://hub.docker.com/r/lobehub/lobehub
|
|
859
|
+
[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobehub?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square&sort=semver
|
|
860
|
+
[docker-size-link]: https://hub.docker.com/r/lobehub/lobehub
|
|
861
|
+
[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobehub?color=369eff&labelColor=black&style=flat-square&sort=semver
|
|
864
862
|
[docs]: https://lobehub.com/zh/docs/usage/start
|
|
865
863
|
[docs-dev-guide]: https://lobehub.com/docs/development/start
|
|
866
864
|
[docs-docker]: https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose
|
package/changelog/v2.json
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"children": {
|
|
4
|
+
"fixes": [
|
|
5
|
+
"Rename docker image and update docs for v2."
|
|
6
|
+
]
|
|
7
|
+
},
|
|
8
|
+
"date": "2026-01-27",
|
|
9
|
+
"version": "2.0.4"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"children": {
|
|
13
|
+
"fixes": [
|
|
14
|
+
"Fixed compressed group message & open the switch config to control compression config enabled, fixed the onboarding crash problem."
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"date": "2026-01-27",
|
|
18
|
+
"version": "2.0.3"
|
|
19
|
+
},
|
|
2
20
|
{
|
|
3
21
|
"children": {
|
|
4
22
|
"fixes": [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: lobehub
|
|
2
2
|
services:
|
|
3
3
|
network-service:
|
|
4
4
|
image: alpine
|
|
@@ -128,7 +128,7 @@ services:
|
|
|
128
128
|
|
|
129
129
|
lobe:
|
|
130
130
|
image: lobehub/lobehub
|
|
131
|
-
container_name:
|
|
131
|
+
container_name: lobehub
|
|
132
132
|
network_mode: 'service:network-service'
|
|
133
133
|
depends_on:
|
|
134
134
|
postgresql:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: lobehub
|
|
2
2
|
services:
|
|
3
3
|
network-service:
|
|
4
4
|
image: alpine
|
|
@@ -159,8 +159,8 @@ services:
|
|
|
159
159
|
- ENDPOINT=127.0.0.1:4317
|
|
160
160
|
|
|
161
161
|
lobe:
|
|
162
|
-
image: lobehub/
|
|
163
|
-
container_name:
|
|
162
|
+
image: lobehub/lobehub
|
|
163
|
+
container_name: lobehub
|
|
164
164
|
network_mode: 'service:network-service'
|
|
165
165
|
depends_on:
|
|
166
166
|
postgresql:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: lobehub
|
|
2
2
|
services:
|
|
3
3
|
network-service:
|
|
4
4
|
image: alpine
|
|
@@ -79,8 +79,8 @@ services:
|
|
|
79
79
|
entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start']
|
|
80
80
|
|
|
81
81
|
lobe:
|
|
82
|
-
image: lobehub/
|
|
83
|
-
container_name:
|
|
82
|
+
image: lobehub/lobehub
|
|
83
|
+
container_name: lobehub
|
|
84
84
|
network_mode: 'service:network-service'
|
|
85
85
|
depends_on:
|
|
86
86
|
postgresql:
|
|
@@ -99,7 +99,6 @@ services:
|
|
|
99
99
|
- 'AUTH_SSO_PROVIDERS=logto'
|
|
100
100
|
- 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
|
|
101
101
|
- 'AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg'
|
|
102
|
-
- 'NEXTAUTH_URL=http://localhost:${LOBE_PORT}/api/auth'
|
|
103
102
|
- 'AUTH_LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc'
|
|
104
103
|
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
|
|
105
104
|
- 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Required: LobeChat domain for tRPC calls
|
|
2
|
-
# Ensure this domain is whitelisted in your
|
|
2
|
+
# Ensure this domain is whitelisted in your SSO providers and S3 service CORS settings
|
|
3
3
|
APP_URL=http://localhost:3210
|
|
4
4
|
|
|
5
5
|
# Postgres related environment variables
|
|
@@ -8,12 +8,11 @@ KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
|
|
|
8
8
|
# Required: Postgres database connection string
|
|
9
9
|
DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat
|
|
10
10
|
|
|
11
|
-
#
|
|
12
|
-
NEXTAUTH_URL=http://localhost:3210/api/auth
|
|
11
|
+
# Authentication related environment variables
|
|
13
12
|
AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
|
|
14
13
|
AUTH_SSO_PROVIDERS=zitadel
|
|
15
14
|
# ZiTADEL provider configuration
|
|
16
|
-
# Please refer to:https://lobehub.com/zh/docs/self-hosting/advanced/auth/
|
|
15
|
+
# Please refer to:https://lobehub.com/zh/docs/self-hosting/advanced/auth/providers/zitadel
|
|
17
16
|
AUTH_ZITADEL_ID=285945938244075523
|
|
18
17
|
AUTH_ZITADEL_SECRET=hkbtzHLaCEIeHeFThym14UcydpmQiEB5JtAX08HSqSoJxhAlVVkyovTuNUZ5TNrT
|
|
19
18
|
AUTH_ZITADEL_ISSUER=http://localhost:8080
|
|
@@ -7,8 +7,7 @@ KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
|
|
|
7
7
|
# Postgres 数据库连接字符串
|
|
8
8
|
DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat
|
|
9
9
|
|
|
10
|
-
#
|
|
11
|
-
NEXTAUTH_URL=http://localhost:3210/api/auth
|
|
10
|
+
# 鉴权相关
|
|
12
11
|
AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
|
|
13
12
|
AUTH_SSO_PROVIDERS=zitadel
|
|
14
13
|
# ZiTADEL 鉴权服务提供商部分
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: lobehub
|
|
2
2
|
services:
|
|
3
3
|
network-service:
|
|
4
4
|
image: alpine
|
|
@@ -60,8 +60,8 @@ services:
|
|
|
60
60
|
condition: service_healthy
|
|
61
61
|
|
|
62
62
|
lobe:
|
|
63
|
-
image: lobehub/
|
|
64
|
-
container_name:
|
|
63
|
+
image: lobehub/lobehub
|
|
64
|
+
container_name: lobehub
|
|
65
65
|
network_mode: 'service:network-service'
|
|
66
66
|
depends_on:
|
|
67
67
|
postgresql:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: lobehub
|
|
2
2
|
services:
|
|
3
3
|
network-service:
|
|
4
4
|
image: alpine
|
|
@@ -157,8 +157,8 @@ services:
|
|
|
157
157
|
- ENDPOINT=127.0.0.1:4317
|
|
158
158
|
|
|
159
159
|
lobe:
|
|
160
|
-
image: lobehub/
|
|
161
|
-
container_name:
|
|
160
|
+
image: lobehub/lobehub
|
|
161
|
+
container_name: lobehub
|
|
162
162
|
network_mode: 'service:network-service'
|
|
163
163
|
depends_on:
|
|
164
164
|
postgresql:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Required: LobeChat domain for tRPC calls
|
|
2
|
-
# Ensure this domain is whitelisted in your
|
|
2
|
+
# Ensure this domain is whitelisted in your SSO providers and S3 service CORS settings
|
|
3
3
|
APP_URL=https://lobe.example.com/
|
|
4
4
|
|
|
5
5
|
# Postgres related environment variables
|
|
@@ -10,18 +10,16 @@ KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
|
|
|
10
10
|
# If using Docker, you can use the container name as the host
|
|
11
11
|
DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobe
|
|
12
12
|
|
|
13
|
-
#
|
|
14
|
-
# Supports
|
|
15
|
-
# For supported providers, see: https://lobehub.com/docs/self-hosting/advanced/auth
|
|
16
|
-
# If you have ACCESS_CODE, please remove it. We use
|
|
17
|
-
# Required:
|
|
13
|
+
# Authentication related environment variables
|
|
14
|
+
# Supports Auth0, Azure AD, GitHub, Authentik, Zitadel, Logto, etc.
|
|
15
|
+
# For supported providers, see: https://lobehub.com/docs/self-hosting/advanced/auth
|
|
16
|
+
# If you have ACCESS_CODE, please remove it. We use Better Auth as the sole authentication source
|
|
17
|
+
# Required: Auth secret key. Generate with: openssl rand -base64 32
|
|
18
18
|
AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
|
|
19
19
|
# Required: Specify the authentication provider (e.g., Logto)
|
|
20
20
|
AUTH_SSO_PROVIDERS=logto
|
|
21
|
-
# Required: NextAuth URL for callbacks
|
|
22
|
-
NEXTAUTH_URL=https://lobe.example.com/api/auth
|
|
23
21
|
|
|
24
|
-
#
|
|
22
|
+
# SSO providers configuration (example using Logto)
|
|
25
23
|
# For other providers, see: https://lobehub.com/docs/self-hosting/environment-variables/auth
|
|
26
24
|
AUTH_LOGTO_ID=YOUR_LOGTO_ID
|
|
27
25
|
AUTH_LOGTO_SECRET=YOUR_LOGTO_SECRET
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# 必填,LobeChat 域名,用于 tRPC 调用
|
|
2
|
-
# 请保证此域名在你的
|
|
2
|
+
# 请保证此域名在你的 SSO 鉴权服务提供商、S3 服务商的 CORS 白名单中
|
|
3
3
|
APP_URL=https://lobe.example.com/
|
|
4
4
|
|
|
5
5
|
# Postgres 相关,也即 DB 必需的环境变量
|
|
@@ -9,18 +9,16 @@ KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
|
|
|
9
9
|
# 格式:postgresql://username:password@host:port/dbname,如果你的 pg 实例为 Docker 容器且位于同一 docker-compose 文件中,亦可使用容器名作为 host
|
|
10
10
|
DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobe
|
|
11
11
|
|
|
12
|
-
#
|
|
13
|
-
# 可以使用
|
|
14
|
-
# 目前支持的鉴权服务提供商请参考:https://lobehub.com/zh/docs/self-hosting/advanced/auth
|
|
15
|
-
# 如果你有 ACCESS_CODE,请务必清空,我们以
|
|
16
|
-
#
|
|
12
|
+
# 鉴权服务必需的环境变量
|
|
13
|
+
# 可以使用 Auth0、Azure AD、GitHub、Authentik、Zitadel、Logto 等,如有其他接入诉求欢迎提 PR
|
|
14
|
+
# 目前支持的鉴权服务提供商请参考:https://lobehub.com/zh/docs/self-hosting/advanced/auth
|
|
15
|
+
# 如果你有 ACCESS_CODE,请务必清空,我们以 Better Auth 作为唯一鉴权来源
|
|
16
|
+
# 必填,用于鉴权的密钥,可以使用 openssl rand -base64 32 生成
|
|
17
17
|
AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
|
|
18
18
|
# 必填,指定鉴权服务提供商,这里以 Logto 为例
|
|
19
19
|
AUTH_SSO_PROVIDERS=logto
|
|
20
|
-
# 必填,NextAuth 的 URL,用于 NextAuth 的回调
|
|
21
|
-
NEXTAUTH_URL=https://lobe.example.com/api/auth
|
|
22
20
|
|
|
23
|
-
#
|
|
21
|
+
# SSO 鉴权服务提供商部分,以 Logto 为例
|
|
24
22
|
# 其他鉴权服务提供商所需的环境变量,请参考:https://lobehub.com/zh/docs/self-hosting/environment-variables/auth
|
|
25
23
|
AUTH_LOGTO_ID=YOUR_LOGTO_ID
|
|
26
24
|
AUTH_LOGTO_SECRET=YOUR_LOGTO_SECRET
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: lobehub
|
|
2
2
|
services:
|
|
3
3
|
postgresql:
|
|
4
4
|
image: pgvector/pgvector:pg16
|
|
@@ -52,8 +52,8 @@ services:
|
|
|
52
52
|
entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start']
|
|
53
53
|
|
|
54
54
|
lobe:
|
|
55
|
-
image: lobehub/
|
|
56
|
-
container_name:
|
|
55
|
+
image: lobehub/lobehub
|
|
56
|
+
container_name: lobehub
|
|
57
57
|
ports:
|
|
58
58
|
- '3210:3210'
|
|
59
59
|
depends_on:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Required: LobeChat domain for tRPC calls
|
|
2
|
-
# Ensure this domain is whitelisted in your
|
|
2
|
+
# Ensure this domain is whitelisted in your SSO providers and S3 service CORS settings
|
|
3
3
|
APP_URL=https://lobe.example.com/
|
|
4
4
|
|
|
5
5
|
# Postgres related environment variables
|
|
@@ -10,16 +10,14 @@ KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
|
|
|
10
10
|
# If using Docker, you can use the container name as the host
|
|
11
11
|
DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobe
|
|
12
12
|
|
|
13
|
-
#
|
|
14
|
-
# Required:
|
|
15
|
-
NEXTAUTH_URL=https://lobe.example.com/api/auth
|
|
16
|
-
# Required: NextAuth secret key. Generate with: openssl rand -base64 32
|
|
13
|
+
# Authentication related environment variables
|
|
14
|
+
# Required: Auth secret key. Generate with: openssl rand -base64 32
|
|
17
15
|
AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
|
|
18
16
|
# Required: Specify the authentication provider
|
|
19
17
|
AUTH_SSO_PROVIDERS=zitadel
|
|
20
18
|
|
|
21
19
|
# ZiTADEL provider configuration
|
|
22
|
-
# Please refer to:https://lobehub.com/zh/docs/self-hosting/advanced/auth/
|
|
20
|
+
# Please refer to:https://lobehub.com/zh/docs/self-hosting/advanced/auth/providers/zitadel
|
|
23
21
|
AUTH_ZITADEL_ID=285934220675723622
|
|
24
22
|
AUTH_ZITADEL_SECRET=pe7Nh3lopXkZkfqh5YEDYI2xsbIz08eZKqInOUZxssd3refRia518Apbv3DZ
|
|
25
23
|
AUTH_ZITADEL_ISSUER=https://zitadel.example.com
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# 必填,LobeChat 域名,用于 tRPC 调用
|
|
2
|
-
# 请保证此域名在你的
|
|
2
|
+
# 请保证此域名在你的 SSO 鉴权服务提供商、S3 服务商的 CORS 白名单中
|
|
3
3
|
APP_URL=https://lobe.example.com/
|
|
4
4
|
|
|
5
5
|
# Postgres 相关,也即 DB 必需的环境变量
|
|
@@ -9,10 +9,8 @@ KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
|
|
|
9
9
|
# 格式:postgresql://username:password@host:port/dbname,如果你的 pg 实例为 Docker 容器且位于同一 docker-compose 文件中,亦可使用容器名作为 host
|
|
10
10
|
DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobe
|
|
11
11
|
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
NEXTAUTH_URL=https://lobe.example.com/api/auth
|
|
15
|
-
# 必填,用于 NextAuth 的密钥,可以使用 openssl rand -base64 32 生成
|
|
12
|
+
# 鉴权服务必需的环境变量
|
|
13
|
+
# 必填,用于鉴权的密钥,可以使用 openssl rand -base64 32 生成
|
|
16
14
|
AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
|
|
17
15
|
# 必填,指定鉴权服务提供商
|
|
18
16
|
AUTH_SSO_PROVIDERS=zitadel
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: lobehub
|
|
2
2
|
services:
|
|
3
3
|
postgresql:
|
|
4
4
|
image: pgvector/pgvector:pg16
|
|
@@ -50,8 +50,8 @@ services:
|
|
|
50
50
|
condition: service_healthy
|
|
51
51
|
|
|
52
52
|
lobe:
|
|
53
|
-
image: lobehub/
|
|
54
|
-
container_name:
|
|
53
|
+
image: lobehub/lobehub
|
|
54
|
+
container_name: lobehub
|
|
55
55
|
ports:
|
|
56
56
|
- '3210:3210'
|
|
57
57
|
depends_on:
|
|
@@ -59,8 +59,7 @@ app
|
|
|
59
59
|
├── [variants]/ # Platform and device variants
|
|
60
60
|
│ ├── (auth)/ # Authentication pages
|
|
61
61
|
│ │ ├── login/
|
|
62
|
-
│ │
|
|
63
|
-
│ │ └── next-auth/
|
|
62
|
+
│ │ └── signup/
|
|
64
63
|
│ ├── (main)/ # Main application routes
|
|
65
64
|
│ │ ├── (mobile)/ # Mobile-specific routes
|
|
66
65
|
│ │ │ └── me/ # Mobile profile pages
|
|
@@ -44,7 +44,7 @@ Before using NextAuth, please set the following variables in LobeChat's environm
|
|
|
44
44
|
|
|
45
45
|
| Environment Variable | Type | Description |
|
|
46
46
|
| -------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
47
|
-
| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | Required | This is used to enable the NextAuth service. Set it to `1` to enable it; changing this setting requires recompiling the application. Users deploying with the `lobehub/
|
|
47
|
+
| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | Required | This is used to enable the NextAuth service. Set it to `1` to enable it; changing this setting requires recompiling the application. Users deploying with the `lobehub/lobehub` image have this configuration added by default. |
|
|
48
48
|
| `AUTH_SECRET` | Required | The key used to encrypt Auth.js session tokens. You can use the following command: `openssl rand -base64 32`, or visit `https://generate-secret.vercel.app/32` to generate the key. |
|
|
49
49
|
| `AUTH_URL` | Required | This URL specifies the callback address for Auth.js when performing OAuth verification. Set this only if the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
|
50
50
|
| `NEXT_AUTH_SSO_PROVIDERS` | Optional | This environment variable is used to enable multiple identity verification sources simultaneously, separated by commas, for example, `auth0,microsoft-entra-id,authentik`. |
|
|
@@ -42,7 +42,7 @@ LobeChat 与 Clerk 做了深度集成,能够为用户提供安全、便捷的
|
|
|
42
42
|
|
|
43
43
|
| 环境变量 | 类型 | 描述 |
|
|
44
44
|
| -------------------------------- | -- | ------------------------------------------------------------------------------------------------------------ |
|
|
45
|
-
| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | 必选 | 用于启用 NextAuth 服务,设置为 `1` 以启用,更改此项需要重新编译应用。使用 `lobehub/
|
|
45
|
+
| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | 必选 | 用于启用 NextAuth 服务,设置为 `1` 以启用,更改此项需要重新编译应用。使用 `lobehub/lobehub` 镜像部署的用户已经默认添加了该项配置。 |
|
|
46
46
|
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令: `openssl rand -base64 32`,或者访问 `https://generate-secret.vercel.app/32` 生成秘钥。 |
|
|
47
47
|
| `AUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
|
48
48
|
| `NEXT_AUTH_SSO_PROVIDERS` | 可选 | 该环境变量用于同时启用多个身份验证源,以逗号 `,` 分割,例如 `auth0,microsoft-entra-id,authentik`。 |
|
|
@@ -351,6 +351,10 @@ When configuring SSO connections (e.g., GitHub in Auth0), make sure to enable **
|
|
|
351
351
|
|
|
352
352
|
For identity providers like Casdoor or Logto, users may not have an email configured.
|
|
353
353
|
|
|
354
|
+
<Callout type={'warning'}>
|
|
355
|
+
**Note for Casdoor Users**: Casdoor does not require users to have an email configured, but LobeChat 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.
|
|
356
|
+
</Callout>
|
|
357
|
+
|
|
354
358
|
Solution:
|
|
355
359
|
|
|
356
360
|
1. First configure the Webhook in LobeChat to sync user data from the identity provider:
|
|
@@ -345,6 +345,10 @@ npx tsx scripts/nextauth-to-betterauth/verify.ts
|
|
|
345
345
|
|
|
346
346
|
对于 Casdoor、Logto 等身份提供商,用户可能没有配置邮箱。
|
|
347
347
|
|
|
348
|
+
<Callout type={'warning'}>
|
|
349
|
+
**Casdoor 用户注意**:Casdoor 不要求用户必须配置邮箱,但 LobeChat 强依赖邮箱进行身份认证。如果因为大量用户没有邮箱而感觉迁移困难,建议暂时停留在 [v2.0.0-next.344](https://github.com/lobehub/lobe-chat/releases/tag/v2.0.0-next.344) 版本。后续官方计划提供用户端自助迁移功能,届时没有邮箱的用户登录时会被重定向到绑定邮箱页面。
|
|
350
|
+
</Callout>
|
|
351
|
+
|
|
348
352
|
解决方案:
|
|
349
353
|
|
|
350
354
|
1. 先在 LobeChat 中配置身份提供商的 Webhook 以同步用户数据:
|
|
@@ -58,6 +58,14 @@ tags:
|
|
|
58
58
|
|
|
59
59
|
Configure Casdoor [Webhook](https://www.casdoor.org/docs/webhooks/overview#setting-up-a-webhook) to sync user data updates to LobeChat.
|
|
60
60
|
|
|
61
|
+
**Synced data fields**:
|
|
62
|
+
|
|
63
|
+
- Avatar (`avatar`)
|
|
64
|
+
- Email (`email`)
|
|
65
|
+
- Display name (`displayName`)
|
|
66
|
+
|
|
67
|
+
**Configuration steps**:
|
|
68
|
+
|
|
61
69
|
1. Go to **Admin Tools** -> **Webhooks** and create a Webhook
|
|
62
70
|
2. Fill in the following fields:
|
|
63
71
|
- URL: `https://your-domain.com/api/webhooks/casdoor`
|
|
@@ -56,6 +56,14 @@ tags:
|
|
|
56
56
|
|
|
57
57
|
配置 Casdoor 的 [Webhook](https://www.casdoor.org/docs/webhooks/overview#setting-up-a-webhook) 以便在用户信息更新时同步到 LobeChat。
|
|
58
58
|
|
|
59
|
+
**同步的数据字段**:
|
|
60
|
+
|
|
61
|
+
- 头像 (`avatar`)
|
|
62
|
+
- 邮箱 (`email`)
|
|
63
|
+
- 显示名称 (`displayName`)
|
|
64
|
+
|
|
65
|
+
**配置步骤**:
|
|
66
|
+
|
|
59
67
|
1. 前往 `管理工具` -> `Webhooks`,创建一个 Webhook
|
|
60
68
|
2. 填写以下字段:
|
|
61
69
|
- 链接:`https://your-domain.com/api/webhooks/casdoor`
|
|
@@ -152,7 +152,19 @@ Send emails via SMTP protocol, suitable for users with existing email services.
|
|
|
152
152
|
|
|
153
153
|
### Common Configuration
|
|
154
154
|
|
|
155
|
-
Before using
|
|
155
|
+
Before using Better Auth, please set the following variables in LobeHub's environment variables:
|
|
156
|
+
|
|
157
|
+
## Email Verification
|
|
158
|
+
|
|
159
|
+
Enable email verification to ensure users own the email addresses they register with (off by default):
|
|
160
|
+
|
|
161
|
+
| Environment Variable | Type | Description |
|
|
162
|
+
| ------------------------- | -------- | ----------------------------------------------------------- |
|
|
163
|
+
| `AUTH_EMAIL_VERIFICATION` | Optional | Set to `1` to require email verification after registration |
|
|
164
|
+
|
|
165
|
+
<Callout type={'info'}>
|
|
166
|
+
Email verification requires a working email service (SMTP or Resend) configured above. When enabled, users must verify their email address before they can sign in.
|
|
167
|
+
</Callout>
|
|
156
168
|
|
|
157
169
|
## Magic Link (Passwordless) Login
|
|
158
170
|
|
|
@@ -193,6 +205,17 @@ Set the `AUTH_SSO_PROVIDERS` environment variable with a comma-separated list, e
|
|
|
193
205
|
|
|
194
206
|
The current authentication system requires email. Please configure a valid email address for users in Casdoor. Using a real, valid email is strongly recommended, otherwise features like password reset and magic link login will not work.
|
|
195
207
|
|
|
208
|
+
### Can I use fake or random email addresses?
|
|
209
|
+
|
|
210
|
+
**Strongly not recommended.** You should always use valid, real email addresses. Using fake emails will cause the following issues:
|
|
211
|
+
|
|
212
|
+
- Password reset functionality will not work
|
|
213
|
+
- Magic link login will not work
|
|
214
|
+
- Email verification will fail
|
|
215
|
+
- You may lose access to your account if you forget your password
|
|
216
|
+
|
|
217
|
+
This applies to all authentication methods, including SSO providers like Casdoor. Always ensure users have valid email addresses configured.
|
|
218
|
+
|
|
196
219
|
### How do I restrict registration to specific emails or domains?
|
|
197
220
|
|
|
198
221
|
Set the `AUTH_ALLOWED_EMAILS` environment variable with a comma-separated list of allowed emails or domains. For example:
|
|
@@ -200,6 +223,10 @@ Set the `AUTH_ALLOWED_EMAILS` environment variable with a comma-separated list o
|
|
|
200
223
|
- Allow only `example.com` domain: `AUTH_ALLOWED_EMAILS=example.com`
|
|
201
224
|
- Allow multiple domains and specific emails: `AUTH_ALLOWED_EMAILS=example.com,company.org,admin@other.com`
|
|
202
225
|
|
|
226
|
+
<Callout type={'info'}>
|
|
227
|
+
Note: `AUTH_ALLOWED_EMAILS` only restricts which email addresses can register, but does not verify email ownership. If you need to ensure users actually own the email address they register with, set `AUTH_EMAIL_VERIFICATION=1` to require email verification. This requires configuring an email service (SMTP).
|
|
228
|
+
</Callout>
|
|
229
|
+
|
|
203
230
|
## Additional Features
|
|
204
231
|
|
|
205
232
|
### Webhook Support
|