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: Migrate On-Click Deployment to LobeHub (#11856)

Rylan Cai56942d4d573a
diff --git a/docker-compose/local/.env.example b/docker-compose/local/.env.example
index 82ca9c68ee2..be99e9eae60 100644
--- a/docker-compose/local/.env.example
+++ b/docker-compose/local/.env.example
@@ -15,31 +15,33 @@
# if no special requirements, no need to change
LOBE_PORT=3210
CASDOOR_PORT=8000
-MINIO_PORT=9000
+RUSTFS_PORT=9000
APP_URL=http://localhost:3210
# INTERNAL_APP_URL is optional, used for server-to-server calls
# to bypass CDN/proxy. If not set, defaults to APP_URL.
# Example: INTERNAL_APP_URL=http://localhost:3210
-AUTH_URL=http://localhost:3210/api/auth
# Postgres related, which are the necessary environment variables for DB
LOBE_DB_NAME=lobechat
POSTGRES_PASSWORD=uWNZugjBqixf8dxC
+AUTH_SSO_PROVIDERS=casdoor
AUTH_CASDOOR_ISSUER=http://localhost:8000
# Casdoor secret
AUTH_CASDOOR_ID=a387a4892ee19b1a2249
AUTH_CASDOOR_SECRET=dbf205949d704de81b0b5b3603174e23fbecc354
CASDOOR_WEBHOOK_SECRET=casdoor-secret
-# MinIO S3 configuration
-MINIO_ROOT_USER=admin
-MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
+# RUSTFS S3 configuration
+RUSTFS_ACCESS_KEY=admin
+RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
-# Configure the bucket information of MinIO
+# Configure the bucket information of RUSTFS
S3_PUBLIC_DOMAIN=http://localhost:9000
S3_ENDPOINT=http://localhost:9000
-MINIO_LOBE_BUCKET=lobe
+RUSTFS_LOBE_BUCKET=lobe
# Configure for casdoor
-origin=http://localhost:8000
\ No newline at end of file
+origin=http://localhost:8000
+
+JWKS_KEY={"keys":[{"d":"PVoFyqyrGstB8wU52S7gqqQQdZLtin_thcEM0nrNtqp9U-NlKLlhgEcWp5t89ycgvhsAzmrRbezGj4JBTr3jn7eWdwQpPJNYiipnsgeJn0pwsB0H2dMqtavxinoPVXkMTOuGHMTFhhyguFBw2JbIL0PTQUcUlXjv40OoJpYHZeggSxgfV-TuxjwW8Ll4-n84M5IOi6A53RvioE-Hm1iyIc2XLBCfyOu-SbAQYi8HzrA64kCxobAB0peLQMiAzfZmwPKiGOhnhKrAlYmG02qFnbUYiJu_-AXwsAyGv9S9i6dwK7QXaGGWYyis8LlPpd_JmPrBnrWomwDlI045NUMWZQ","dp":"OSXI2NBBZl2r0Dpf4-1z44A_jC5lOyXtJhXQYnSXy5eIuxTJcEtkUYagGEwnREO4Q3t-4J-lT_6Y71M1ZlgKG1upwfw1O4aE3vGpHOik9iZYYCjA8fe5uBfOpX1ELmOtHNoHRhMtyjuPxSFXLlSp3bgcF1f3F40ClukdvXCx0Mc","dq":"m6hNdfj-F8E_7nUlX2nG95OffkFrhHTo67ML9aPgpvFwBlzg-hk5LwtxMfUzngqWF78TMl0JDm7vS1bz0xlWqXqu8pFPoTUnUoWgYfvuyHLBwR5TgccQkfoKbkSMzYNy8VJPXZeyIjVXsW98tZvj-NZF-M9Pke_EWJm-jjXCu_8","e":"AQAB","kty":"RSA","n":"piffosMS0HOSgsSr_zQkXYaQt1kOCD73VR0b2XJD6UdQCKPbnBOzTIuA_xowX61QVsl5pCZLTw8ERC3r2Nlxj5Rp_H6RuOT7ioUqlbnxSGnfuAn8dFupY3A-sf9HVDOvtJdlS-nO9yA4wWU-A50zZ1Mf0pPZlUZE6dUQfsJFi5yXaNAybyk3U4VpMO_SXAilWEHVhiO0F0ccpJMCkT47AeXmYH9MlWwIGcay0UiAsdrs8J-q1arZ7Mbq0oxHmUXJG0vwRvAL8KnCEi8cJ3e2kKCRcr-BQCujsHUyUl6f_ATwSVuTHdAR1IzIcW37v27h3WQK_v0ffQM1NstamDX5vQ","p":"4myVm2M5cZGvVXsOmWUTUG87VC1GlQcL5tmMNSGSpQCL8yWZ1vANkmCxSMptrKB4dU9DAB3On6_oMhW1pJ3uYNGSW49BcmJoLkiWKeg5zWFnKPQNuThQmY1sCCubtKhBQgaYUr7TVzN9smrDV3zCu9MlRl-XPwnEmWaDII3g-f8","q":"u9v4IOEsb4l2Y3eWKE2bwJh5fJRR4vivaYA7U-1-OpvDwB3A48Rey9IL1ucXqE5G1Du8BtijPm5oSAar5uzrjtg1bZ9gevif6DnBGaIRE7LnSrUsTPfZwzntJ1rTaGiVe_pAdnTKXXaH6DxygXxH4wvGgA44V3TTfBXQUcjzdEM","qi":"lDBnSPKkRnYqQvbqVD1LxzqBPEeqEA3GyCqMj6fIZNgoEaBSLi0TSsUyGZ5mahX3KO35vKAZa5jvGjhvUGUiXycq8KvRZdeGK45vJdwZT2TiXiDwo9IQgJcbFMpxaB9DhjX2x0yqxgUY5ca75jLqbMuKBKBN0PVqIr9jlHkR8_s","use":"sig","kid":"6823046760c5d460","alg":"RS256"}]}
\ No newline at end of file
diff --git a/docker-compose/local/.env.zh-CN.example b/docker-compose/local/.env.zh-CN.example
index a6b9a46d60e..a369fceadd4 100644
--- a/docker-compose/local/.env.zh-CN.example
+++ b/docker-compose/local/.env.zh-CN.example
@@ -15,28 +15,30 @@
# 如没有特殊需要不用更改
LOBE_PORT=3210
CASDOOR_PORT=8000
-MINIO_PORT=9000
+RUSTFS_PORT=9000
APP_URL=http://localhost:3210
-AUTH_URL=http://localhost:3210/api/auth
# Postgres 相关,也即 DB 必须的环境变量
LOBE_DB_NAME=lobechat
POSTGRES_PASSWORD=uWNZugjBqixf8dxC
+AUTH_SSO_PROVIDERS=casdoor
AUTH_CASDOOR_ISSUER=http://localhost:8000
# Casdoor secret
AUTH_CASDOOR_ID=a387a4892ee19b1a2249
AUTH_CASDOOR_SECRET=dbf205949d704de81b0b5b3603174e23fbecc354
CASDOOR_WEBHOOK_SECRET=casdoor-secret
-# MinIO S3 配置
-MINIO_ROOT_USER=admin
-MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
+# RustFS S3 配置
+RUSTFS_ACCESS_KEY=admin
+RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
-# 在下方配置 minio 中添加的桶
+# 在下方配置 rustfs 中添加的桶
S3_PUBLIC_DOMAIN=http://localhost:9000
S3_ENDPOINT=http://localhost:9000
-MINIO_LOBE_BUCKET=lobe
+RUSTFS_LOBE_BUCKET=lobe
# 为 casdoor 配置
-origin=http://localhost:8000
\ No newline at end of file
+origin=http://localhost:8000
+
+JWKS_KEY={"keys":[{"d":"PVoFyqyrGstB8wU52S7gqqQQdZLtin_thcEM0nrNtqp9U-NlKLlhgEcWp5t89ycgvhsAzmrRbezGj4JBTr3jn7eWdwQpPJNYiipnsgeJn0pwsB0H2dMqtavxinoPVXkMTOuGHMTFhhyguFBw2JbIL0PTQUcUlXjv40OoJpYHZeggSxgfV-TuxjwW8Ll4-n84M5IOi6A53RvioE-Hm1iyIc2XLBCfyOu-SbAQYi8HzrA64kCxobAB0peLQMiAzfZmwPKiGOhnhKrAlYmG02qFnbUYiJu_-AXwsAyGv9S9i6dwK7QXaGGWYyis8LlPpd_JmPrBnrWomwDlI045NUMWZQ","dp":"OSXI2NBBZl2r0Dpf4-1z44A_jC5lOyXtJhXQYnSXy5eIuxTJcEtkUYagGEwnREO4Q3t-4J-lT_6Y71M1ZlgKG1upwfw1O4aE3vGpHOik9iZYYCjA8fe5uBfOpX1ELmOtHNoHRhMtyjuPxSFXLlSp3bgcF1f3F40ClukdvXCx0Mc","dq":"m6hNdfj-F8E_7nUlX2nG95OffkFrhHTo67ML9aPgpvFwBlzg-hk5LwtxMfUzngqWF78TMl0JDm7vS1bz0xlWqXqu8pFPoTUnUoWgYfvuyHLBwR5TgccQkfoKbkSMzYNy8VJPXZeyIjVXsW98tZvj-NZF-M9Pke_EWJm-jjXCu_8","e":"AQAB","kty":"RSA","n":"piffosMS0HOSgsSr_zQkXYaQt1kOCD73VR0b2XJD6UdQCKPbnBOzTIuA_xowX61QVsl5pCZLTw8ERC3r2Nlxj5Rp_H6RuOT7ioUqlbnxSGnfuAn8dFupY3A-sf9HVDOvtJdlS-nO9yA4wWU-A50zZ1Mf0pPZlUZE6dUQfsJFi5yXaNAybyk3U4VpMO_SXAilWEHVhiO0F0ccpJMCkT47AeXmYH9MlWwIGcay0UiAsdrs8J-q1arZ7Mbq0oxHmUXJG0vwRvAL8KnCEi8cJ3e2kKCRcr-BQCujsHUyUl6f_ATwSVuTHdAR1IzIcW37v27h3WQK_v0ffQM1NstamDX5vQ","p":"4myVm2M5cZGvVXsOmWUTUG87VC1GlQcL5tmMNSGSpQCL8yWZ1vANkmCxSMptrKB4dU9DAB3On6_oMhW1pJ3uYNGSW49BcmJoLkiWKeg5zWFnKPQNuThQmY1sCCubtKhBQgaYUr7TVzN9smrDV3zCu9MlRl-XPwnEmWaDII3g-f8","q":"u9v4IOEsb4l2Y3eWKE2bwJh5fJRR4vivaYA7U-1-OpvDwB3A48Rey9IL1ucXqE5G1Du8BtijPm5oSAar5uzrjtg1bZ9gevif6DnBGaIRE7LnSrUsTPfZwzntJ1rTaGiVe_pAdnTKXXaH6DxygXxH4wvGgA44V3TTfBXQUcjzdEM","qi":"lDBnSPKkRnYqQvbqVD1LxzqBPEeqEA3GyCqMj6fIZNgoEaBSLi0TSsUyGZ5mahX3KO35vKAZa5jvGjhvUGUiXycq8KvRZdeGK45vJdwZT2TiXiDwo9IQgJcbFMpxaB9DhjX2x0yqxgUY5ca75jLqbMuKBKBN0PVqIr9jlHkR8_s","use":"sig","kid":"6823046760c5d460","alg":"RS256"}]}
\ No newline at end of file
diff --git a/docker-compose/local/bucket.config.json b/docker-compose/local/bucket.config.json
new file mode 100644
index 00000000000..ceac834a988
--- /dev/null
+++ b/docker-compose/local/bucket.config.json
@@ -0,0 +1,24 @@
+{
+ "ID": "",
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Sid": "",
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": [
+ "*"
+ ]
+ },
+ "Action": [
+ "s3:GetObject"
+ ],
+ "NotAction": [],
+ "Resource": [
+ "arn:aws:s3:::lobe/*"
+ ],
+ "NotResource": [],
+ "Condition": {}
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docker-compose/local/docker-compose.yml b/docker-compose/local/docker-compose.yml
index 02b1fb40075..d19c7ccdb7d 100644
--- a/docker-compose/local/docker-compose.yml
+++ b/docker-compose/local/docker-compose.yml
@@ -5,8 +5,8 @@ services:
container_name: lobe-network
restart: always
ports:
- - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
- - '9001:9001' # MinIO Console
+ - '${RUSTFS_PORT}:9000' # RustFS API
+ - '9001:9001' # RustFS Console
- '${CASDOOR_PORT}:${CASDOOR_PORT}' # Casdoor
- '${LOBE_PORT}:3210' # LobeChat
- '3000:3000' # Grafana
@@ -52,31 +52,46 @@ services:
networks:
- lobe-network
- minio:
- image: minio/minio:RELEASE.2025-04-22T22-12-26Z
- container_name: lobe-minio
+
+ rustfs:
+ image: rustfs/rustfs:latest
+ container_name: lobe-rustfs
network_mode: 'service:network-service'
- volumes:
- - './s3_data:/etc/minio/data'
environment:
- - 'MINIO_API_CORS_ALLOW_ORIGIN=*'
- env_file:
- - .env
- restart: always
- entrypoint: >
- /bin/sh -c "
- minio server /etc/minio/data --address ':${MINIO_PORT}' --console-address ':9001' &
- MINIO_PID=\$!
- while ! curl -s http://localhost:${MINIO_PORT}/minio/health/live; do
- echo 'Waiting for MinIO to start...'
- sleep 1
- done
- sleep 5
- mc alias set myminio http://localhost:${MINIO_PORT} ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD}
- echo 'Creating bucket ${MINIO_LOBE_BUCKET}'
- mc mb myminio/${MINIO_LOBE_BUCKET}
- wait \$MINIO_PID
- "
+ - RUSTFS_CONSOLE_ENABLE=true
+ - RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY}
+ - RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY}
+ volumes:
+ - rustfs-data:/data
+ healthcheck:
+ test: ["CMD-SHELL", "wget -qO- http://localhost:9000/health >/dev/null 2>&1 || exit 1"]
+ interval: 5s
+ timeout: 3s
+ retries: 30
+ command: ["--access-key","${RUSTFS_ACCESS_KEY}","--secret-key","${RUSTFS_SECRET_KEY}","/data"]
+
+ rustfs-init:
+ image: minio/mc:latest
+ container_name: lobe-rustfs-init
+ depends_on:
+ rustfs:
+ condition: service_healthy
+ volumes:
+ - ./bucket.config.json:/bucket.config.json:ro
+ entrypoint: /bin/sh
+ command: -c '
+ set -eux;
+ echo "S3_ACCESS_KEY=${RUSTFS_ACCESS_KEY}, S3_SECRET_KEY=${RUSTFS_SECRET_KEY}";
+ mc --version;
+ mc alias set rustfs "http://network-service:9000" "${RUSTFS_ACCESS_KEY}" "${RUSTFS_SECRET_KEY}";
+ mc ls rustfs || true;
+ mc mb "rustfs/lobe" --ignore-existing;
+ mc admin info rustfs || true;
+ mc anonymous set-json "/bucket.config.json" "rustfs/lobe";
+ '
+ restart: "no"
+ networks:
+ - lobe-network
# version lock ref: https://github.com/lobehub/lobe-chat/pull/7331
casdoor:
@@ -112,7 +127,7 @@ services:
- .env
lobe:
- image: lobehub/lobe-chat-database
+ image: lobehub/lobehub
container_name: lobe-chat
network_mode: 'service:network-service'
depends_on:
@@ -120,8 +135,10 @@ services:
condition: service_healthy
network-service:
condition: service_started
- minio:
- condition: service_started
+ rustfs:
+ condition: service_healthy
+ rustfs-init:
+ condition: service_completed_successfully
casdoor:
condition: service_started
redis:
@@ -132,11 +149,11 @@ services:
- 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
- 'AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
- - 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
+ - 'S3_BUCKET=${RUSTFS_LOBE_BUCKET}'
- 'S3_ENABLE_PATH_STYLE=1'
- - 'S3_ACCESS_KEY=${MINIO_ROOT_USER}'
- - 'S3_ACCESS_KEY_ID=${MINIO_ROOT_USER}'
- - 'S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}'
+ - 'S3_ACCESS_KEY=${RUSTFS_ACCESS_KEY}'
+ - 'S3_ACCESS_KEY_ID=${RUSTFS_ACCESS_KEY}'
+ - 'S3_SECRET_ACCESS_KEY=${RUSTFS_SECRET_KEY}'
- 'LLM_VISION_IMAGE_USE_BASE64=1'
- 'S3_SET_ACL=0'
- 'SEARXNG_URL=http://searxng:8080'
@@ -174,13 +191,13 @@ services:
echo ''
fi
fi
- if [ $(wget --timeout=5 --spider --server-response ${S3_ENDPOINT}/minio/health/live 2>&1 | grep -c 'HTTP/1.1 200 OK') -eq 0 ]; then
- echo '⚠️Warning: Unable to fetch MinIO health status'
- echo 'Request URL: ${S3_ENDPOINT}/minio/health/live'
+ if [ $(wget --timeout=5 --spider --server-response ${S3_ENDPOINT}/health 2>&1 | grep -c 'HTTP/1.1 200 OK') -eq 0 ]; then
+ echo '⚠️Warning: Unable to fetch RustFS health status'
+ echo 'Request URL: ${S3_ENDPOINT}/health'
echo 'Read more at: https://lobehub.com/docs/self-hosting/server-database/docker-compose#necessary-configuration'
echo ''
- echo '⚠️注意:无法获取 MinIO 健康状态'
- echo '请求 URL: ${S3_ENDPOINT}/minio/health/live'
+ echo '⚠️注意:无法获取 RustFS 健康状态'
+ echo '请求 URL: ${S3_ENDPOINT}/health'
echo '了解更多:https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose#necessary-configuration'
echo ''
fi
@@ -272,6 +289,8 @@ volumes:
driver: local
redis_data:
driver: local
+ rustfs-data:
+ driver: local
networks:
lobe-network:
diff --git a/docker-compose/setup.sh b/docker-compose/setup.sh
index ad6e511e2e6..61fed0abd96 100644
--- a/docker-compose/setup.sh
+++ b/docker-compose/setup.sh
@@ -183,20 +183,50 @@ show_message() {
tips_already_installed)
case $LANGUAGE in
zh_CN)
- echo "检测到您已经运行过 LobeChat Database,本安装程序只能完成初始化配置,并不能重复安装。如果你需要重新安装,请删除 data 和 s3_data 文件夹。"
+ echo "检测到您已经运行过 LobeHub,本安装程序只能完成初始化配置,并不能重复安装。如果你需要重新安装,请删除 data 和 s3_data 文件夹。"
;;
*)
- echo "It is detected that you have run LobeChat Database. This installation program can only complete the initialization configuration and cannot be reinstalled. If you need to reinstall, please delete the data and s3_data folders."
+ echo "It is detected that you have run LobeHub. This installation program can only complete the initialization configuration and cannot be reinstalled. If you need to reinstall, please delete the data and s3_data folders."
;;
esac
;;
tips_run_command)
case $LANGUAGE in
zh_CN)
- echo "您已经完成了所有配置。请运行以下命令启动LobeChat:"
+ echo "您已经完成了所有配置。请运行以下命令启动 LobeHub 尝试启动:"
;;
*)
- echo "You have completed all configurations. Please run this command to start LobeChat:"
+ echo "You have completed all configurations. Please run this command to start LobeHub:"
+ ;;
+ esac
+ ;;
+ tips_if_want_searxng_logs)
+ case $LANGUAGE in
+ zh_CN)
+ echo "在上述命令中已屏蔽 SearXNG 的日志。如果你想查看 SearXNG 的日志,可以去除选项: --no-attach searxng 或运行以下命令:"
+ ;;
+ *)
+ echo "In the above command, the logs of SearXNG are blocked by default. If you want to view the logs of SearXNG, you can remove the option: --no-attach searxng or run the following command:"
+ ;;
+ esac
+ ;;
+ tips_if_run_normally)
+ case $LANGUAGE in
+ zh_CN)
+ echo "如果一切运行正常,你可以使用以下指令在 daemon 模式下启动 LobeHub:"
+ ;;
+ *)
+ echo "If everything runs normally, you can use the following command to start LobeHub in daemon mode:"
+ ;;
+ esac
+ ;;
+ tips_regen_jwks)
+ case $LANGUAGE in
+ zh_CN)
+ echo "在完成部署测试后,请前往 https://lobehub.com/zh/docs/self-hosting/environment-variables/auth#jwks_key 生成新的 JWKS_KEY 并替换 .env 中的值,以确保安全性。"
+ ;;
+ *)
+ echo "After completing the deployment test, please go to https://lobehub.com/docs/self-hosting/environment-variables/auth#jwks_key to generate a new JWKS_KEY and replace the value in .env to ensure security."
;;
esac
;;
@@ -308,7 +338,7 @@ show_message() {
case $LANGUAGE in
zh_CN)
echo "请选择部署模式:"
- echo "(0) 域名模式(访问时无需指明端口),需要使用反向代理服务 LobeChat, MinIO, Casdoor ,并分别分配一个域名;"
+ echo "(0) 域名模式(访问时无需指明端口),需要使用反向代理服务 LobeHub, RustFS, Casdoor ,并分别分配一个域名;"
echo "(1) 端口模式(访问时需要指明端口,如使用IP访问,或域名+端口访问),需要放开指定端口;"
echo "(2) 本地模式(仅供本地测试使用)"
echo "如果你对这些内容疑惑,可以先选择使用本地模式进行部署,稍后根据文档指引再进行修改。"
@@ -316,7 +346,7 @@ show_message() {
;;
*)
echo "Please select the deployment mode:"
- echo "(0) Domain mode (no need to specify the port when accessing), you need to use the reverse proxy service LobeChat, MinIO, Casdoor, and assign a domain name respectively;"
+ echo "(0) Domain mode (no need to specify the port when accessing), you need to use the reverse proxy service LobeHub, RustFS, Casdoor, and assign a domain name respectively;"
echo "(1) Port mode (need to specify the port when accessing, such as using IP access, or domain name + port access), you need to open the specified port;"
echo "(2) Local mode (for local testing only)"
echo "If you are confused about these contents, you can choose to deploy in local mode first, and then modify according to the document guide later."
@@ -369,7 +399,7 @@ show_message() {
# Function to download files
download_file() {
- wget --show-progress "$1" -O "$2"
+ wget "$1" -O "$2"
# If run failed, exit
if [ $? -ne 0 ]; then
show_message "tips_download_failed" "$2"
@@ -444,6 +474,7 @@ FILES=(
"$SUB_DIR/docker-compose.yml"
"$SUB_DIR/init_data.json"
"$SUB_DIR/searxng-settings.yml"
+ "$SUB_DIR/bucket.config.json"
)
ENV_EXAMPLES=(
"$SUB_DIR/.env.zh-CN.example"
@@ -452,9 +483,9 @@ ENV_EXAMPLES=(
# Default values
CASDOOR_PASSWORD="pswd123"
CASDOOR_SECRET="CASDOOR_SECRET"
-MINIO_ROOT_PASSWORD="YOUR_MINIO_PASSWORD"
+RUSTFS_SECRET_KEY="YOUR_RUSTFS_PASSWORD"
CASDOOR_HOST="localhost:8000"
-MINIO_HOST="localhost:9000"
+RUSTFS_HOST="localhost:9000"
PROTOCOL="http"
# If no language is specified, ask the user to choose
@@ -485,7 +516,7 @@ section_download_files(){
download_file "$SOURCE_URL/${FILES[0]}" "docker-compose.yml"
download_file "$SOURCE_URL/${FILES[1]}" "init_data.json"
download_file "$SOURCE_URL/${FILES[2]}" "searxng-settings.yml"
-
+ download_file "$SOURCE_URL/${FILES[3]}" "bucket.config.json"
# Download .env.example with the specified language
if [ "$LANGUAGE" = "zh_CN" ]; then
download_file "$SOURCE_URL/${ENV_EXAMPLES[0]}" ".env"
@@ -542,13 +573,13 @@ section_configurate_host() {
case $DEPLOY_MODE in
0)
DEPLOY_MODE="domain"
- echo "LobeChat" $(show_message "ask_domain" "example.com")
+ echo "LobeHub" $(show_message "ask_domain" "example.com")
ask "(example.com)"
LOBE_HOST="$ask_result"
- # If user use domain mode, ask for the domain of Minio and Casdoor
- echo "Minio S3 API" $(show_message "ask_domain" "minio.example.com")
- ask "(minio.example.com)"
- MINIO_HOST="$ask_result"
+ # If user use domain mode, ask for the domain of RustFS and Casdoor
+ echo "RustFS S3 API" $(show_message "ask_domain" "s3.example.com")
+ ask "(s3.example.com)"
+ RUSTFS_HOST="$ask_result"
echo "Casdoor API" $(show_message "ask_domain" "auth.example.com")
ask "(auth.example.com)"
CASDOOR_HOST="$ask_result"
@@ -557,13 +588,13 @@ section_configurate_host() {
;;
1)
DEPLOY_MODE="ip"
- ask $(printf "%s%s" "LobeChat" $(show_message "ask_host")) "$HOST" $(printf "%s" $(show_message "tips_auto_detected"))
+ ask $(printf "%s%s" "LobeHub" $(show_message "ask_host")) "$HOST" $(printf "%s" $(show_message "tips_auto_detected"))
LOBE_HOST="$ask_result"
# If user use ip mode, use ask_result as the host
HOST="$ask_result"
# If user use ip mode, append the port to the host
LOBE_HOST="${HOST}:3210"
- MINIO_HOST="${HOST}:9000"
+ RUSTFS_HOST="${HOST}:9000"
CASDOOR_HOST="${HOST}:8000"
# Setup callback url for Casdoor
sed "${SED_INPLACE_ARGS[@]}" "s/"localhost:3210"/${LOBE_HOST}/" init_data.json
@@ -577,12 +608,11 @@ section_configurate_host() {
# lobe host
sed "${SED_INPLACE_ARGS[@]}" "s#^APP_URL=.*#APP_URL=$PROTOCOL://$LOBE_HOST#" .env
# auth related
- sed "${SED_INPLACE_ARGS[@]}" "s#^AUTH_URL=.*#AUTH_URL=$PROTOCOL://$LOBE_HOST/api/auth#" .env
sed "${SED_INPLACE_ARGS[@]}" "s#^AUTH_CASDOOR_ISSUER=.*#AUTH_CASDOOR_ISSUER=$PROTOCOL://$CASDOOR_HOST#" .env
sed "${SED_INPLACE_ARGS[@]}" "s#^origin=.*#origin=$PROTOCOL://$CASDOOR_HOST#" .env
# s3 related
- sed "${SED_INPLACE_ARGS[@]}" "s#^S3_PUBLIC_DOMAIN=.*#S3_PUBLIC_DOMAIN=$PROTOCOL://$MINIO_HOST#" .env
- sed "${SED_INPLACE_ARGS[@]}" "s#^S3_ENDPOINT=.*#S3_ENDPOINT=$PROTOCOL://$MINIO_HOST#" .env
+ sed "${SED_INPLACE_ARGS[@]}" "s#^S3_PUBLIC_DOMAIN=.*#S3_PUBLIC_DOMAIN=$PROTOCOL://$RUSTFS_HOST#" .env
+ sed "${SED_INPLACE_ARGS[@]}" "s#^S3_ENDPOINT=.*#S3_ENDPOINT=$PROTOCOL://$RUSTFS_HOST#" .env
# Check if env modified success
@@ -665,16 +695,16 @@ section_regenerate_secrets() {
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_PASSWORD in \`init_data.json\`"
fi
fi
- # Generate Minio S3 User Password
- MINIO_ROOT_PASSWORD=$(generate_key 8)
+ # Generate RUSTFS S3 User Password
+ RUSTFS_SECRET_KEY=$(generate_key 8)
if [ $? -ne 0 ]; then
- echo $(show_message "security_secrect_regenerate_failed") "MINIO_ROOT_PASSWORD"
- MINIO_ROOT_PASSWORD="YOUR_MINIO_PASSWORD"
+ echo $(show_message "security_secrect_regenerate_failed") "RUSTFS_SECRET_KEY"
+ RUSTFS_SECRET_KEY="YOUR_RUSTFS_PASSWORD"
else
# Search and replace the value of S3_SECRET_ACCESS_KEY in .env
- sed "${SED_INPLACE_ARGS[@]}" "s#^MINIO_ROOT_PASSWORD=.*#MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}#" .env
+ sed "${SED_INPLACE_ARGS[@]}" "s#^RUSTFS_SECRET_KEY=.*#RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY}#" .env
if [ $? -ne 0 ]; then
- echo $(show_message "security_secrect_regenerate_failed") "MINIO_ROOT_PASSWORD in \`.env\`"
+ echo $(show_message "security_secrect_regenerate_failed") "RUSTFS_SECRET_KEY in \`.env\`"
fi
fi
}
@@ -730,22 +760,27 @@ section_display_configurated_report() {
# Display configuration reports
echo $(show_message "security_secrect_regenerate_report")
- echo -e "LobeChat: \n - URL: $PROTOCOL://$LOBE_HOST \n - Username: user \n - Password: ${CASDOOR_PASSWORD} "
+ echo -e "LobeHub: \n - URL: $PROTOCOL://$LOBE_HOST \n - Username: user \n - Password: ${CASDOOR_PASSWORD} "
echo -e "Casdoor: \n - URL: $PROTOCOL://$CASDOOR_HOST \n - Username: admin \n - Password: ${CASDOOR_PASSWORD}\n"
- echo -e "Minio: \n - URL: $PROTOCOL://$MINIO_HOST \n - Username: admin\n - Password: ${MINIO_ROOT_PASSWORD}\n"
+ echo -e "RustFS: \n - URL: $PROTOCOL://$RUSTFS_HOST \n - Username: admin\n - Password: ${RUSTFS_SECRET_KEY}\n"
# if user run in domain mode, diplay reverse proxy configuration
if [[ "$DEPLOY_MODE" == "domain" ]]; then
echo $(show_message "tips_add_reverse_proxy")
printf "\n%s\t->\t%s\n" "$LOBE_HOST" "127.0.0.1:3210"
printf "%s\t->\t%s\n" "$CASDOOR_HOST" "127.0.0.1:8000"
- printf "%s\t->\t%s\n" "$MINIO_HOST" "127.0.0.1:9000"
+ printf "%s\t->\t%s\n" "$RUSTFS_HOST" "127.0.0.1:9000"
fi
# Display final message
printf "\n%s\n\n" "$(show_message "tips_run_command")"
- print_centered "docker compose up -d" "green"
+ print_centered "docker compose up --no-attach searxng" "green"
+ printf "\n%s\n" "$(show_message "tips_if_run_normally")"
+ printf "\n%s\n\n" "$(show_message "tips_regen_jwks")"
+ print_centered "docker compose up -d --no-attach searxng" "green"
+ printf "\n%s\n" "$(show_message "tips_if_want_searxng_logs")"
+ print_centered "docker compose logs -f searxng" "white"
printf "\n%s\n" "$(show_message "tips_allow_ports")"
printf "\n%s" "$(show_message "tips_show_documentation")"
printf "%s\n" $(show_message "tips_show_documentation_url")