Open WebUI | 应用集成
Open WebUI 单点登录
Open WebUI, the self-hosted chat interface for local and hosted models, can sign users in through any OpenID Connect provider. With Casdoor, your team signs in with their company account, and Casdoor groups decide which models and tools they see.
https://auth.example.com 请换成你的 Casdoor 地址(Casdoor 云上类似 https://acme.casdoor.com),其他 example.com 地址也换成你自己的。用 Casdoor 配置 Open WebUI
- 1
在 Casdoor 中注册 Open WebUI
在 Casdoor 控制台打开 应用,为 Open WebUI 添加一个应用,在它的 OIDC/OAuth 标签页复制 客户端ID 和 客户端密钥。把下面的地址加到 重定向URLs:
https://chat.example.com/oauth/oidc/callback
要用群组的话,先在应用所属的组织里创建群组(例如
engineeringorsupport)并加入用户,再在同一个标签页把 Token 中的群组格式 设成 Name,这样令牌里是engineering,而不是<组织>/engineering。 - 2
Set the OAuth environment variables
Add these to the Open WebUI container and restart it.
OPENID_PROVIDER_URLis Casdoor's discovery document.WEBUI_URL=https://chat.example.com ENABLE_OAUTH_SIGNUP=true DEFAULT_USER_ROLE=user OAUTH_PROVIDER_NAME=Casdoor OAUTH_CLIENT_ID=<client ID> OAUTH_CLIENT_SECRET=<client secret> OPENID_PROVIDER_URL=https://auth.example.com/.well-known/openid-configuration OAUTH_SCOPES=openid email profile ENABLE_OAUTH_GROUP_MANAGEMENT=true OAUTH_GROUP_CLAIM=groups - 3
Sign in
The login page now has a Continue with Casdoor button. With group management on, each sign-in syncs the user's Open WebUI groups with their Casdoor groups.
注意事项
- Open WebUI only adds users to groups that already exist in Open WebUI. Create them first, or set
ENABLE_OAUTH_GROUP_CREATION=trueto create them on sign-in. - By default, these environment variables are the source of truth and the OAuth section of the admin panel is read-only.
- Set
OAUTH_MERGE_ACCOUNTS_BY_EMAIL=trueif existing local users should keep their chats when they switch to Casdoor.
Open WebUI 的设置取自它的官方文档(核对于 2026年10月:Open WebUI SSO、Open WebUI SSO troubleshooting);另见Casdoor 文档。Open WebUI 是其所有者的商标。
常见问题
Who becomes an admin?
Users signing up through Casdoor get the role in DEFAULT_USER_ROLE. Left at its default, pending, an admin has to approve each new user; user lets them in straight away. Promote admins in the Open WebUI admin panel.
Can I restrict models by Casdoor group?
Yes. Once groups sync from Casdoor, give each Open WebUI group access to the models, knowledge bases and tools it should see.
更多应用集成
查看全部Argo CD
应用集成Connect Argo CD to Casdoor over OpenID Connect: oidc.config in argocd-cm, the client secret, PKCE, CLI login and RBAC from Casdoor groups.
Gitea
应用集成Add Casdoor to Gitea as an OpenID Connect authentication source: the add-oauth command, callback URL, and admins from a Casdoor group.
GitLab
应用集成Configure self-managed GitLab to sign users in with Casdoor over OpenID Connect: gitlab.rb provider settings, account creation and group-based admins.
