Closed BravoDD44 closed 1 week ago
👀 @BravoDD44
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
📦 Deployment environment
Docker
Knowledge base version
Other Linux
Edge
In the official documentation, after using Docker to deploy the server database version. https://lobehub.com/zh/docs/self-hosting/server-database/docker After opening ip:3210 on the browser, click the knowledge base button, and a page of not logged in and an error will pop up.
In the official documentation, after using Docker to deploy the server database version. https://lobehub.com/zh/docs/self-hosting/server-database/docker After opening ip:3210 on the browser, click the knowledge base button, and a not logged in page will pop up with an error. The environment variables are as follows:
APP_URL=http://xxxxx:3210
KEY_VAULTS_SECRET='xxxxx'
DATABASE_URL=postgres://postgres:mysecretpassword@postgres:5432/postgres
NEXT_AUTH_SECRET='xxxx' NEXT_AUTH_SSO_PROVIDERS=auth0 NEXTAUTH_URL=http://8.153.105.15:3210/api/auth AUTH_AUTH0_ID=pM6nFvpSZ1wkEd2JHY43t3K0KAHGC2Fp AUTH_AUTH0_SECRET=Z36_gxIBjjTO11LcXnGgTgSzje8puG_p6ou641lJ82wnkGjRmtLtySmj8gs0ZIiS AUTH_AUTH0_ISSUER=dev-bkdrqeyrpygny8qc.us.auth0.com
S3_ACCESS_KEY_ID=xxxx S3_SECRET_ACCESS_KEY=xxxxx
S3_ENDPOINT=xxxx S3_BUCKET=xxx S3_REGION=xxxxx # If you need to specify the region S3_PUBLIC_DOMAIN=xxxx
OPENAI_API_KEY='xxxx' OPENAI_PROXY_URL=xxxx
PROXY_URL=http://127.0.0.1:18081
It is expected that you can log in normally and implement new functions of the knowledge base
No response
Hello, @BravoDD44! I'm here to help you with any bugs, questions, or contributions you may have. Let's tackle this issue together!
The login error you're experiencing when accessing the knowledge base after deploying the server database version using Docker is likely due to the authentication setup. Here are some relevant discussions and solutions:
Authentication Service Limitation: The official documentation notes that you cannot use Clerk as an authentication service when deploying LobeChat using Docker or Docker Compose due to the inability to expose NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
using Docker environment variables. If you're using Clerk, consider switching to another authentication provider or deployment method, such as Vercel, or building your own Docker image [1].
Alternative Authentication Setup: The documentation suggests using Casdoor as a local authentication service when deploying with Docker Compose. Ensure that Casdoor is configured correctly according to the instructions provided in the documentation [1].
Similar Issues: There are similar discussions about login issues and Docker deployments:
Make sure your environment variables and authentication settings are correctly configured. If you're using Auth0, verify that the callback URLs and other settings are correctly set up in your Auth0 dashboard.
To continue talking to Dosu, mention @dosu.
我使用的auth0验证方法。设置的Allowed Callback URLs是http(s)://(ip 地址):3210/api/auth/callback/auth0
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I am using auth0 authentication method. The set Allowed Callback URLs are http(s)://(ip address):3210/api/auth/callback/auth0
AUTH_AUTH0_ISSUER=https://dev-bkdrqeyrpygny8qc.us.auth0.com
加上https试试
PROXY_URL=http://127.0.0.1:18081/
这个应该不用设置吧
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
AUTH_AUTH0_ISSUER=https://dev-bkdrqeyrpygny8qc.us.auth0.com
Try adding httpsPROXY_URL=http://127.0.0.1:18081/
There should be no need to set this.
加上https后依旧会报错。 页面报错
跳转如下页面
最新的环境变量配置如下
APP_URL=http://xxxx:3210
KEY_VAULTS_SECRET=w/CwFP1d0u4cdM/fjqFzqIz30aw+Omfd2PErVpYrbn0=
DATABASE_URL=postgres://postgres:mysecretpassword@postgres:5432/postgres
NEXT_AUTH_SECRET=QV5yLLYWaYiH/ZheWIMfGTRe74j+LiVyHybLYF/3v+0= NEXT_AUTH_SSO_PROVIDERS=auth0 NEXTAUTH_URL=http://8.153.105.15:3210/api/auth AUTH_AUTH0_ID=xxxxx AUTH_AUTH0_SECRET=xxxx AUTH_AUTH0_ISSUER=https://dev-bkdrqeyrpygny8qc.us.auth0.com
S3_ACCESS_KEY_ID=xxx S3_SECRET_ACCESS_KEY=xxx
S3_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com S3_BUCKET=lobe-file S3_REGION=cn-shanghai # 如果需要指定地域 S3_PUBLIC_DOMAIN=https://lobe-file.oss-cn-shanghai.aliyuncs.com
OPENAI_API_KEY=xxxx OPENAI_PROXY_URL=xxxx
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
After adding https, the error will still be reported. Page error
Jump to the following page
The latest environment variable configuration is as follows
APP_URL=http://xxxx:3210
KEY_VAULTS_SECRET=w/CwFP1d0u4cdM/fjqFzqIz30aw+Omfd2PErVpYrbn0=
DATABASE_URL=postgres://postgres:mysecretpassword@postgres:5432/postgres
NEXT_AUTH_SECRET=QV5yLLYWaYiH/ZheWIMfGTRe74j+LiVyHybLYF/3v+0= NEXT_AUTH_SSO_PROVIDERS=auth0 NEXTAUTH_URL=http://8.153.105.15:3210/api/auth AUTH_AUTH0_ID=xxxxx AUTH_AUTH0_SECRET=xxxx AUTH_AUTH0_ISSUER=https://dev-bkdrqeyrpygny8qc.us.auth0.com
S3_ACCESS_KEY_ID=xxx S3_SECRET_ACCESS_KEY=xxx
S3_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com S3_BUCKET=lobe-file S3_REGION=cn-shanghai # If you need to specify the region S3_PUBLIC_DOMAIN=https://lobe-file.oss-cn-shanghai.aliyuncs.com
OPENAI_API_KEY=xxxx OPENAI_PROXY_URL=xxxx
加上https后依旧会报错。 页面报错 跳转如下页面
最新的环境变量配置如下
网站域名
APP_URL=http://xxxx:3210
DB 必须的环境变量
用于加密敏感信息的密钥,可以使用 openssl rand -base64 32 生成
KEY_VAULTS_SECRET=w/CwFP1d0u4cdM/fjqFzqIz30aw+Omfd2PErVpYrbn0=
Postgres 数据库连接字符串
格式:postgres://username:password@host:port/dbname,如果你的 pg 实例为 Docker 容器,请使用容器名
DATABASE_URL=postgres://postgres:mysecretpassword@postgres:5432/postgres
NEXT_AUTH 相关,可以使用 auth0、Azure AD、GitHub、Authentik、zitadel 等,如有其他接入诉求欢迎提 PR
NEXT_AUTH_SECRET=QV5yLLYWaYiH/ZheWIMfGTRe74j+LiVyHybLYF/3v+0= NEXT_AUTH_SSO_PROVIDERS=auth0 NEXTAUTH_URL=http://8.153.105.15:3210/api/auth AUTH_AUTH0_ID=xxxxx AUTH_AUTH0_SECRET=xxxx AUTH_AUTH0_ISSUER=https://dev-bkdrqeyrpygny8qc.us.auth0.com
S3 相关
S3_ACCESS_KEY_ID=xxx S3_SECRET_ACCESS_KEY=xxx
用于 S3 API 访问的域名
S3_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com S3_BUCKET=lobe-file S3_REGION=cn-shanghai # 如果需要指定地域 S3_PUBLIC_DOMAIN=https://lobe-file.oss-cn-shanghai.aliyuncs.com
OPENAI_API_KEY=xxxx OPENAI_PROXY_URL=xxxx
页面报错显示callback url有问题
http://xxxx:3210/api/auth/callback/auth0
callback url 填的是这个吗?
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
http://xxxx:3210/api/auth/callback/auth0
Is this the callback url you filled in?
📦 部署环境
Docker
📌 软件版本
知识库版本
💻 系统环境
Other Linux
🌐 浏览器
Edge
🐛 问题描述
在官方文档中,进行使用 Docker 部署服务端数据库版后。https://lobehub.com/zh/docs/self-hosting/server-database/docker 在浏览器端打开ip:3210后,点击知识库按钮,弹出未登录,页面报错。
📷 复现步骤
在官方文档中,进行使用 Docker 部署服务端数据库版后。https://lobehub.com/zh/docs/self-hosting/server-database/docker 在浏览器端打开ip:3210后,点击知识库按钮,弹出未登录,页面报错。 环境变量如下:
网站域名
APP_URL=http://xxxxx:3210
DB 必须的环境变量
用于加密敏感信息的密钥,可以使用 openssl rand -base64 32 生成
KEY_VAULTS_SECRET='xxxxx'
Postgres 数据库连接字符串
格式:postgres://username:password@host:port/dbname,如果你的 pg 实例为 Docker 容器,请使用容器名
DATABASE_URL=postgres://postgres:mysecretpassword@postgres:5432/postgres
NEXT_AUTH 相关,可以使用 auth0、Azure AD、GitHub、Authentik、zitadel 等,如有其他接入诉求欢迎提 PR
NEXT_AUTH_SECRET='xxxx' NEXT_AUTH_SSO_PROVIDERS=auth0 NEXTAUTH_URL=http://8.153.105.15:3210/api/auth AUTH_AUTH0_ID=xxx AUTH_AUTH0_SECRET=xxxx AUTH_AUTH0_ISSUER=dev-bkdrqeyrpygny8qc.us.auth0.com
S3 相关
S3_ACCESS_KEY_ID=xxxx S3_SECRET_ACCESS_KEY=xxxxx
用于 S3 API 访问的域名
S3_ENDPOINT=xxxx S3_BUCKET=xxx S3_REGION=xxxxx # 如果需要指定地域 S3_PUBLIC_DOMAIN=xxxx
OPENAI_API_KEY='xxxx' OPENAI_PROXY_URL=xxxx
PROXY_URL=http://127.0.0.1:18081
🚦 期望结果
期望可以正常登录,并实现知识库新功能
📝 补充信息
No response