# casdoor **Repository Path**: guoxinweb/casdoor ## Basic Information - **Project Name**: casdoor - **Description**: A modern UI-first Identity and Access Management (IAM) / Single Sign-On (SSO) platform supporting OAuth 2.0, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, RADIUS, Google Workspace, Active Director - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2025-11-02 - **Last Updated**: 2026-09-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
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 · Discord

Release Docker Pulls Build Status golangci-lint Discord License

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.
## πŸš€ Try it in 30 seconds No database and no config file needed. This runs Casdoor on SQLite with sample data: ```bash docker run -p 8000:8000 casbin/casdoor-all-in-one ``` Open 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](https://demo.casdoor.com) | Full access, so you can click through everything. **All data resets about every 5 minutes.** | | **Read-only** | [door.casdoor.net](https://door.casdoor.net) | Stable global demo. **Every write operation fails by design.** | Both accept the same `built-in` / `admin` / `123` credentials. ## πŸ€” 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](https://casbin.org/) β€” 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. ## πŸ“¦ Installation Four supported paths, fastest first. All of them end up at . ### Docker β€” all-in-one (evaluation) ```bash 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](https://casdoor.ai/docs/basic/try-with-docker) ### Docker Compose β€” Casdoor with MySQL [`docker-compose.yml`](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`](conf/app.conf) to match the `db` service: ```ini 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`](conf/conf.go)). Then start everything: ```bash docker compose up ``` The compose entrypoint already passes `--createDatabase=true`, so the `casdoor` database is created for you. Guide: [Try with Docker](https://casdoor.ai/docs/basic/try-with-docker) ### Kubernetes β€” Helm Requires Helm v3 and a running cluster: ```bash helm install casdoor oci://registry-1.docker.io/casbin/casdoor-helm-charts ``` The chart does not expose Casdoor outside the cluster by default. To reach it, find the service and forward a port: ```bash kubectl get svc ``` ```bash kubectl port-forward svc/ 8000:8000 ``` For a real deployment, configure an Ingress and an external database through the chart's values. [`k8s.yaml`](k8s.yaml) in this repo is a minimal plain-manifest example if you would rather not use Helm. Guide: [Try with Helm](https://casdoor.ai/docs/basic/try-with-helm) ### From source β€” for development Use this if you intend to modify Casdoor. Prerequisites: **Go 1.25+** (see [`go.mod`](go.mod)), **Node.js 20 LTS**, **Yarn 1.x**, and a supported database (MySQL, PostgreSQL, SQLite, SQL Server and others). ```bash git clone https://github.com/casdoor/casdoor.git cd casdoor ``` Set `driverName`, `dataSourceName` and `dbName` in [`conf/app.conf`](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: ```bash cd web && yarn install && yarn build && cd .. && go run main.go ``` While working on the frontend, run `yarn start` in [`web/`](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](https://casdoor.ai/docs/basic/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](https://casdoor.ai/docs/how-to-connect/overview)** β€” create an Application in the console, copy its Client ID and Client Secret, and point your app's OAuth/OIDC client at Casdoor. 3. **[Add an identity provider](https://casdoor.ai/docs/provider/overview)** if you want Google, GitHub or Entra ID sign-in. 4. **[Pick an SDK](https://casdoor.ai/docs/category/integrations)** for your language, or call the [Public API](https://casdoor.ai/docs/basic/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 - **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](https://door.casdoor.net/swagger) - **Webhooks** β€” push user and sign-in events into your own systems - **Customizable UI** β€” theme the login page and console per organization ## 🧱 Technology stack Casdoor is a frontend–backend separated application: - **Backend** β€” Go with the [Beego](https://github.com/beego/beego) framework, exposing REST APIs ([repository root](https://github.com/casdoor/casdoor)) - **Frontend** β€” React 18 with [shadcn/ui](https://ui.shadcn.com/) on Tailwind CSS, built with Vite ([`web/`](web)). The previous Ant Design console is kept for reference at [`web-old/`](web-old) and is no longer built or served. - **Database** β€” MySQL, PostgreSQL, SQLite, SQL Server and others through [XORM](https://xorm.io/) - **Cache** β€” Redis, optional; needed if you run more than one Casdoor replica ## πŸ“– Documentation The full documentation lives at **[casdoor.ai/docs](https://casdoor.ai/docs/overview)**. Common starting points: | I want to… | Go to | |------------|-------| | Install Casdoor | [From source](https://casdoor.ai/docs/basic/server-installation) · [Docker](https://casdoor.ai/docs/basic/try-with-docker) · [Helm](https://casdoor.ai/docs/basic/try-with-helm) | | Connect my application | [How to connect to Casdoor](https://casdoor.ai/docs/how-to-connect/overview) | | Use the API | [Public API](https://casdoor.ai/docs/basic/public-api) · [Swagger UI](https://door.casdoor.net/swagger) | | Choose an SDK | [Integrations](https://casdoor.ai/docs/category/integrations) | | Deploy to production | [Deployment](https://casdoor.ai/docs/category/deployment) | ## πŸ”Œ SDKs and integrations Official SDKs and framework integrations, by language: - **Go** β€” [casdoor-go-sdk](https://github.com/casdoor/casdoor-go-sdk) - **Java** β€” [casdoor-java-sdk](https://github.com/casdoor/casdoor-java-sdk) · [Spring Boot starter](https://github.com/casdoor/casdoor-spring-boot-starter) - **Python** β€” [casdoor-python-sdk](https://github.com/casdoor/casdoor-python-sdk) - **Node.js** β€” [casdoor-nodejs-sdk](https://github.com/casdoor/casdoor-nodejs-sdk) - **JavaScript** β€” [casdoor-js-sdk](https://github.com/casdoor/casdoor-js-sdk) · [React](https://github.com/casdoor/casdoor-react-sdk) · [Vue](https://github.com/casdoor/casdoor-vue-sdk) · [Angular](https://github.com/casdoor/casdoor-angular-sdk) - **.NET** β€” [casdoor-dotnet-sdk](https://github.com/casdoor-net/casdoor-dotnet-sdk) - **PHP** β€” [casdoor-php-sdk](https://github.com/casdoor/casdoor-php-sdk) - **Rust** β€” [casdoor-rust-sdk](https://github.com/casdoor/casdoor-rust-sdk) The complete list, including reverse proxies and third-party applications, is in the [Integrations](https://casdoor.ai/docs/category/integrations) documentation. ## πŸ”’ Security **Please do not report security vulnerabilities in public GitHub issues.** Email instead β€” [SECURITY.md](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`](conf/app.conf) to your public URL. - Review [`conf/app.conf`](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 - **Discord** β€” [join the community](https://discord.gg/5rPsrAzK7S) for questions and help - **GitHub Discussions** β€” [ask and search here](https://github.com/casdoor/casdoor/discussions) - **GitHub Issues** β€” [bug reports and feature requests](https://github.com/casdoor/casdoor/issues) - **Commercial support** β€” [casdoor.ai/help](https://casdoor.ai/help) ## 🌍 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](https://casdoor.ai/docs/contributing/) before you start. **Translations.** User-facing strings in the web console go through [i18next](https://www.i18next.com/). When you add or change one under [`web/`](web), update the English catalog at [`web/src/locales/en/data.json`](web/src/locales/en/data.json). The other languages are translated on [Crowdin](https://crowdin.com/project/casdoor-site) and should not be edited by hand. ## ❀️ Sponsors Casdoor is free and open source. If it saves you time, consider supporting its development on [Open Collective](https://opencollective.com/casdoor). Sponsors on Open Collective Backers on Open Collective ## πŸ“„ License Casdoor is licensed under the [Apache License 2.0](LICENSE). ---
If Casdoor is useful to you, a star helps other people find it. GitHub Stars Β© 2026 Casdoor · Apache License 2.0