Overview

Full name
docker.io/lework/dify-sso
Registry
docker.io
Namespace
lework
Repository
dify-sso
Cached tags
3
Last synced
07/06/2026, 09:44 PM

Introduction

面向 Dify LLM 平台的 SSO 单点登录扩展服务镜像,对接企业 IdP(OAuth2/SAML 等),统一 Dify 控制台身份认证。

Details

dify-sso 为自托管 Dify 部署提供与企业身份源对接的能力,将登录流程从 Dify 内置账号体系扩展到 LDAP、OAuth2 或 SAML IdP。典型场景包括企业内网 Dify 私有化、与现有 IAM 体系统一账号。部署时需配置 Dify 实例地址、回调 URL 及 IdP 客户端凭据;服务本身为无状态 HTTP 组件,可与 Dify 主栈同网段通信。

快速启动

docker run -d --name dify-sso \
  -p 3001:3001 \
  -e DIFY_URL=http://dify-web:3000 \
  -e SSO_CLIENT_ID=your-client-id \
  -e SSO_CLIENT_SECRET=your-secret \
  docker.io/lework/dify-sso:latest

推荐实践

docker run -d --name dify-sso \
  --restart unless-stopped \
  -p 3001:3001 \
  -e DIFY_URL=https://dify.example.com \
  -e SSO_CLIENT_ID=your-client-id \
  -e SSO_CLIENT_SECRET=your-secret \
  -e SSO_CALLBACK_URL=https://dify.example.com/sso/callback \
  docker.io/lework/dify-sso:1.0.0

核心参数说明

  • -e DIFY_URL — Dify Web 控制台根地址
  • -e SSO_CLIENT_ID / -e SSO_CLIENT_SECRET — IdP 应用凭据
  • -e SSO_CALLBACK_URL — OAuth 回调地址,需在 IdP 白名单注册
  • -p 3001:3001 — SSO 服务 HTTP 端口
  • --restart unless-stopped — 认证组件自动恢复

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: dify-sso
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dify-sso
  template:
    metadata:
      labels:
        app: dify-sso
    spec:
      containers:
        - name: dify-sso
          image: docker.io/lework/dify-sso:1.0.0
          ports:
            - containerPort: 3001
          env:
            - name: DIFY_URL
              value: "http://dify-web:3000"
            - name: SSO_CLIENT_ID
              valueFrom:
                secretKeyRef:
                  name: dify-sso-secret
                  key: client-id
---
apiVersion: v1
kind: Service
metadata:
  name: dify-sso
spec:
  selector:
    app: dify-sso
  ports:
    - port: 3001
      targetPort: 3001

需按集群 Ingress、Secret 与 Dify 主栈 Service 名称调整环境变量与路由。

Latest tags (20)

View all 3 tags →
TagArchPushed AtSizeDigestSyncWishAction
docker.io/lework/dify-sso
:1.2.0
linux/amd64
2026/02/12 16:4048.4 MBsha256:c9a28872d8f5
docker.io/lework/dify-sso
:latest
linux/amd64
2026/02/12 16:4048.4 MBsha256:c9a28872d8f5
docker.io/lework/dify-sso
:1.1.0
linux/amd64
2025/10/23 13:0248.6 MBsha256:2bcf2810d087