如果您需要使用其他身份验证服务提供商,可以提交
diff --git a/docs/self-hosting/server-database/docker-compose.mdx b/docs/self-hosting/server-database/docker-compose.mdx
index 48391cce67fd..8b87730b4365 100644
--- a/docs/self-hosting/server-database/docker-compose.mdx
+++ b/docs/self-hosting/server-database/docker-compose.mdx
@@ -1,16 +1,14 @@
---
-title: Deploying LobeChat Server Database with Docker Compose
-description: >-
- Learn how to deploy LobeChat Server Database using Docker Compose, including
- configuration tutorials for various services.
+title: Deploying LobeChat with Docker Compose
+description: Learn how to deploy the LobeChat service using Docker Compose, including configuration tutorials for various services.
tags:
- Docker Compose
- LobeChat
- - Docker Container
+ - Docker Containers
- Deployment Guide
---
-# Deploying LobeChat server database with Docker Compose
+# Deploying LobeChat Server Database Version with Docker Compose
[![][docker-release-shield]][docker-release-link]
@@ -22,81 +20,120 @@ tags:
- This article assumes that you are familiar with the basic principles and processes of deploying
- the LobeChat server database version (hereinafter referred to as DB version), so it only includes
- the core environment variable configuration. If you are not familiar with the deployment
- principles of LobeChat DB version, please refer to [Deploying using a Server
- Database](/zh/docs/self-hosting/server-database).
+ This article assumes you are familiar with the basic principles and processes of deploying the LobeChat server database version (hereinafter referred to as DB version), so it only includes core environment variable configurations. If you are not familiar with the deployment principles of LobeChat DB version, please refer to [Deploying with a Server Database](/docs/self-hosting/server-database).
- Due to the inability to expose `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` using Docker environment variables, you cannot use Clerk as an authentication service when deploying LobeChat using Docker / Docker Compose.
+ Due to the inability to expose `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` using Docker environment variables, you cannot use Clerk as a login authentication service when deploying LobeChat with Docker / Docker Compose.
-If you do need Clerk as an authentication service, you might consider deploying using Vercel or building your own image.
+If you need Clerk as a login authentication service, consider deploying with Vercel or building your own image.
-Generally speaking, to fully run the LobeChat database version, you need at least the following four services:
+In general, to fully run the LobeChat database version, you need at least the following four services:
-- LobeChat database version itself
-- PostgreSQL database with PGVector plugin
-- Object storage service supporting S3 protocol
-- SSO authentication service supported by LobeChat
+- The LobeChat database version itself
+- A PostgreSQL database with the PGVector plugin
+- An object storage service that supports S3 protocol
+- An SSO login authentication service supported by LobeChat
-These services can be combined through self-hosting or online cloud services to meet your needs.
+These services can be combined through self-built or online cloud services to meet different levels of deployment needs.
-We provide a fully self-built Docker Compose configuration, which you can use directly to start the LobeChat database version or modify to suit your needs.
+In this article, we provide a Docker Compose configuration entirely based on open-source self-built services. You can use this configuration file directly to start the LobeChat database version or modify it to suit your needs.
-We default to using [MinIO](https://github.com/minio/minio) as the local S3 object storage service and [Logto](https://github.com/logto-io/logto) as the local authentication service.
+We default to using [MinIO](https://github.com/minio/minio) as the local S3 object storage service and [Casdoor](https://github.com/casdoor/casdoor) as the local authentication service.
## Quick Start
-To facilitate quick start, this chapter uses the docker-compose configuration file in the `docker-compose/local` directory. The LobeChat application runs at `http://localhost:3210` after startup and can be run locally.
+To facilitate a quick start, this section uses the `docker-compose/local` directory's `docker-compose.yml` configuration file. The started LobeChat application runs at `http://localhost:3210` and can be run locally.
- To facilitate quick start, this docker-compose.yml omits a large number of Secret/Password configurations and is only suitable for quick demonstration or personal local use. Do not use it directly in a production environment! Otherwise, you will be responsible for any security issues!
+ For a quick start, this `docker-compose.yml` contains a large number of sensitive Secret/Password fields, suitable only for quick demonstrations or personal local use. Do not use it directly in a production environment! Otherwise, you will be responsible for any security issues encountered!
- ### Create Configuration Files
+ ### One-click Startup Script
-Create a new `lobe-chat-db` directory to store your configuration files and subsequent database files.
+Create a new directory named `lobe-chat-db` to store your configuration files and subsequent database files.
```sh
mkdir lobe-chat-db
+cd lobe-chat-db
```
-Pull the configuration files into your directory:
+We provide a one-click startup script `setup.sh`, which can automatically use the default configuration and start the service:
```sh
-curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local-logto/docker-compose.yml > docker-compose.yml
-curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local-logto/.env.example > .env
+bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f
```
-### Start Services
+### Start Docker
```sh
-docker compose up -d
+docker compose -p lobechat-starter up -d
```
-### Configure Logto
+### Check Logs
-1. Open `http://localhost:3002` to access the Logto WebUI and register an administrator account.
+```sh
+docker logs -f lobe-database
+```
-2. Create a `Next.js (App Router)` application and add the following configurations:
+If you see the following logs in the container, it means the startup was successful:
- - `Redirect URI` should be `http://localhost:3210/api/auth/callback/logto`
- - `Post sign-out redirect URI` should be `http://localhost:3210/`
+```log
+[Database] Start to migration...
+✅ database migration pass.
+-------------------------------------
+ ▲ Next.js 14.x.x
+ - Local: http://localhost:3210
+ - Network: http://0.0.0.0:3210
+
+ ✓ Starting...
+ ✓ Ready in 95ms
+```
+
+
-3. Obtain the `App ID` and `App secrets`, and fill them into your `.env` file corresponding to `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET`.
+At this point, you have successfully deployed the LobeChat database version, and you can access your LobeChat service at `http://localhost:3210`.
-### Configure MinIO S3
+If you encounter problems, try checking the Docker logs and console logs for troubleshooting.
-1. Open `http://localhost:9001` to access the MinIO WebUI. The default admin account password is configured in `.env`.
+## Publishing to Production (IP Mode)
-2. Create a bucket that matches the `MINIO_LOBE_BUCKET` field in your `.env` file, which defaults to `lobe`.
+The following assumes that the machine IP running the LobeChat service on the LAN/public network is `your_server_ip`.
-3. Choose a custom policy, copy the following content, and paste it in (if you modified the bucket name, please find and replace accordingly):
+To access via the local network IP, you first need to run the local startup:
+
+```sh
+bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f
+docker compose -p lobechat-starter up -d
+```
+
+Next, you need to modify the downloaded `docker-compose.yml` file, performing a global replacement to change `localhost` to `your_server_ip`, and then restart:
+
+```sh
+sed -i 's/localhost/your_server_ip/g' docker-compose.yml
+docker compose -p lobechat-starter up -d
+```
+
+### Configuring Casdoor
+
+1. After starting with the `setup.sh` script, the default port for Casdoor WebUI is `8000`. You can access it via `http://your_server_ip:8000`, with the default username `admin` and password `123`.
+
+2. In `Identity -> Applications`, add a new line:
+
+ ```
+ http://your_server_ip:3210/api/auth/callback/casdoor
+ ```
+
+3. Most other configurations can remain default; you can modify the default configurations in `Identity -> Applications`.
+
+### Configuring MinIO S3
+
+1. After starting with the `setup.sh` script, the default port for MinIO WebUI is `9001`. You can access it via `http://your_server_ip:9001`, with the default username `YOUR_MINIO_USER` and password `YOUR_MINIO_PASSWORD`.
+
+2. Most configurations can remain default. If you wish to allow users to change their avatars, you need to create a bucket named `casdoor` in `buckets`, select custom policy, and copy and paste the following content (if you have changed the bucket name, please find and replace):
```json
{
@@ -107,7 +144,7 @@ docker compose up -d
"AWS": ["*"]
},
"Action": ["s3:GetBucketLocation"],
- "Resource": ["arn:aws:s3:::lobe"]
+ "Resource": ["arn:aws:s3:::casdoor"]
},
{
"Effect": "Allow",
@@ -115,7 +152,7 @@ docker compose up -d
"AWS": ["*"]
},
"Action": ["s3:ListBucket"],
- "Resource": ["arn:aws:s3:::lobe"],
+ "Resource": ["arn:aws:s3:::casdoor"],
"Condition": {
"StringEquals": {
"s3:prefix": ["files/*"]
@@ -128,122 +165,100 @@ docker compose up -d
"AWS": ["*"]
},
"Action": ["s3:PutObject", "s3:DeleteObject", "s3:GetObject"],
- "Resource": ["arn:aws:s3:::lobe/files/**"]
+ "Resource": ["arn:aws:s3:::casdoor/**"]
}
],
"Version": "2012-10-17"
}
```
-4. Create a new access key, and fill the generated `Access Key` and `Secret Key` into your `.env` file under `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`.
-
-### Restart LobeChat Service
-
-```sh
-docker compose up -d
-```
+3. Create a new access key and store the generated `Access Key` and `Secret Key`.
-
- At this point, do not use `docker compose restart lobe` to restart, as this method will not reload the environment variables, and your S3 configuration will not take effect.
-
-
+4. In Casdoor's `Identity -> Providers`, associate the MinIO S3 service. Here is a sample configuration:
-If you see the following logs in the container, it indicates that it has started successfully:
+ ![casdoor](https://github.com/user-attachments/assets/71035610-0706-434e-9488-ab5819b55330)
-```log
-[Database] Start to migration...
-✅ database migration pass.
--------------------------------------
- ▲ Next.js 14.x.x
- - Local: http://localhost:3210
- - Network: http://0.0.0.0:3210
-
- ✓ Starting...
- ✓ Ready in 95ms
-```
+ The Client ID and Client Secret should be the `Access Key` and `Secret Key` from the previous step, and `192.168.31.251` should be replaced with `your_server_ip`.
-
+5. In Casdoor's `Identity -> Applications`, add the provider to the `app-built-in` application, select `minio`, save and exit.
-You have successfully deployed the LobeChat database version, and you can access your LobeChat service at `http://localhost:3210`.
+6. You can try uploading a file in Casdoor's `Identity -> Resources` to test if the configuration is correct.
-If you encounter issues, please check the Docker logs and console logs, and follow the detailed troubleshooting guide later in the document.
+## Publishing to Production (Domain Name Mode)
-## Deploying to Production
+
+ For deployments with a domain name, we recommend using [Logto](https://logto.io/) as the login authentication service. The remainder of this article will use it as an example. If you use other authentication services like Casdoor, the process should be similar, but note that different authentication services may have different port configurations.
+
-The main difference between production and local operation is the need to use domain addresses instead of localhost. We assume that in addition to the above services, you are also running an Nginx layer for reverse proxy and SSL configuration.
+In the following text, we assume that in addition to the above services, you are also running a layer of Nginx for reverse proxy and SSL configuration.
-The domain names and corresponding service port descriptions are as follows:
+The domain and associated service port descriptions are as follows:
-- `lobe.example.com`: your LobeChat service domain, needs to be reverse proxied to the LobeChat service port, default is `3210`
-- `lobe-auth-api.example.com`: your Logto service domain, needs to be reverse proxied to the Logto API service port, default is `3001`
-- `lobe-auth-ui.example.com`: your Logto UI domain, needs to be reverse proxied to the Logto WebUI service port, default is `3002`
-- `lobe-s3-api.example.com`: your MinIO API domain, needs to be reverse proxied to the MinIO API service port, default is `9000`
-- `lobe-s3-ui.example.com`: optional, your MinIO UI domain, needs to be reverse proxied to the MinIO WebUI service port, default is `9001`
+- `lobe.example.com`: Your LobeChat service domain, which needs to reverse proxy to the LobeChat service port, defaulting to `3210`.
+- `lobe-auth-api.example.com`: Your Logto service domain, which needs to reverse proxy to the Logto API service port, defaulting to `3001`.
+- `lobe-auth-ui.example.com`: Your Logto UI domain, which needs to reverse proxy to the Logto WebUI service port, defaulting to `3002`.
+- `lobe-s3-api.example.com`: Your MinIO API domain, which needs to reverse proxy to the MinIO API service port, defaulting to `9000`.
+- `lobe-s3-ui.example.com`: Optional, your MinIO UI domain, which needs to reverse proxy to the MinIO WebUI service port, defaulting to `9001`.
-And the service port without reverse proxy:
+And the service ports that do not require reverse proxy:
-- `postgresql`: your PostgreSQL database service port, default is `5432`
+- `postgresql`: Your PostgreSQL database service port, defaulting to `5432`.
- Please note that CORS cross-origin is configured internally in MinIO / Logto service, do not configure CORS additionally in your reverse proxy, as this will cause errors.
- For minio ports other than 443, Host must be $http_host (with port number), otherwise a 403 error will occur: proxy_set_header Host $http_host.
+ Please note that CORS cross-domain is configured internally in MinIO / Logto services. Do not configure CORS additionally in your reverse proxy, as this will cause errors.
-If you need to configure SSL certificates, please configure them uniformly in the outer Nginx reverse proxy, rather than in MinIO.
+ For MinIO not on port 443, the Host must be `$http_host` (with port number), otherwise a 403 error will occur: `proxy_set_header Host $http_host`.
+If you need to configure an SSL certificate, please configure it uniformly in the outer Nginx reverse proxy and not in MinIO.
### Configuration Files
```sh
-curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/docker-compose.yml > docker-compose.yml
-curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/.env.example > .env
+curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/logto/docker-compose.yml > docker-compose.yml
+curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/logto/.env.example > .env
```
-The configuration files include `.env` and `docker-compose.yml`, where the `.env` file is used to configure LobeChat's environment variables, and the `docker-compose.yml` file is used to configure the Postgres, MinIO, and Logto services.
+The configuration files include both `.env` and `docker-compose.yml`, where the `.env` file is used to configure the environment variables for LobeChat, and the `docker-compose.yml` file is used to configure the Postgres, MinIO, and Logto services.
-In general, you should only modify sensitive information such as domain names and account passwords, while other configuration items should be set according to the default values.
+Generally, you should only modify sensitive information such as domain names and account passwords, while keeping other configuration items at their default values.
-Refer to the example configurations in the appendix of this article.
+Refer to the appendix for example configurations.
-### PostgreSQL Database Configuration
+### Postgres Database Configuration
-You can check the logs using the following command:
+You can check the logs with the following command:
```sh
docker logs -f lobe-database
```
- In our official Docker images, the database schema migration will be automatically executed before
- starting the image. Our official image guarantees the stability of the "empty database -> complete
- table" automatic table creation. Therefore, we recommend that your database instance use an empty
- table instance, thereby avoiding the hassle of manually maintaining table structures or
- migrations.
+ In our official Docker image, database schema migration is automatically executed before starting the image. Our official image promises stability in the automatic creation of tables from "empty database -> complete tables." Therefore, we recommend that your database instance use an empty table instance to avoid the hassle of manual table structure maintenance or migration.
-If you encounter issues when creating tables, you can try using the following commands to forcibly remove the database container and restart:
+If you encounter issues when creating tables, you can try the following command to force remove the database container and restart:
```sh
-docker compose down # Stop services
+docker compose down # Stop the service
sudo rm -rf ./data # Remove mounted database data
docker compose up -d # Restart
```
-### Authentication Service Configuration
+### Login Authentication Service Configuration
This article uses Logto as an example to explain the configuration process. If you are using other authentication service providers, please refer to their documentation for configuration.
- Please remember to configure the corresponding CORS cross-origin settings for the authentication service provider to ensure that LobeChat can access the authentication service properly.
-
-In this article, you need to allow cross-origin requests from `https://lobe.example.com`.
+ Please remember to configure the CORS cross-domain settings for the corresponding login authentication service provider to ensure LobeChat can access the authentication service properly.
+In this article, you need to allow cross-domain requests from `https://lobe.example.com`.
-You need to first access the WebUI for configuration:
+You first need to visit the WebUI for configuration:
-- If you configured the reverse proxy as mentioned earlier, open `https://lobe-auth-ui.example.com`
-- Otherwise, after port mapping, open `http://localhost:3002`
+- If you have configured the reverse proxy as mentioned earlier, open `https://lobe-auth-ui.example.com`.
+- Otherwise, open `http://localhost:3002` after performing port mapping.
1. Register a new account; the first registered account will automatically become an administrator.
@@ -254,7 +269,7 @@ You need to first access the WebUI for configuration:
4. Set `CORS allowed origins` to `https://lobe.example.com`.
@@ -263,14 +278,14 @@ You need to first access the WebUI for configuration:
6. Set `AUTH_LOGTO_ISSUER` in your `.env` file to `https://lobe-auth-api.example.com/oidc`.
-7. Optional: In the left panel under `Sign-in experience`, in `Sign-up and sign-in - Advanced Options`, disable `Enable user registration` to prohibit user self-registration. If you disable user self-registration, you can only manually add users in the left panel under `User Management`.
+7. Optionally, in the left panel under `Sign-in experience`, you can disable `Enable user registration` in `Sign-up and sign-in - Advanced Options` to prevent users from registering on their own. If you disable user registration, you will need to manually add users in the left panel under `User Management`.
@@ -281,8 +296,7 @@ You need to first access the WebUI for configuration:
```
- Please note that the administrator account is not the same as a registered user; do not use your
- administrator account to log into LobeChat, as this will only result in an error.
+ Please note that the administrator account is not the same as a registered user. Do not log in to LobeChat with your administrator account, as this will only result in an error.
### S3 Object Storage Service Configuration
@@ -290,44 +304,43 @@ You need to first access the WebUI for configuration:
This article uses MinIO as an example to explain the configuration process. If you are using other S3 service providers, please refer to their documentation for configuration.
- Please remember to configure the corresponding CORS cross-origin settings for the S3 service provider to ensure that LobeChat can access the S3 service properly.
-
-In this article, you need to allow cross-origin requests from `https://lobe.example.com`. This can be configured in the MinIO WebUI under `Configuration - API - Cors Allow Origin`, or in the Docker Compose under `minio - environment - MINIO_API_CORS_ALLOW_ORIGIN`.
+ Please remember to configure the CORS cross-domain settings for the corresponding S3 service provider to ensure LobeChat can access the S3 service properly.
-If you configure using the second method (which is also the default method), you will not be able to configure it in the MinIO WebUI anymore.
+In this article, you need to allow cross-domain requests from `https://lobe.example.com`. This can be configured in MinIO WebUI under `Configuration - API - Cors Allow Origin`, or in the Docker Compose under `minio - environment - MINIO_API_CORS_ALLOW_ORIGIN`.
+If you use the second method (which is also the default method) for configuration, you will not be able to configure it in MinIO WebUI anymore.
-You need to first access the WebUI for configuration:
+You first need to visit the WebUI for configuration:
-- If you configured the reverse proxy as mentioned earlier, open `https://lobe-s3-ui.example.com`
-- Otherwise, after port mapping, open `http://localhost:9001`
+- If you have configured the reverse proxy as mentioned earlier, open `https://lobe-s3-ui.example.com`.
+- Otherwise, open `http://localhost:9001` after performing port mapping.
-1. Enter your `MINIO_ROOT_USER` and `MINIO_ROOT_PASSWORD` on the login screen, then click login.
+1. Enter your set `MINIO_ROOT_USER` and `MINIO_ROOT_PASSWORD` on the login page, then click login.
-2. In the left panel under Administer / Buckets, click `Create Bucket`, enter `lobe` (corresponding to your `S3_BUCKET` environment variable), and then click `Create`.
+2. In the left panel under Administer / Buckets, click `Create Bucket`, enter `lobe` (which corresponds to your `S3_BUCKET` environment variable), and then click `Create`.
-3. Select your bucket, click Summary - Access Policy, edit, choose `Custom`, and input the content from `minio-bucket-config.json` (see appendix) and save (again, assuming your bucket name is `lobe`):
+3. Select your bucket, click Summary - Access Policy, edit, choose `Custom`, input the content from `minio-bucket-config.json` (see appendix), and save (assuming your bucket name is `lobe`):
-4. In the left panel under User / Access Keys, click `Create New Access Key`, make no additional modifications, and fill the generated `Access Key` and `Secret Key` into your `.env` file under `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`.
+4. In the left panel under User / Access Keys, click `Create New Access Key`, without any extra modifications, and fill the generated `Access Key` and `Secret Key` into your `.env` file under `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`.
@@ -337,161 +350,13 @@ You need to first access the WebUI for configuration:
docker compose up -d
```
-You have successfully deployed the LobeChat database version, and you can access your LobeChat service at `https://lobe.example.com`.
+At this point, you have successfully deployed the LobeChat database version, and you can access your LobeChat service at `https://lobe.example.com`.
## Appendix
-To facilitate one-click copying, here are the example configuration files needed to configure the server database:
+For convenience, here is a summary of the example configuration files needed for deploying the server database in domain name mode (for local quick start, local IP access, etc., please directly use the `setup.sh` script to generate and modify it yourself):
-### Local Deployment
-
-#### `.env`
-
-```sh
-# Logto secret
-AUTH_LOGTO_ID=
-AUTH_LOGTO_SECRET=
-
-# MinIO S3 configuration
-MINIO_ROOT_USER=YOUR_MINIO_USER
-MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
-
-# Configure the bucket information of MinIO
-MINIO_LOBE_BUCKET=lobe
-S3_ACCESS_KEY_ID=
-S3_SECRET_ACCESS_KEY=
-
-# Proxy, if you need it
-# HTTP_PROXY=http://localhost:7890
-# HTTPS_PROXY=http://localhost:7890
-
-# Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE.
-# OPENAI_API_KEY=sk-xxxx
-# OPENAI_PROXY_URL=https://api.openai.com/v1
-# OPENAI_MODEL_LIST=...
-
-# ----- Other config -----
-# if no special requirements, no need to change
-LOBE_PORT=3210
-LOGTO_PORT=3001
-MINIO_PORT=9000
-
-# Postgres related, which are the necessary environment variables for DB
-LOBE_DB_NAME=lobechat
-POSTGRES_PASSWORD=uWNZugjBqixf8dxC
-
-```
-
-#### `docker-compose.yml`
-
-```yaml
-services:
- network-service:
- image: alpine
- container_name: lobe-network
- ports:
- - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
- - '9001:9001' # MinIO Console
- - '${LOGTO_PORT}:${LOGTO_PORT}' # Logto
- - '3002:3002' # Logto Admin
- - '${LOBE_PORT}:3210' # LobeChat
- command: tail -f /dev/null
- networks:
- - lobe-network
-
- postgresql:
- image: pgvector/pgvector:pg16
- container_name: lobe-postgres
- ports:
- - "5432:5432"
- volumes:
- - './data:/var/lib/postgresql/data'
- environment:
- - 'POSTGRES_DB=${LOBE_DB_NAME}'
- - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
- healthcheck:
- test: ['CMD-SHELL', 'pg_isready -U postgres']
- interval: 5s
- timeout: 5s
- retries: 5
- restart: always
- networks:
- - lobe-network
-
- minio:
- image: minio/minio
- container_name: lobe-minio
- network_mode: 'service:network-service'
- volumes:
- - './s3_data:/etc/minio/data'
- environment:
- - 'MINIO_ROOT_USER=${MINIO_ROOT_USER}'
- - 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}'
- - 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:${LOBE_PORT}'
- restart: always
- command: >
- server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
-
- logto:
- image: svhd/logto
- container_name: lobe-logto
- network_mode: 'service:network-service'
- depends_on:
- postgresql:
- condition: service_healthy
- environment:
- - 'TRUST_PROXY_HEADER=1'
- - 'PORT=${LOGTO_PORT}'
- - 'DB_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/logto'
- - 'ENDPOINT=http://localhost:${LOGTO_PORT}'
- - 'ADMIN_ENDPOINT=http://localhost:3002'
- entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start']
-
- lobe:
- image: lobehub/lobe-chat-database
- container_name: lobe-database
- network_mode: 'service:network-service'
- depends_on:
- postgresql:
- condition: service_healthy
- network-service:
- condition: service_started
- minio:
- condition: service_started
- logto:
- condition: service_started
-
- environment:
- - 'APP_URL=http://localhost:3210'
- - 'NEXT_AUTH_SSO_PROVIDERS=logto'
- - 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
- - 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg'
- - 'NEXTAUTH_URL=http://localhost:${LOBE_PORT}/api/auth'
- - 'AUTH_LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc'
- - 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
- - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
- - 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
- - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}'
- - 'S3_ENABLE_PATH_STYLE=1'
- env_file:
- - .env
- restart: always
-
-volumes:
- data:
- driver: local
- s3_data:
- driver: local
-
-networks:
- lobe-network:
- driver: bridge
-
-```
-
-### Deploying to Production
-
-#### `.env`
+### `.env`
```sh
# Required: LobeChat domain for tRPC calls
@@ -519,8 +384,8 @@ NEXTAUTH_URL=https://lobe.example.com/api/auth
# NextAuth providers configuration (example using Logto)
# For other providers, see: https://lobehub.com/docs/self-hosting/environment-variables/auth
-AUTH_LOGTO_ID=YOUR_LOGTO_CLIENT_ID
-AUTH_LOGTO_SECRET=YOUR_LOGTO_CLIENT_SECRET
+AUTH_LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID
+AUTH_LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET
AUTH_LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc
# Proxy settings (if needed, e.g., when using GitHub as an auth provider)
@@ -550,10 +415,10 @@ S3_ENABLE_PATH_STYLE=1
# OPENAI_API_KEY=sk-xxxx
# OPENAI_PROXY_URL=https://api.openai.com/v1
# OPENAI_MODEL_LIST=...
-
```
-#### `docker-compose.yml`
+### `docker-compose.yml`
+
```yaml
services:
@@ -628,7 +493,7 @@ volumes:
```
-#### `minio-bucket-config.json`
+### `minio-bucket-config.json`
```json
{
diff --git a/docs/self-hosting/server-database/docker-compose.zh-CN.mdx b/docs/self-hosting/server-database/docker-compose.zh-CN.mdx
index 3e7d0f62c6be..8273d9c8774c 100644
--- a/docs/self-hosting/server-database/docker-compose.zh-CN.mdx
+++ b/docs/self-hosting/server-database/docker-compose.zh-CN.mdx
@@ -44,57 +44,100 @@ tags:
本文中,我们提供了完全基于开源自建服务的 Docker Compose 配置,你可以直接使用这份配置文件来启动 LobeChat 数据库版本,也可以对之进行修改以适应你的需求。
-我们默认使用 [MinIO](https://github.com/minio/minio) 作为本地 S3 对象存储服务,使用 [Logto](https://github.com/logto-io/logto) 作为本地鉴权服务。
+我们默认使用 [MinIO](https://github.com/minio/minio) 作为本地 S3 对象存储服务,使用 [Casdoor](https://github.com/casdoor/casdoor) 作为本地鉴权服务。
## 快速启动
-为方便快速上手,这一章使用 `docker-compose/local` 目录中的 docker-compose 配置文件,启动后的 LobeChat 应用运行在 `http://localhost:3210`,可在本地运行。
+为方便快速上手,这一章使用 `docker-compose/local` 目录中的 `docker-compose.yml` 配置文件,启动后的 LobeChat 应用运行在 `http://localhost:3210`,可在本地运行。
- 为了快速上手,此 docker-compose.yml内置掉了大量的 Secret/Password
- 的配置,仅适用于快速演示或个人本地使用。请勿直接用于线上生产环境!否则遇到安全问题请自行负责!
+ 为了快速上手,此 `docker-compose.yml` 内置了大量的 Secret/Password
+ 的敏感字段配置,仅适用于快速演示或个人本地使用。请勿直接用于线上生产环境!否则遇到安全问题请自行负责!
- ### 创建配置文件
+ ### 一键启动脚本
新建一个 `lobe-chat-db` 目录,用于存放你的配置文件和后续的数据库文件。
```sh
mkdir lobe-chat-db
+cd lobe-chat-db
```
-拉取配置文件到你的目录中:
+我们提供了一个一键启动脚本 `setup.sh`,可以自动使用默认配置并启动服务:
```sh
-curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local-logto/docker-compose.yml > docker-compose.yml
-curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local-logto/.env.zh-CN.example > .env
+bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f -l zh_CN
```
-### 启动服务
+### 启动 Docker
```sh
-docker compose up -d
+docker compose -p lobechat-starter up -d
```
-### 配置 Logto
+### 检查日志
-1. 打开 `http://localhost:3002`,访问 Logto WebUI,注册管理员账号
+```sh
+docker logs -f lobe-database
+```
-2. 创建一个 `Next.js (App Router)` 应用,添加以下配置:
+如果你在容器中看到了以下日志,则说明已经启动成功:
- - `Redirect URI` 为 `http://localhost:3210/api/auth/callback/logto`
- - `Post sign-out redirect URI` 为 `http://localhost:3210/`
+```log
+[Database] Start to migration...
+✅ database migration pass.
+-------------------------------------
+ ▲ Next.js 14.x.x
+ - Local: http://localhost:3210
+ - Network: http://0.0.0.0:3210
+
+ ✓ Starting...
+ ✓ Ready in 95ms
+```
-3. 获取 `App ID` 和 `App secrets`,填入 `.env` 文件中对应的 `AUTH_LOGTO_ID` 、 `AUTH_LOGTO_SECRET`
+
-### 配置 MinIO S3
+至此,你已经成功部署了 LobeChat 数据库版本,你可以通过 `http://localhost:3210` 访问你的 LobeChat 服务。
+
+如果你遇到问题,请尝试查看 Docker 日志和控制台日志进行排查。
+
+## 发布到生产(IP 模式)
-1. 打开 `http://localhost:9001`,访问 MinIO WebUI,默认管理员账号密码在 `.env` 中配置
+下文假设局域网 / 公网需要运行 LobeChat 服务的机器 IP 为 `your_server_ip`。
-2. 创建符合你的 `.env` 文件中 `MINIO_LOBE_BUCKET` 字段的桶,默认为 `lobe`
+想要通过局域网 IP 访问,你需要首先按照本地启动运行:
+
+```sh
+bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f -l zh_CN
+docker compose -p lobechat-starter up -d
+```
+
+接着,你需要修改下载下来的 `docker-compose.yml` 文件,执行一次全文替换,将 `localhost` 替换为 `your_server_ip`,随后重新启动:
+
+```sh
+sed -i 's/localhost/your_server_ip/g' docker-compose.yml
+docker compose -p lobechat-starter up -d
+```
+
+### 配置 Casdoor
+
+1. 使用 `setup.sh` 脚本启动后,Casdoor WebUI 默认端口为 `8000`,你可以通过 `http://your_server_ip:8000` 访问,默认用户名 `admin`,密码 `123`
+
+2. 在 `身份认证 -> 应用` 中添加一行
+
+ ```
+ http://your_server_ip:3210/api/auth/callback/casdoor
+ ```
+
+3. 其他配置大多保持默认即可,你也可以在 `身份认证 -> 应用` 中修改默认配置
+
+### 配置 MinIO S3
-3. 选择自定义策略,复制并粘贴如下内容(如果你修改了桶名,请自行查找替换)
+1. 使用 `setup.sh` 脚本启动后,MinIO WebUI 默认端口为 `9001`,你可以通过 `http://your_server_ip:9001` 访问,默认用户名 `YOUR_MINIO_USER`,密码 `YOUR_MINIO_PASSWORD`
+
+2. 大多数配置保持默认即可,如果你希望能允许用户更换头像功能,你需要首先在 `buckets` 中创建一个名为 `casdoor` 的桶,选择自定义策略,复制并粘贴如下内容(如果你修改了桶名,请自行查找替换)
```json
{
@@ -105,7 +148,7 @@ docker compose up -d
"AWS": ["*"]
},
"Action": ["s3:GetBucketLocation"],
- "Resource": ["arn:aws:s3:::lobe"]
+ "Resource": ["arn:aws:s3:::casdoor"]
},
{
"Effect": "Allow",
@@ -113,7 +156,7 @@ docker compose up -d
"AWS": ["*"]
},
"Action": ["s3:ListBucket"],
- "Resource": ["arn:aws:s3:::lobe"],
+ "Resource": ["arn:aws:s3:::casdoor"],
"Condition": {
"StringEquals": {
"s3:prefix": ["files/*"]
@@ -126,50 +169,33 @@ docker compose up -d
"AWS": ["*"]
},
"Action": ["s3:PutObject", "s3:DeleteObject", "s3:GetObject"],
- "Resource": ["arn:aws:s3:::lobe/files/**"]
+ "Resource": ["arn:aws:s3:::casdoor/**"]
}
],
"Version": "2012-10-17"
}
```
-4. 创建一个新的访问密钥,将生成的 `Access Key` 和 `Secret Key` 填入你的 `.env` 文件中的 `S3_ACCESS_KEY_ID` 和 `S3_SECRET_ACCESS_KEY` 中
+3. 创建一个新的访问密钥,将生成的 `Access Key` 和 `Secret Key` 存储之
-### 重启 LobeChat 服务
+4. 在 Casdoor 的 `身份认证 -> 提供商` 中关联 MinIO S3 服务,以下是一个示例配置:
-```sh
-docker compose up -d
-```
+ ![casdoor](https://github.com/user-attachments/assets/71035610-0706-434e-9488-ab5819b55330)
-
- 此时,请勿使用 `docker compose restart lobe` 来重启,因为这种重启方式不会重新加载环境变量,你的
- S3 配置将不会生效。
+ 其中,客户端 ID、客户端密钥为上一步创建的访问密钥中的 `Access Key` 和 `Secret Key`,`192.168.31.251` 应当被替换为 `your_server_ip`。
-
+5. 在 Casdoor 的 `身份认证 -> 应用` 中,对 `app-built-in` 应用添加提供商,选择 `minio`,保存并退出
-如果你在容器中看到了以下日志,则说明已经启动成功:
+6. 你可以在 Casdoor 的 `身份认证 -> 资源` 中,尝试上传文件以测试配置是否正确
-```log
-[Database] Start to migration...
-✅ database migration pass.
--------------------------------------
- ▲ Next.js 14.x.x
- - Local: http://localhost:3210
- - Network: http://0.0.0.0:3210
-
- ✓ Starting...
- ✓ Ready in 95ms
-```
+## 发布到生产(域名模式)
-
-
-至此,你已经成功部署了 LobeChat 数据库版本,你可以通过 `http://localhost:3210` 访问你的 LobeChat 服务。
-
-如果你遇到问题,请尝试查看 Docker 日志和控制台日志,并根据后文的详细指引进行排查。
+
+ 对于拥有域名的部署,我们推荐使用 [Logto](https://logto.io/) 作为登录鉴权服务。本文剩余部分也将以其为例进行说明。如果你使用其他诸如 Casdoor 等其他登录鉴权服务,流程应当相近,但请注意不同的登录鉴权服务的端口配置可能有所差异。
-## 发布到生产
+
-生产和本地运行存在一个很大的差别,就是在于需要使用域名地址而不是 localhost。我们假设在上述服务之外,你还运行了一层 Nginx 来进行反向代理、配置 SSL。
+在下文中,我们假设在上述服务之外,你还运行了一层 Nginx 来进行反向代理、配置 SSL。
域名和配套服务端口说明如下:
@@ -185,7 +211,8 @@ docker compose up -d
请务必注意,CORS 跨域是在 MinIO / Logto 服务端内部配置的,请勿在你的反向代理中额外配置 CORS,这会导致错误。
- 对于minio非443端口时,Host必须是$http_host(带端口号),否则会403错误:proxy_set_header Host $http_host。
+
+ 对于 minio 非 443 端口时,Host 必须是 `$http_host`(带端口号),否则会 403 错误:`proxy_set_header Host $http_host`。
如果你需要配置 SSL 证书,请统一在外层的 Nginx 反向代理中配置,而不是在 MinIO 中配置。
@@ -194,8 +221,8 @@ docker compose up -d
### 配置文件
```sh
-curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/docker-compose.yml > docker-compose.yml
-curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/.env.zh-CN.example > .env
+curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/logto/docker-compose.yml > docker-compose.yml
+curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/logto/.env.zh-CN.example > .env
```
配置文件包括 `.env` 和 `docker-compose.yml` 两个文件,其中 `.env` 文件用于配置 LobeChat 的环境变量,`docker-compose.yml` 文件用于配置 Postgres、MinIO 和 Logto 服务。
@@ -338,157 +365,9 @@ docker compose up -d # 重新启动
## 附录
-为方便一键复制,在此汇总配置服务端数据库所需要的示例配置文件:
-
-### 本地部署
-
-#### `.env`
-
-```sh
-# Logto secret
-AUTH_LOGTO_ID=
-AUTH_LOGTO_SECRET=
-
-# MinIO S3 配置
-MINIO_ROOT_USER=YOUR_MINIO_USER
-MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
-
-# 在下方配置 minio 中添加的桶
-MINIO_LOBE_BUCKET=lobe
-S3_ACCESS_KEY_ID=
-S3_SECRET_ACCESS_KEY=
-
-# Proxy,如果你需要的话(比如你使用 GitHub 作为鉴权服务提供商)
-# HTTP_PROXY=http://localhost:7890
-# HTTPS_PROXY=http://localhost:7890
-
-# 其他环境变量,视需求而定,可以参照客户端版本的环境变量配置,注意不要有 ACCESS_CODE
-# OPENAI_API_KEY=sk-xxxx
-# OPENAI_PROXY_URL=https://api.openai.com/v1
-# OPENAI_MODEL_LIST=...
-
-# ----- 相关配置 start -----
-# 如没有特殊需要不用更改
-LOBE_PORT=3210
-LOGTO_PORT=3001
-MINIO_PORT=9000
-
-# Postgres 相关,也即 DB 必须的环境变量
-LOBE_DB_NAME=lobechat
-POSTGRES_PASSWORD=uWNZugjBqixf8dxC
-
-```
-
-#### `docker-compose.yml`
-
-```yaml
-services:
- network-service:
- image: alpine
- container_name: lobe-network
- ports:
- - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
- - '9001:9001' # MinIO Console
- - '${LOGTO_PORT}:${LOGTO_PORT}' # Logto
- - '3002:3002' # Logto Admin
- - '${LOBE_PORT}:3210' # LobeChat
- command: tail -f /dev/null
- networks:
- - lobe-network
-
- postgresql:
- image: pgvector/pgvector:pg16
- container_name: lobe-postgres
- ports:
- - "5432:5432"
- volumes:
- - './data:/var/lib/postgresql/data'
- environment:
- - 'POSTGRES_DB=${LOBE_DB_NAME}'
- - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
- healthcheck:
- test: ['CMD-SHELL', 'pg_isready -U postgres']
- interval: 5s
- timeout: 5s
- retries: 5
- restart: always
- networks:
- - lobe-network
-
- minio:
- image: minio/minio
- container_name: lobe-minio
- network_mode: 'service:network-service'
- volumes:
- - './s3_data:/etc/minio/data'
- environment:
- - 'MINIO_ROOT_USER=${MINIO_ROOT_USER}'
- - 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}'
- - 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:${LOBE_PORT}'
- restart: always
- command: >
- server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
-
- logto:
- image: svhd/logto
- container_name: lobe-logto
- network_mode: 'service:network-service'
- depends_on:
- postgresql:
- condition: service_healthy
- environment:
- - 'TRUST_PROXY_HEADER=1'
- - 'PORT=${LOGTO_PORT}'
- - 'DB_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/logto'
- - 'ENDPOINT=http://localhost:${LOGTO_PORT}'
- - 'ADMIN_ENDPOINT=http://localhost:3002'
- entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start']
-
- lobe:
- image: lobehub/lobe-chat-database
- container_name: lobe-database
- network_mode: 'service:network-service'
- depends_on:
- postgresql:
- condition: service_healthy
- network-service:
- condition: service_started
- minio:
- condition: service_started
- logto:
- condition: service_started
-
- environment:
- - 'APP_URL=http://localhost:3210'
- - 'NEXT_AUTH_SSO_PROVIDERS=logto'
- - 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
- - 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg'
- - 'NEXTAUTH_URL=http://localhost:${LOBE_PORT}/api/auth'
- - 'AUTH_LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc'
- - 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
- - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
- - 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
- - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}'
- - 'S3_ENABLE_PATH_STYLE=1'
- env_file:
- - .env
- restart: always
-
-volumes:
- data:
- driver: local
- s3_data:
- driver: local
-
-networks:
- lobe-network:
- driver: bridge
-
-```
-
-### 发布到生产
+为方便一键复制,在此汇总域名方式下生产部署配置服务端数据库所需要的示例配置文件(对于本地快速启动、局域网 IP 访问等场景,请直接使用 `setup.sh` 脚本生成后自行修改):
-#### `.env`
+### `.env`
```sh
# 必填,LobeChat 域名,用于 tRPC 调用
@@ -549,7 +428,7 @@ S3_ENABLE_PATH_STYLE=1
```
-#### `docker-compose.yml`
+### `docker-compose.yml`
```yaml
services:
@@ -624,7 +503,7 @@ volumes:
```
-#### `minio-bucket-config.json`
+### `minio-bucket-config.json`
```json
{
diff --git a/docs/usage/providers/ai21.mdx b/docs/usage/providers/ai21.mdx
index c4ac8004ce3c..c25de778cd13 100644
--- a/docs/usage/providers/ai21.mdx
+++ b/docs/usage/providers/ai21.mdx
@@ -1,6 +1,8 @@
---
title: Using AI21 Labs in LobeChat
-description: Learn how to integrate and utilize AI21 Labs's language model APIs in LobeChat.
+description: >-
+ Learn how to integrate and utilize AI21 Labs's language model APIs in
+ LobeChat.
tags:
- LobeChat
- AI21 Labs
diff --git a/docs/usage/providers/ai360.mdx b/docs/usage/providers/ai360.mdx
index 12de95ee00de..1b3dd4f82f5f 100644
--- a/docs/usage/providers/ai360.mdx
+++ b/docs/usage/providers/ai360.mdx
@@ -1,6 +1,6 @@
---
title: Using the 360AI in LobeChat
-description: Learn how to integrate and utilize 360AI's language model APIs in LobeChat.
+description: Learn how to integrate and utilize 360AI's language model APIs in LobeChat.
tags:
- LobeChat
- 360AI
diff --git a/docs/usage/providers/fireworksai.mdx b/docs/usage/providers/fireworksai.mdx
index 664442b588ce..edfb44174e4b 100644
--- a/docs/usage/providers/fireworksai.mdx
+++ b/docs/usage/providers/fireworksai.mdx
@@ -1,6 +1,8 @@
---
title: Using Fireworks AI in LobeChat
-description: Learn how to integrate and utilize Fireworks AI's language model APIs in LobeChat.
+description: >-
+ Learn how to integrate and utilize Fireworks AI's language model APIs in
+ LobeChat.
tags:
- LobeChat
- Fireworks AI
diff --git a/docs/usage/providers/github.mdx b/docs/usage/providers/github.mdx
index 8a4374f26283..1aa69945bdbd 100644
--- a/docs/usage/providers/github.mdx
+++ b/docs/usage/providers/github.mdx
@@ -1,6 +1,6 @@
---
title: Using GitHub Models in LobeChat
-description: Learn how to integrate and utilize GitHub Models in LobeChat.
+description: Learn how to integrate and utilize GitHub Models in LobeChat.
tags:
- LobeChat
- GitHub
diff --git a/docs/usage/providers/hunyuan.mdx b/docs/usage/providers/hunyuan.mdx
index e909c50181b0..cd384fc0911b 100644
--- a/docs/usage/providers/hunyuan.mdx
+++ b/docs/usage/providers/hunyuan.mdx
@@ -1,6 +1,8 @@
---
title: Using Tencent Hunyuan in LobeChat
-description: Learn how to integrate and utilize Tencent Hunyuan's language model APIs in LobeChat.
+description: >-
+ Learn how to integrate and utilize Tencent Hunyuan's language model APIs in
+ LobeChat.
tags:
- LobeChat
- Tencent Hunyuan
diff --git a/docs/usage/providers/siliconcloud.mdx b/docs/usage/providers/siliconcloud.mdx
index 138f46f6501a..8da6b6cec273 100644
--- a/docs/usage/providers/siliconcloud.mdx
+++ b/docs/usage/providers/siliconcloud.mdx
@@ -1,6 +1,8 @@
---
title: Using SiliconCloud in LobeChat
-description: Learn how to integrate and utilize SiliconCloud's language model APIs in LobeChat.
+description: >-
+ Learn how to integrate and utilize SiliconCloud's language model APIs in
+ LobeChat.
tags:
- LobeChat
- SiliconCloud
diff --git a/docs/usage/providers/spark.mdx b/docs/usage/providers/spark.mdx
index 53c1d90eaf0d..d678850b7f9a 100644
--- a/docs/usage/providers/spark.mdx
+++ b/docs/usage/providers/spark.mdx
@@ -1,6 +1,6 @@
---
title: Using iFLYTEK Spark in LobeChat
-description: Learn how to integrate and utilize iFLYTEK's Spark model APIs in LobeChat.
+description: Learn how to integrate and utilize iFLYTEK's Spark model APIs in LobeChat.
tags:
- LobeChat
- iFLYTEK
diff --git a/docs/usage/providers/upstage.mdx b/docs/usage/providers/upstage.mdx
index 6b79a540f18c..85613164095f 100644
--- a/docs/usage/providers/upstage.mdx
+++ b/docs/usage/providers/upstage.mdx
@@ -1,6 +1,6 @@
---
title: Using Upstage in LobeChat
-description: Learn how to integrate and utilize Upstage's language model APIs in LobeChat.
+description: Learn how to integrate and utilize Upstage's language model APIs in LobeChat.
tags:
- LobeChat
- Upstage
diff --git a/docs/usage/providers/wenxin.mdx b/docs/usage/providers/wenxin.mdx
index b38ecc7668e0..41f7daa74a7d 100644
--- a/docs/usage/providers/wenxin.mdx
+++ b/docs/usage/providers/wenxin.mdx
@@ -1,6 +1,8 @@
---
title: Using Wenxin Qianfan in LobeChat
-description: Learn how to integrate and utilize Wenxin Qianfan's language model APIs in LobeChat.
+description: >-
+ Learn how to integrate and utilize Wenxin Qianfan's language model APIs in
+ LobeChat.
tags:
- LobeChat
- 百度
diff --git a/docs/usage/providers/zeroone.mdx b/docs/usage/providers/zeroone.mdx
index c2d7f5c026eb..9ccf79619fc0 100644
--- a/docs/usage/providers/zeroone.mdx
+++ b/docs/usage/providers/zeroone.mdx
@@ -2,8 +2,8 @@
title: Using 01 AI API Key in LobeChat
description: >-
Learn how to integrate and use 01 AI in LobeChat with step-by-step
- instructions. Obtain an API key, configure 01 AI, and start
- conversations with AI models.
+ instructions. Obtain an API key, configure 01 AI, and start conversations with
+ AI models.
tags:
- 01.AI
- Web UI