No description
  • Go 62.9%
  • TypeScript 36.2%
  • CSS 0.4%
  • HTML 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
ymnuk 40b34b7c23
All checks were successful
ci/woodpecker/tag/build Pipeline was successful
feat: перевод новых ключей v4.26-v4.27 (752 строки)
- новые namespace: edition, enterprise, pam, radiusClient
- новые строки в application, organization, home, system, server и др.
2026-11-12 19:08:13 +03:00
.github feat: upgrade Go toolchain to 1.26.10 (#5978) 2026-10-26 12:54:42 +08:00
.vscode fix: add vscode local debugging support (#2585) 2024-01-07 09:26:33 +08:00
.well-known feat: add .well-known metadata file 2026-10-06 19:42:03 +08:00
.woodpecker Исправление woodpecker для синхронизации 2026-04-09 21:09:27 +03:00
action feat: let a Marketplace action verify the certificates of certificate login 2026-11-10 16:17:33 +08:00
audit feat: add Chinese SM algorithms, three-admin separation, tamper-proof records, field encryption, separation of duties and the compliance page for the enterprise edition 2026-11-10 12:06:05 +08:00
authz feat: add an organization endpoint to the built-in MCP server for OAuth discovery 2026-11-11 09:45:31 +08:00
captcha feat: add ALTCHA captcha provider 2026-11-10 17:07:22 +08:00
certificate fix: fix function names in comment to match actual functions (#5440) 2026-04-24 20:39:42 +08:00
conf feat: leave the higher edition offers out of the console of an on-premise license 2026-11-10 21:37:51 +08:00
controllers merge: синхронизация с upstream/master (v4.25.0 → v4.27.1) 2026-11-12 18:02:33 +03:00
cred feat: add Chinese SM algorithms, three-admin separation, tamper-proof records, field encryption, separation of duties and the compliance page for the enterprise edition 2026-11-10 12:06:05 +08:00
deployment fix: stop get-cert API from returning the admin cert of the same name 2026-10-21 00:24:48 +08:00
edition feat: add SCIM and legacy database provisioning and application import 2026-11-11 09:15:09 +08:00
email feat: add Microsoft 365 email provider that signs in to SMTP with OAuth 2026-11-10 15:33:28 +08:00
faceId feat: add local uniface face id support (#5588) 2026-06-17 22:09:07 +08:00
form feat: add UKey and certificate login for the enterprise edition 2026-11-10 16:17:31 +08:00
gm feat: add Chinese SM algorithms, three-admin separation, tamper-proof records, field encryption, separation of duties and the compliance page for the enterprise edition 2026-11-10 12:06:05 +08:00
hsm feat: add PKCS #11 hardware security module support for token signing keys in the enterprise edition 2026-11-10 16:17:30 +08:00
i18n merge: синхронизация с upstream/master (v4.25.0 → v4.27.1) 2026-11-12 18:02:33 +03:00
idp fix: let PayPal OAuth providers sign in against the live or sandbox environment (#6042) 2026-11-06 01:04:16 +08:00
idv feat: add Alibaba Cloud ID verification provider (#4645) 2025-12-08 17:48:52 +08:00
ip feat: add Site and Rule to Casdoor (#5194) 2026-03-06 01:02:16 +08:00
ldap fix: keep LIKE metacharacters literal in LDAP substring filters (#6056) 2026-11-10 16:40:47 +08:00
log fix: add client IP and UA to entry 2026-04-05 02:08:45 +08:00
manifests feat: add initAdminPassword to Helm and docker-compose 2026-11-03 01:34:26 +08:00
mcp fix: block cross-tenant LDAP, cert, order and intranet access abuse 2026-09-28 00:21:33 +08:00
mcpself feat: add an organization endpoint to the built-in MCP server for OAuth discovery 2026-11-11 09:45:31 +08:00
notification fix: block captcha bypass, DCR token abuse, tenant SSRF and balance races 2026-09-27 17:39:45 +08:00
object merge: синхронизация с upstream/master (v4.25.0 → v4.27.1) 2026-11-12 18:02:33 +03:00
pp fix: send a valid price quantity range when creating Paddle transactions 2026-11-05 10:01:20 +08:00
proxy fix: check link request origin, verify proxy TLS and group removal rule 2026-09-28 02:05:59 +08:00
radius fix: improve RADIUS accounting handling 2026-11-11 01:11:40 +08:00
routers fix: return the organization issuer in authorization responses of shared URL clients 2026-11-11 09:47:15 +08:00
rule fix: keep all blocked IPs of an IP rate limiting rule and guard its state with a lock 2026-10-30 01:14:49 +08:00
scan fix: block cross-tenant LDAP, cert, order and intranet access abuse 2026-09-28 00:21:33 +08:00
scim fix: report SCIM filtering as supported in the service provider config 2026-10-26 21:23:46 +08:00
service fix: resolve a site's application by organization 2026-10-31 23:32:22 +08:00
storage fix: improve path handling in LocalFileSystemProvider 2026-05-11 21:44:45 +08:00
swagger fix: remove the run-casbin-command and refresh-engines APIs 2026-10-04 20:40:50 +08:00
sync feat: drop legacy // +build comment (#4582) 2025-11-25 20:21:09 +08:00
sync_v2 feat: drop legacy // +build comment (#4582) 2025-11-25 20:21:09 +08:00
tlsserver feat: add UKey and certificate login for the enterprise edition 2026-11-10 16:17:31 +08:00
tracing feat: tell which edition a feature needs with an upgrade link and allow RBAC, ABAC and more syncers from the commercial edition 2026-11-10 00:14:14 +08:00
upgrade feat: keep the paid features of the versions released before a license expires 2026-11-11 01:54:38 +08:00
util fix: read the release time from the git checkout when the build does not record it 2026-11-11 02:06:13 +08:00
web feat: перевод новых ключей v4.26-v4.27 (752 строки) 2026-11-12 19:08:13 +03:00
web-old feat: permanently delete a soft-deleted user when deleting it again 2026-10-07 19:27:35 +08:00
xlsx fix: report the real reason when uploading users fails 2026-09-09 20:43:20 +08:00
.dockerignore feat: support semantic release (#244) 2021-08-14 14:23:30 +08:00
.gitattributes feat: change CRLF to LF for some files 2025-06-24 09:55:00 +08:00
.gitignore chore(helm): move casdoor-helm chart into this repo and inject its version at release time 2026-09-03 22:21:05 +08:00
.golangci.yml feat: upgrade Go toolchain to 1.25.8 (#5328) 2026-03-26 00:51:27 +08:00
.goreleaser.yaml feat: report the environment of a licensed instance and let the license server ask it to upgrade 2026-11-10 23:08:11 +08:00
build.sh feat: add back arm64 support in Docker image (#2969) 2024-05-26 01:22:49 +08:00
CLAUDE.md refactor: remove Web3 (MetaMask and Web3-Onboard) providers 2026-09-25 20:16:49 +08:00
docker-compose.yml feat: add initAdminPassword to Helm and docker-compose 2026-11-03 01:34:26 +08:00
docker-entrypoint.sh fix: set busy_timeout and WAL in the default SQLite data source 2026-10-21 00:24:46 +08:00
Dockerfile feat: upgrade Go toolchain to 1.26.10 (#5978) 2026-10-26 12:54:42 +08:00
Dockerfile.standard update: Golang 1.27.4 2026-11-12 17:59:28 +03:00
go.mod feat: add ALTCHA captcha provider 2026-11-10 17:07:22 +08:00
go.sum feat: add ALTCHA captcha provider 2026-11-10 17:07:22 +08:00
init_data.json.template merge: синхронизация с upstream/master (v3.18.0 → v4.25.0) 2026-11-03 20:30:14 +03:00
k8s.yaml fix: add k8s deployments example (#446) 2022-01-28 09:25:25 +08:00
LICENSE Initial commit 2020-10-20 21:21:47 +08:00
main.go feat: add SCIM and legacy database provisioning and application import 2026-11-11 09:15:09 +08:00
Makefile feat: upgrade Go toolchain to 1.26.10 (#5978) 2026-10-26 12:54:42 +08:00
README.md docs: point commercial support to the enterprise page 2026-11-01 02:22:56 +08:00
README_MODIFY.md Сообщение о тотм что это по факту fork 2026-04-09 20:03:16 +03:00
SECURITY.md docs: reject AI-generated security reports and automated scans 2026-11-09 16:33:40 +08:00
SYNC.md Добавление инструкции по синхронизации 2026-04-09 20:15:18 +03:00

Casdoor

An open-source, self-hosted identity and access management platform

Casdoor is a single sign-on (SSO) and authentication server with a web console.
It speaks OAuth 2.0, OIDC, SAML 2.0, CAS, LDAP, SCIM 2.0, WebAuthn, TOTP/MFA and MCP,
and connects to Google Workspace, Microsoft Entra ID (Azure AD), GitHub and many other identity providers.

Website · Documentation · Live demo · Casdoor Cloud · Discord

Release Docker Pulls Build Status golangci-lint OpenSSF Best Practices Discord License

casdoor%2Fcasdoor | Trendshift

Casdoor sign-in page with password, code, WebAuthn and Face ID tabs and social login icons

The sign-in page your users see: password, email/SMS code, WebAuthn and Face ID, plus every social provider you enable.

Casdoor admin console dashboard with user, application and provider statistics Admin console. Users, tokens, organizations and providers at a glance. Casdoor applications list showing several applications with their organizations and providers Applications. Every app that delegates login to Casdoor, across all organizations. Casdoor application settings, Providers tab, with per-provider signup, signin and unlink toggles Application settings. OAuth, SAML, providers and branding — no redeploy, no config file.

❤️ Sponsors

Want to appear here?

🚀 Try it in 30 seconds

No database and no config file needed. This runs Casdoor on SQLite with sample data:

docker run -p 8000:8000 casbin/casdoor-all-in-one

Open http://localhost:8000 and sign in:

Field Value
Organization built-in
Username admin
Password 123

The sign-in form has separate organization and username fields. Docs sometimes write this pair as built-in/admin — that is the same thing, not a username containing a slash.

Prefer not to install anything? Use the hosted demos:

Demo URL Notes
Writable demo.casdoor.com Full access, so you can click through everything. All data resets about every 5 minutes.
Read-only door.casdoor.com Stable global demo. Every write operation fails by design.

Both accept the same built-in / admin / 123 credentials.

Want it hosted for production instead? Casdoor Cloud runs a dedicated Casdoor instance and database for you, kept up to date by the Casdoor team. It is the same open-source Casdoor, so you can move between Cloud and self-hosting at any time. New accounts get $20 in free credit to try it, so you can start a free trial without talking to anyone.

🤔 Why Casdoor

Casdoor is a complete identity provider, not an authentication proxy and not a library you embed. It stores your users, issues the tokens, and gives you an admin console to manage all of it — so your applications can delegate login entirely and never handle a password themselves.

  • One server, many protocols. The same user directory is reachable over OAuth 2.0, OIDC, SAML 2.0, CAS, LDAP and SCIM, so a modern SPA and a legacy CAS-only app can share one set of accounts.
  • Everything is editable in the UI. Organizations, applications, providers, sign-in methods, email and SMS templates, and login-page branding are configured in the web console instead of in files you have to redeploy.
  • Policy-based authorization built in. Access rules are expressed with Casbin — ACL, RBAC, ABAC and custom models — rather than a fixed permission scheme.
  • Straightforward to self-host. A single Go binary plus a database. No JVM, no operator, no cluster required.

If all you need is a login screen in front of an existing reverse proxy, a smaller tool may suit you better. Casdoor is for when you want to own the user directory itself.

Coming from another product? See how Casdoor compares with Keycloak, Auth0, Okta and others.

📦 Installation

Four supported paths, fastest first. All of them end up at http://localhost:8000.

Rather not run the server, database and upgrades yourself? Casdoor Cloud gives you a dedicated Casdoor instance in the region you choose, with flat monthly pricing and no per-user fees.

Docker — all-in-one (evaluation)

docker run -p 8000:8000 casbin/casdoor-all-in-one

Bundles SQLite and demo data into a single container. Ideal for a first look, but not intended for production: the data lives inside the container and disappears with it.

Guide: Try with Docker

Docker Compose — Casdoor with MySQL

docker-compose.yml starts Casdoor next to a MySQL 8 container.

Two things to know before running it:

  1. Compose builds the image from source (Go backend plus React frontend). The first docker compose up takes several minutes, so it is not the quick-trial path — use the all-in-one image above for that.
  2. You have to point Casdoor at the bundled database first.

Set the MySQL settings in conf/app.conf to match the db service:

driverName = mysql
dataSourceName = root:123456@tcp(localhost:3306)/
dbName = casdoor

Use localhost here even though MySQL runs in a separate container: the compose file sets RUNNING_IN_DOCKER=true, and Casdoor rewrites localhost to the Docker host address at startup (see conf/conf.go). Then start everything:

docker compose up

The compose entrypoint already passes --createDatabase=true, so the casdoor database is created for you.

Guide: Try with Docker

Kubernetes — Helm

Requires Helm v3 and a running cluster:

helm install casdoor oci://ghcr.io/casdoor/helm-charts/casdoor

The chart does not expose Casdoor outside the cluster by default. To reach it, find the service and forward a port:

kubectl get svc
kubectl port-forward svc/<service-name-from-above> 8000:8000

For a real deployment, configure an Ingress and an external database through the chart's values. k8s.yaml in this repo is a minimal plain-manifest example if you would rather not use Helm.

Guide: Try with Helm · Chart on Artifact Hub

Configuration as code

Organizations, applications, users, providers, roles and permissions can be kept in Git instead of being clicked together in the UI:

  • Init data file: Casdoor applies a JSON or YAML file at startup, and with initDataMerge = true and initDataWatchInterval = 30 it applies every change to the file again without a restart, only touching the fields the file sets. The Helm chart exposes it as initData in its values (chart README). Guide: Data initialization
  • Terraform: the official Terraform provider manages the same objects through the API, with plan, import and drift detection.

From source — for development

Use this if you intend to modify Casdoor. Prerequisites: Go 1.26+ (see go.mod), Node.js 20 LTS, Yarn 1.x, and a supported database (MySQL, PostgreSQL, SQLite, SQL Server and others).

git clone https://github.com/casdoor/casdoor.git
cd casdoor

Set driverName, dataSourceName and dbName in conf/app.conf. For MySQL, create the casdoor database first, or start the server with --createDatabase=true. Then build the frontend and run the server:

cd web && yarn install && yarn build && cd .. && go run main.go

While working on the frontend, run yarn start in web/ instead of yarn build to get hot reload on port 7001, with go run main.go serving the API from a second terminal.

Guide: Server installation

👉 After you sign in

At this point you have a running identity provider with nothing connected to it yet. Next:

  1. Change the admin password. 123 is a demo credential and must not survive contact with production.
  2. Connect your first application — create an Application in the console, copy its Client ID and Client Secret, and point your app's OAuth/OIDC client at Casdoor. For Grafana, GitLab, Nextcloud and other popular apps, open Marketplace in the console instead: one click creates the application, and the setup guide shows the app's settings with your values filled in.
  3. Add an identity provider if you want Google, GitHub or Entra ID sign-in.
  4. Pick an SDK for your language, or call the Public API directly.

✨ Features

🔐 Authentication

  • OAuth 2.0 / OIDC — full authorization server and OpenID Connect provider
  • SAML 2.0 — enterprise SSO, as both IdP and SP
  • CAS — Central Authentication Service for legacy applications
  • LDAP — sync from a directory, or serve as one
  • WebAuthn / passkeys — passwordless sign-in
  • TOTP / MFA — multi-factor authentication, including email and SMS codes
  • Casdoor Authenticator — open-source TOTP app for Android and iOS that syncs your MFA accounts with Casdoor (source)
  • Face ID — biometric sign-in

🏢 Organizations and access control

  • Multi-tenancy — independent organizations, each with its own users and branding
  • RBAC and beyond — roles, permissions and Casbin policy models
  • SCIM 2.0 — automated user provisioning and de-provisioning
  • Social login — Google, GitHub, Entra ID (Azure AD) and many more
  • Custom providers — plug in your own identity, email, SMS, storage or payment backends
  • Audit logs — a record of sign-ins and administrative changes

🤖 AI and agents

  • MCP gateway — expose Model Context Protocol servers and control access to them
  • A2A — agent-to-agent communication support

🛠️ Developer experience

  • REST API — every console action is also an API call
  • SDKs — Go, Java, Python, Node.js, .NET, PHP, Rust and more
  • Swagger UI — live API explorer
  • Webhooks — push user and sign-in events into your own systems
  • Customizable UI — theme the login page and console per organization

🧩 Marketplace

Install ready-made integrations from the Marketplace page of the console. Casdoor creates the objects with your values filled in, and uninstalling removes them or restores what was there before. Browse them at marketplace.casdoor.com; contributions go to casdoor-integrations.

  • App integrations — single sign-on for Grafana, GitLab, Nextcloud, Vaultwarden, Argo CD, Immich, Open WebUI, Portainer, Gitea and Proxmox VE, with a step-by-step guide for the app's side
  • Identity provider templates — sign in to Casdoor with Keycloak, authentik, ZITADEL, Authelia or GitLab Self-Managed
  • Sign-in themes — login page designs you can preview on your own application before installing

🧱 Technology stack

Casdoor is a frontend–backend separated application:

  • Backend — Go with the Beego framework, exposing REST APIs (repository root)
  • Frontend — React 18 with shadcn/ui on Tailwind CSS, built with Vite (web/). The previous Ant Design console is kept for reference at web-old/ and is no longer built or served.
  • Database — MySQL, PostgreSQL, SQLite, SQL Server and others through XORM
  • Cache — Redis, optional; needed if you run more than one Casdoor replica

📖 Documentation

The full documentation lives at casdoor.ai/docs. Common starting points:

I want to… Go to
Install Casdoor From source · Docker · Helm
Connect my application How to connect to Casdoor
Use the API Public API · Swagger UI
Choose an SDK Integrations
Deploy to production Deployment
Upgrade from v3 to v4 Upgrading from v3 to v4

🔌 SDKs and integrations

Official SDKs and framework integrations, by language:

The complete list, including reverse proxies and third-party applications, is in the Integrations documentation. Self-hosted apps with a one-click setup are on the Casdoor Marketplace.

🔒 Security

Please do not report security vulnerabilities in public GitHub issues. Email admin@casdoor.org instead — SECURITY.md has the full policy and disclosure process.

Before exposing a Casdoor instance to the internet:

  • Change the built-in admin password. Never ship the demo credential 123.
  • Serve Casdoor over HTTPS only, and set origin in conf/app.conf to your public URL.
  • Review conf/app.conf for values inherited from the sample file, especially dataSourceName and any provider secrets.
  • Set runmode = prod and keep showSql = false in production.

🤝 Community and support

🌍 Contributing

Contributions are welcome. For anything larger than a small fix, please open an issue first so you can agree on the approach with the maintainers before writing code.

Read the contribution guidelines before you start.

Translations. User-facing strings in the web console go through i18next. When you add or change one under web/, update the English catalog at web/src/locales/en/data.json. The other languages are translated on Crowdin and should not be edited by hand.

🙌 Support Casdoor

Casdoor is free and open source. If it saves you time, consider supporting its development on Open Collective. Choosing Casdoor Cloud for hosting also funds the project directly.

Sponsors on Open Collective

Backers on Open Collective

📄 License

Casdoor is licensed under the Apache License 2.0.


If Casdoor is useful to you, a star helps other people find it.

GitHub Stars

© 2026 Casdoor · Apache License 2.0