Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

📝 docs: remove outdated auth docs and simplify deployment guide (#11916)

YuTengjing225b1f4b4762
diff --git a/docs/self-hosting/advanced/auth/clerk-to-betterauth.mdx b/docs/self-hosting/advanced/auth/clerk-to-betterauth.mdx
index 9be823d62e6..9fbddf4bf6d 100644
--- a/docs/self-hosting/advanced/auth/clerk-to-betterauth.mdx
+++ b/docs/self-hosting/advanced/auth/clerk-to-betterauth.mdx
@@ -63,6 +63,8 @@ For small self-hosted deployments, the simplest approach is to let users reset t
Remove Clerk variables and add Better Auth variables:
+ <GenerateSecret envName="AUTH_SECRET" />
+
```bash
# Remove these
# NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=xxx
diff --git a/docs/self-hosting/advanced/auth/clerk-to-betterauth.zh-CN.mdx b/docs/self-hosting/advanced/auth/clerk-to-betterauth.zh-CN.mdx
index 41b83e65af9..8479729a649 100644
--- a/docs/self-hosting/advanced/auth/clerk-to-betterauth.zh-CN.mdx
+++ b/docs/self-hosting/advanced/auth/clerk-to-betterauth.zh-CN.mdx
@@ -61,6 +61,8 @@ tags:
移除 Clerk 变量并添加 Better Auth 变量:
+ <GenerateSecret envName="AUTH_SECRET" />
+
```bash
# 移除这些
# NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=xxx
diff --git a/docs/self-hosting/advanced/auth/nextauth-to-betterauth.mdx b/docs/self-hosting/advanced/auth/nextauth-to-betterauth.mdx
index 70e4edb726e..5753c2120e5 100644
--- a/docs/self-hosting/advanced/auth/nextauth-to-betterauth.mdx
+++ b/docs/self-hosting/advanced/auth/nextauth-to-betterauth.mdx
@@ -116,6 +116,8 @@ For small self-hosted deployments, the simplest approach is to let users re-logi
Remove NextAuth variables and add Better Auth variables:
+ <GenerateSecret envName="AUTH_SECRET" />
+
```bash
# Remove these
# NEXT_AUTH_SECRET=xxx
diff --git a/docs/self-hosting/advanced/auth/nextauth-to-betterauth.zh-CN.mdx b/docs/self-hosting/advanced/auth/nextauth-to-betterauth.zh-CN.mdx
index 3300a27a143..07a37fa6c55 100644
--- a/docs/self-hosting/advanced/auth/nextauth-to-betterauth.zh-CN.mdx
+++ b/docs/self-hosting/advanced/auth/nextauth-to-betterauth.zh-CN.mdx
@@ -111,6 +111,8 @@ Better Auth 支持更多功能,以下是新增的环境变量:
移除 NextAuth 变量并添加 Better Auth 变量:
+ <GenerateSecret envName="AUTH_SECRET" />
+
```bash
# 移除这些
# NEXT_AUTH_SECRET=xxx
diff --git a/docs/self-hosting/platform/docker.mdx b/docs/self-hosting/platform/docker.mdx
index b9d5d6b59cd..ad1717c3318 100644
--- a/docs/self-hosting/platform/docker.mdx
+++ b/docs/self-hosting/platform/docker.mdx
@@ -58,6 +58,12 @@ Here is the process for deploying the LobeHub server database version on a Linux
### Create a file named `lobe-chat.env` to store environment variables:
+ Click the buttons below to generate required secrets:
+
+ <GenerateSecret envName="KEY_VAULTS_SECRET" />
+
+ <GenerateSecret envName="AUTH_SECRET" />
+
```shell
# Website domain
APP_URL=https://your-prod-domain.com
diff --git a/docs/self-hosting/platform/docker.zh-CN.mdx b/docs/self-hosting/platform/docker.zh-CN.mdx
index e93815fc981..925bcd89c59 100644
--- a/docs/self-hosting/platform/docker.zh-CN.mdx
+++ b/docs/self-hosting/platform/docker.zh-CN.mdx
@@ -54,6 +54,12 @@ tags:
### 创建名为 `lobe-chat.env` 文件用于存放环境变量:
+ 点击下方按钮生成所需密钥:
+
+ <GenerateSecret envName="KEY_VAULTS_SECRET" />
+
+ <GenerateSecret envName="AUTH_SECRET" />
+
```shell
# 网站域名
APP_URL=https://your-prod-domain.com
diff --git a/docs/self-hosting/platform/vercel.mdx b/docs/self-hosting/platform/vercel.mdx
index ac6f6d30db7..ffd2a8b9f60 100644
--- a/docs/self-hosting/platform/vercel.mdx
+++ b/docs/self-hosting/platform/vercel.mdx
@@ -114,55 +114,6 @@ The server-side database needs to be paired with a user authentication service t
<Callout type={'info'}>
For advanced features like SSO providers, magic link login, and email verification, see [Authentication Service](/docs/self-hosting/advanced/auth).
</Callout>
-
- ### Add Public and Private Key Environment Variables in Vercel
-
- In Vercel's deployment environment variables, add the `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` environment variables. You can click on "API Keys" in the menu, then copy the corresponding values and paste them into Vercel's environment variables.
-
- <Image alt={'Find the corresponding public and private key environment variables in Clerk'} src={'/blog/assets28616219/89883703-7a1a-4a11-b944-5d804544e57c.webp'} />
-
- The environment variables required for this step are as follows:
-
- ```shell
- NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx
- CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
- ```
-
- Add the above variables to Vercel:
-
- <Image alt={'Add Clerk public and private key environment variables in Vercel'} src={'/blog/assets28616219/2bfa13df-6e20-4768-97c0-4dad06c85a2f.webp'} />
-
- ### Create and Configure Webhook in Clerk
-
- Since we let Clerk fully handle user authentication and management, we need Clerk to notify our application and store data in the database when there are changes in the user's lifecycle (create, update, delete). We achieve this requirement through the Webhook provided by Clerk.
-
- We need to add an endpoint in Clerk's Webhooks to inform Clerk to send notifications to this endpoint when a user's information changes.
-
- <Image alt={'Add Webhooks endpoint in Clerk'} src={'/blog/assets28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9.webp'} />
-
- Fill in the endpoint with the URL of your Vercel project, such as `https://your-project.vercel.app/api/webhooks/clerk`. Then, subscribe to events by checking the three user events (`user.created`, `user.deleted`, `user.updated`), and click create.
-
- <Callout type={'warning'}>
- The `https://` in the URL is essential to maintain the integrity of the URL.
- </Callout>
-
- <Image alt={'Configure URL and user events when adding Clerk Webhooks'} src={'/blog/assets28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645.webp'} />
-
- ### Add Webhook Secret to Vercel Environment Variables
-
- After creation, you can find the secret of this Webhook in the bottom right corner:
-
- <Image alt={'View Clerk Webhooks secret'} src={'/blog/assets28616219/fab4abb2-584b-49de-9340-813382951635.webp'} />
-
- The environment variable corresponding to this secret is `CLERK_WEBHOOK_SECRET`:
-
- ```shell
- CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
- ```
-
- Add it to Vercel's environment variables:
-
- <Image alt={'Add Clerk Webhooks secret in Vercel'} src={'/blog/assets28616219/5fdc9479-007f-46ab-9d6e-a9603e949116.webp'} />
</Steps>
By completing these steps, you have successfully configured the authentication service. Next, we will configure the S3 storage service.
diff --git a/docs/self-hosting/platform/vercel.zh-CN.mdx b/docs/self-hosting/platform/vercel.zh-CN.mdx
index 455172fdaf2..bf9eb51c9d9 100644
--- a/docs/self-hosting/platform/vercel.zh-CN.mdx
+++ b/docs/self-hosting/platform/vercel.zh-CN.mdx
@@ -114,53 +114,6 @@ tags:
<Callout type={'info'}>
如需 SSO 登录、魔法链接登录、邮箱验证等高级功能,请参阅 [身份验证服务](/zh/docs/self-hosting/advanced/auth)。
</Callout>
-
- ### 在 Vercel 中添加公、私钥环境变量
-
- 在 Vercel 的部署环境变量中,添加 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` 和 `CLERK_SECRET_KEY` 环境变量。你可以在菜单中点击「API Keys」,然后复制对应的值填入 Vercel 的环境变量中。
-
- <Image alt={'在 Clerk 中找到对应的公私钥环境变量'} src={'/blog/assets28616219/89883703-7a1a-4a11-b944-5d804544e57c.webp'} />
-
- 此步骤所需的环境变量如下:
-
- ```shell
- NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx
- CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
- ```
-
- 添加上述变量到 Vercel 中:
-
- <Image alt={'在 Vercel 中添加 Clerk 公私钥环境变量'} src={'/blog/assets28616219/2bfa13df-6e20-4768-97c0-4dad06c85a2f.webp'} />
-
- ### 在 Clerk 中创建并配置 Webhook
-
- 由于我们让 Clerk 完全接管用户鉴权与管理,因此我们需要在 Clerk 用户生命周期变更时(创建、更新、删除)中通知我们的应用并存储落库。我们通过 Clerk 提供的 Webhook 来实现这一诉求。
-
- 我们需要在 Clerk 的 Webhooks 中添加一个端点(Endpoint),告诉 Clerk 当用户发生变更时,向这个端点发送通知。
-
- <Image alt={'Clerk 添加 Webhooks 端点'} src={'/blog/assets28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9.webp'} />
-
- 在 endpoint 中填写你的 Vercel 项目的 URL,如 `https://your-project.vercel.app/api/webhooks/clerk`。然后在订阅事件(Subscribe to events)中,勾选 user 的三个事件(`user.created` 、`user.deleted`、`user.updated`),然后点击创建。
-
- <Callout type={'warning'}>URL 的`https://`不可缺失,须保持 URL 的完整性</Callout>
-
- <Image alt={'添加 Clerk Webhooks 时,配置 URL 和用户事件'} src={'/blog/assets28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645.webp'} />
-
- ### 将 Webhook 秘钥添加到 Vercel 环境变量
-
- 创建完毕后,可以在右下角找到该 Webhook 的秘钥:
-
- <Image alt={'查看 Clerk Webhooks 秘钥'} src={'/blog/assets28616219/fab4abb2-584b-49de-9340-813382951635.webp'} />
-
- 这个秘钥所对应的环境变量名为 `CLERK_WEBHOOK_SECRET`:
-
- ```shell
- CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
- ```
-
- 将其添加到 Vercel 的环境变量中:
-
- <Image alt={'在 Vercel 中 添加 Clerk Webhooks 秘钥'} src={'/blog/assets28616219/5fdc9479-007f-46ab-9d6e-a9603e949116.webp'} />
</Steps>
这样,你已经成功配置了身份验证服务。接下来我们将配置 S3 存储服务。
diff --git a/docs/self-hosting/server-database.mdx b/docs/self-hosting/server-database.mdx
deleted file mode 100644
index f91d3a6c320..00000000000
--- a/docs/self-hosting/server-database.mdx
+++ /dev/null
@@ -1,157 +0,0 @@
----
-title: Deploying Server-Side Database for LobeHub
-description: Learn how to deploy LobeHub's server-side database using Postgres.
-tags:
- - LobeHub
- - Server-Side Database
- - Postgres
- - Deployment Guide
----
-
-# Deploying Server-Side Database
-
-LobeHub defaults to using a client-side database (IndexedDB) but also supports deploying a server-side database. LobeHub uses Postgres as the backend storage database.
-
-<Callout>
- PostgreSQL is a powerful open-source relational database management system with high scalability
- and standard SQL support. It provides rich data types, concurrency control, data integrity,
- security, and programmability, making it suitable for complex applications and large-scale data
- management.
-</Callout>
-
-This guide will introduce the process and principles of deploying the server-side database version of LobeHub on any platform from a framework perspective, so you can understand both the what and the why, and then deploy according to your specific needs.
-
-If you are already familiar with the complete principles, you can quickly get started by checking the deployment guides for each platform:
-
-<PlatformCards urlPrefix={'platform'} />
-
----
-
-For the server-side database version of LobeHub, a normal deployment process typically involves configuring three modules:
-
-1. Database configuration;
-2. Authentication service configuration;
-3. S3 storage service configuration.
-
-## Configure the Database
-
-Before deployment, make sure you have a Postgres database instance ready. You can choose from the following instances:
-
-- `A.` Use Serverless Postgres instances like Vercel/Neon;
-- `B.` Use self-deployed Postgres instances like Docker/Railway/Zeabur, collectively referred to as Node Postgres instances;
-
-<Callout>
- There is a slight difference in the way they are configured in terms of environment variables.
-</Callout>
-
-Since we support file-based conversations/knowledge base conversations, we need to install the `pgvector` plugin for Postgres. This plugin provides vector search capabilities and is a key component for LobeHub to implement RAG.
-
-<Steps>
- ### `NEXT_PUBLIC_SERVICE_MODE`
-
- LobeHub supports both client-side and server-side databases, so we provide an environment variable for switching modes, which is `NEXT_PUBLIC_SERVICE_MODE`, with a default value of `client`.
-
- For server-side database deployment scenarios, you need to set `NEXT_PUBLIC_SERVICE_MODE` to `server`.
-
- <Callout type={'info'}>
- In the official `lobehub` Docker image, this environment variable is already set to
- `server` by default. Therefore, if you deploy using the Docker image, you do not need to configure
- this environment variable again.
- </Callout>
-
- <Callout type={'tip'}>
- Since environment variables starting with `NEXT_PUBLIC` take effect in the front-end code, they cannot be modified through container runtime injection. (Refer to the `next.js` documentation [Configuring: Environment Variables | Next.js (nextjs.org)](https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables)). This is why we chose to create a separate DB version image.
-
- If you need to modify variables with the `NEXT_PUBLIC` prefix in a Docker deployment, you must build the image yourself and inject your own `NEXT_PUBLIC` prefixed environment variables during the build.
- </Callout>
-
- ### `DATABASE_URL`
-
- The core of configuring the database is to add the `DATABASE_URL` environment variable and fill in the Postgres database connection URL you have prepared. The typical format of the database connection URL is `postgres://username:password@host:port/database`.
-
- <Callout type={'info'}>
- If you want to enable SSL when connecting to the database, please refer to the
- [documentation](https://stackoverflow.com/questions/14021998/using-psql-to-connect-to-postgresql-in-ssl-mode)
- for setup instructions.
- </Callout>
-
- ### `DATABASE_DRIVER`
-
- The `DATABASE_DRIVER` environment variable is used to distinguish between the two types of Postgres database instances, with values of `node` or `neon`.
-
- To streamline deployment, we have set default values based on the characteristics of different platforms:
-
- - On the Vercel platform, `DATABASE_DRIVER` defaults to `neon`;
- - In our provided Docker image `lobehub`, `DATABASE_DRIVER` defaults to `node`.
-
- Therefore, if you follow the standard deployment methods below, you do not need to manually configure the `DATABASE_DRIVER` environment variable:
-
- - Vercel + Serverless Postgres
- - Docker image + Node Postgres
-
- ### `KEY_VAULTS_SECRET`
-
- Considering that users will store sensitive information such as their API Key and baseURL in the database, we need a key to encrypt this information to prevent leakage in case of a database breach. Hence, the `KEY_VAULTS_SECRET` environment variable is used to encrypt sensitive information like user-stored apikeys.
-
- <Callout type={'info'}>
- You can generate a random 32-character string as the value of `KEY_VAULTS_SECRET` using `openssl
- rand -base64 32`.
- </Callout>
-</Steps>
-
-## Configuring Authentication Services
-
-In the server-side database mode, we need an authentication service to distinguish the identities of different users. There are many well-developed authentication solutions in the open-source community. We have integrated two different authentication services to meet the demands of different scenarios, one is Clerk, and the other is NextAuth.
-
-### Clerk
-
-[Clerk](https://clerk.com?utm_source=lobehub\&utm_medium=docs) is an authentication SaaS service that provides out-of-the-box authentication capabilities with high productization, low integration costs, and a great user experience. For those who offer SaaS products, Clerk is a good choice. Our official [LobeHub Cloud](https://LobeHub.com) uses Clerk as the authentication service.
-
-The integration of Clerk is relatively simple, requiring only the configuration of these environment variables:
-
-- `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY`, which can be obtained from the Clerk console
-- `CLERK_WEBHOOK_SECRET`, which is generated by following these instructions: [Configure Clerk Authentication Service](/docs/self-hosting/advanced/auth/clerk#create-and-configure-webhook-in-clerk).
-
-<Callout type={'tip'}>
- In Vercel deployment mode, we recommend using Clerk as the authentication service for a better
- user experience.
-</Callout>
-
-However, this type of authentication relies on Clerk's official service, so there may be some limitations in certain scenarios:
-
-- For example, when using Clerk in China, it may be affected by the network environment.
-- Clerk is not suitable for scenarios that require complete private deployment.
-- It relies on `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`, which may not be readily usable with public Docker images.
-
-Therefore, for the above scenarios, we also provide NextAuth as an alternative solution.
-
-### NextAuth
-
-NextAuth is an open-source authentication library that supports multiple identity providers, including Auth0, Cognito, GitHub, Google, Facebook, Apple, Twitter, and more. NextAuth itself provides a complete authentication solution, including user registration, login, password recovery, integration with various identity providers, and more.
-
-For information on configuring NextAuth, you can refer to the [Authentication](/docs/self-hosting/advanced/authentication) documentation.
-
-<Callout type={'tip'}>
- In the official Docker image `lobehub`, we recommend using NextAuth as the
- authentication service.
-</Callout>
-
-## Configuring S3 Storage Service
-
-LobeHub has supported multimodal AI conversations since [a long time ago](https://x.com/lobehub/status/1724289575672291782), involving the function of uploading images to large models. In the client-side database solution, image files are stored as binary data directly in the browser's IndexedDB database. However, this solution is not feasible in the server-side database. Storing file-like data directly in Postgres will greatly waste valuable database storage space and slow down computational performance.
-
-The best practice in this area is to use a file storage service (S3) to store image files, which is also the storage solution relied upon for subsequent file uploads/knowledge base functions.
-
-<Callout type={'info'}>
- In this documentation, S3 refers to a compatible S3 storage solution, which supports the Amazon S3
- API-compatible object storage system. Common examples include Cloudflare R2, Alibaba Cloud OSS,
- and self-deployable RustFS, ceph, all of which support the S3-compatible API.
-</Callout>
-
-For detailed configuration guidelines on S3, please refer to [S3 Object Storage](/docs/self-hosting/advanced/s3) for more information.
-
-## Getting Started with Deployment
-
-The above is a detailed explanation of configuring LobeHub with a server-side database. You can configure it according to your actual situation and then choose a deployment platform that suits you to start deployment:
-
-<PlatformCards urlPrefix={'platform'} />
diff --git a/docs/self-hosting/server-database.zh-CN.mdx b/docs/self-hosting/server-database.zh-CN.mdx
deleted file mode 100644
index 19a1112a98b..00000000000
--- a/docs/self-hosting/server-database.zh-CN.mdx
+++ /dev/null
@@ -1,146 +0,0 @@
----
-title: 使用服务端数据库部署 - 配置数据库、身份验证服务和 S3 存储服务
-description: 本文将介绍服务端数据库版 LobeHub 的部署思路,解释如何配置数据库、身份验证服务和 S3 存储服务。
-tags:
- - 服务端数据库
- - Postgres
- - S3存储服务
- - 数据库配置
- - 身份验证服务
- - 环境变量配置
----
-
-# 使用服务端数据库部署
-
-LobeHub 默认使用客户端数据库(IndexedDB),同时也支持使用服务端数据库(下简称 DB 版)。LobeHub 采用了 Postgres 作为后端存储数据库。
-
-<Callout>
- PostgreSQL 是一种强大的开源关系型数据库管理系统,具备高度扩展性和标准 SQL
- 支持。它提供了丰富的数据类型、并发处理、数据完整性、安全性及可编程性,适用于复杂应用和大规模数据管理。
-</Callout>
-
-本文将从框架角度介绍在任何一个平台中部署 DB 版 LobeHub 的流程和原理,让你知其然也知其所以然,最后可以根据自己的实际情况进行部署。
-
-如你已经熟悉完整原理,可以查看各个平台的部署指南快速开始:
-
-<PlatformCards urlPrefix={'platform'} />
-
----
-
-对于 LobeHub 的 DB 版,正常的部署流程都需要包含三个模块的配置:
-
-1. 数据库配置;
-2. 身份验证服务配置;
-3. S3 存储服务配置。
-
-## 配置数据库
-
-在部署之前,请确保你已经准备好 Postgres 数据库实例,你可以选择以下任一实例:
-
-- `A.` 使用 Vercel / Neon 等 Serverless Postgres 实例;
-- `B.` 使用 Docker / Railway / Zeabur 等自部署 Postgres 实例,下统称 Node Postgres 实例;
-
-<Callout>两者的配置方式在环境变量的取值上会略有一点区别,其他方面是一样的。</Callout>
-
-同时,由于我们支持了文件对话 / 知识库对话的能力,因此我们需要为 Postgres 安装 `pgvector` 插件,该插件提供了向量搜索的能力,是 LobeHub 实现 RAG 的重要构件之一。
-
-<Steps>
- ### `NEXT_PUBLIC_SERVICE_MODE`
-
- LobeHub 同时支持了客户端数据库和服务端数据库,因此我们提供了一个环境变量用于切换模式,这个变量为 `NEXT_PUBLIC_SERVICE_MODE`,该值默认为 `client`。
-
- 针对服务端数据库部署场景,你需要将 `NEXT_PUBLIC_SERVICE_MODE` 设置为 `server`。
-
- <Callout type={'info'}>
- 在官方的 `lobehub` Docker 镜像中,已经默认将该环境变量设为 `server`,因此如果你使用
- Docker 镜像部署,则无需再配置该环境变量。
- </Callout>
-
- <Callout type={'tip'}>
- 由于 `NEXT_PUBLIC` 开头的环境变量是在前端代码中生效的,而因此无法通过容器运行时注入进行修改。 (`next.js`的参考文档 [Configuring: Environment Variables | Next.js (nextjs.org)](https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables) ) 这也是为什么我们选择再打一个 DB 版镜像的原因。
-
- 如果你需要在 Docker 部署中修改 `NEXT_PUBLIC` 前缀的变量,你必须自行构建镜像,在 build 时就把自己的 `NEXT_PUBLIC` 开头的环境变量打进去。
- </Callout>
-
- ### `DATABASE_URL`
-
- 配置数据库,核心是添加 `DATABASE_URL` 环境变量,将你准备好的 Postgres 数据库连接 URL 填入其中。数据库连接 URL 的通常格式为 `postgres://username:password@host:port/database`。
-
- <Callout type={'info'}>
- 如果希望连接数据库时启用 SSL
- ,请自行参考[文档](https://stackoverflow.com/questions/14021998/using-psql-to-connect-to-postgresql-in-ssl-mode)进行设置
- </Callout>
-
- ### `DATABASE_DRIVER`
-
- `DATABASE_DRIVER` 环境变量用于区分两种 Postgres 数据库实例,`DATABASE_DRIVER` 的取值为 `node` 或 `neon`。
-
- 为提升部署便捷性,我们根据不同的平台特点设置了默认值:
-
- - 在 Vercel 平台下,`DATABASE_DRIVER` 默认为 `neon`;
- - 在我们提供的 Docker 镜像 `lobehub` 中,`DATABASE_DRIVER` 默认为 `node`。
-
- 因此如果你采用了以下标准的部署方式,你无需手动配置 `DATABASE_DRIVER` 环境变量:
-
- - Vercel + Serverless Postgres
- - Docker 镜像 + Node Postgres
-
- ### `KEY_VAULTS_SECRET`
-
- 考虑到用户会存储自己的 API Key 和 baseURL 等敏感信息到数据库中,因此我们需要一个密钥来加密这些信息,避免数据库被爆破 / 脱库时这些关键信息被泄露。 因此有了 `KEY_VAULTS_SECRET` 环境变量,用于加密用户存储的 apikey 等敏感信息。
-
- <Callout type={'info'}>
- 你可以使用 `openssl rand -base64 32` 生成一个随机的 32 位字符串作为 `KEY_VAULTS_SECRET` 的值。
- </Callout>
-</Steps>
-
-## 配置身份验证服务
-
-在服务端数据库模式下,我们要为不同用户区分身份,因此需要一个身份验证服务。开源社区中已经存在较多完善的身份验证解决方案。我们在实现过程中集成了两种不同的身份验证服务,用于满足不同场景的诉求,一种是 Clerk ,另外一种是 NextAuth。
-
-### Clerk
-
-[Clerk](https://clerk.com?utm_source=lobehub\&utm_medium=docs) 是一个身份验证 SaaS 服务,提供了开箱即用的身份验证能力,产品化程度很高,集成成本较低,体验很好。对于提供 SaaS 化产品的诉求来说,Clerk 是一个不错的选择。我们官方提供的 [LobeHub Cloud](https://LobeHub.com),就是使用了 Clerk 作为身份验证服务。
-
-Clerk 的集成也相对简单,只需要配置 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` 、 `CLERK_SECRET_KEY` 和 `CLERK_WEBHOOK_SECRET` 环境变量即可,这三个环境变量可以在 Clerk 控制台中获取。
-
-<Callout type={'tip'}>
- 在 Vercel 部署模式下,我们推荐使用 Clerk 作为身份验证服务,可以获得更好的用户体验。
-</Callout>
-
-但是这种身份验证依赖了 Clerk 官方的服务,因此在一些场景下可能会有一些限制:
-
-- 比如在国内使用 Clerk 时,可能会受到网络环境的影响;
-- 需要完全私有化部署的场景下,Clerk 并不适用;
-- 必须依赖 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`,对于公共 Docker 镜像无法开箱即用;
-
-因此针对上述场景,我们也提供了 NextAuth 作为备选方案。
-
-### NextAuth
-
-NextAuth 是一个开源的身份验证库,支持多种身份验证提供商,包括 Auth0、Cognito、GitHub、Google、Facebook、Apple、Twitter 等。NextAuth 本身提供了一套完整的身份验证解决方案,包括用户注册、登录、密码找回、多种身份验证提供商的集成等。
-
-关于 NextAuth 的配置,你可以参考 [身份验证](/zh/docs/self-hosting/advanced/authentication) 的文档获取更多信息。
-
-<Callout type={'tip'}>
- 在官方的 Docker 镜像 `lobehub` 中,我们推荐使用 NextAuth 作为身份验证服务。
-</Callout>
-
-## 配置 S3 存储服务
-
-LobeHub 在 [很早以前](https://x.com/lobehub/status/1724289575672291782) 就支持了多模态的 AI 会话,其中涉及到图片上传给大模型的功能。在客户端数据库方案中,图片文件直接以二进制数据存储在浏览器 IndexedDB 数据库,但在服务端数据库中这个方案并不可行。因为在 Postgres 中直接存储文件类二进制数据会大大浪费宝贵的数据库存储空间,并拖慢计算性能。
-
-这块最佳实践是使用文件存储服务(S3)来存储图片文件,同时 S3 也是文件上传 / 知识库功能所依赖的大容量静态文件存储方案。
-
-<Callout type={'info'}>
- 在本文档库中,S3 所指代的是指兼容 S3 存储方案,即支持 Amazon S3 API 的对象存储系统,常见例如
- Cloudflare R2 、阿里云 OSS,可以自部署的 RustFS、ceph 等均支持 S3 兼容 API。
-</Callout>
-
-关于 S3 的详细配置指南,请参阅 [S3 对象存储](/zh/docs/self-hosting/advanced/s3) 了解详情。
-
-## 开始部署
-
-以上就是关于服务端数据库版 LobeHub 的配置详解,你可以根据自己的实际情况进行配置,然后选择适合自己的部署平台开始部署:
-
-<PlatformCards urlPrefix={'platform'} />
diff --git a/docs/self-hosting/start.mdx b/docs/self-hosting/start.mdx
index 7d2305f7315..56014001dc3 100644
--- a/docs/self-hosting/start.mdx
+++ b/docs/self-hosting/start.mdx
@@ -16,24 +16,4 @@ tags:
LobeHub supports various deployment platforms, including Vercel, Docker, and Docker Compose. You can choose a deployment platform that suits you to build your own Lobe Chat.
-## Quick Deployment
-
-For users who are new to LobeHub, we recommend using the client-side database mode for quick deployment. The advantage of this mode is that deployment can be quickly completed with just one command/button, making it easy for you to quickly get started and experience LobeHub.
-
-You can follow the guide below for quick deployment of LobeHub:
-
<PlatformCards urlPrefix={'platform'} />
-
-<Callout>
- In the client-side database mode, data is stored locally on the user's device, without
- cross-device synchronization, and does not support advanced features such as file uploads and
- knowledge base.
-</Callout>
-
-## Advanced Mode: Server-Side Database
-
-For users who are already familiar with LobeHub or need cross-device synchronization, you can deploy a version with a server-side database to access a more complete and powerful LobeHub.
-
-<Cards>
- <Card href={'/docs/self-hosting/server-database'} title={'Server-Side Database Deployment Guide'} />
-</Cards>
diff --git a/docs/self-hosting/start.zh-CN.mdx b/docs/self-hosting/start.zh-CN.mdx
index beb6ea97b58..5eaa2ccbc6f 100644
--- a/docs/self-hosting/start.zh-CN.mdx
+++ b/docs/self-hosting/start.zh-CN.mdx
@@ -20,22 +20,4 @@ tags:
LobeHub 支持多种部署平台,包括 Vercel、Docker、 Docker Compose 、阿里云计算巢 和腾讯轻量云 等,你可以选择适合自己的部署平台进行部署,构建属于自己的 Lobe Chat。
-## 快速部署
-
-对于第一次了解 LobeHub 的用户,我们推荐使用客户端数据库的模式快速部署,该模式的优势是一行指令 / 一个按钮即可快捷完成部署,便于你快速上手与体验 LobeHub。
-
-你可以通过以下指南快速部署 LobeHub:
-
<PlatformCards urlPrefix={'platform'} />
-
-<Callout>
- 客户端数据库模式下数据均保留在用户本地,不会跨多端同步,也不支持文件上传、知识库等进阶功能。
-</Callout>
-
-## 进阶模式:服务端数据库
-
-针对已经了解 LobeHub 的用户,或需要多端同步的用户,可以自行部署带有服务端数据库的版本,进而获得更完整、功能更强大的 LobeHub。
-
-<Cards rows={1}>
- <Card href={'/zh/docs/self-hosting/server-database'} title={'服务端数据库部署指南'} />
-</Cards>