An open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML
An open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML
No database and no config file needed. This runs Casdoor on SQLite with sample data:
docker run -p 8000:8000 casbin/casdoor-all-in-oneOpen 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.net | Stable global demo. Every write operation fails by design. |
Both accept the same built-in / admin / 123 credentials.
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.
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.
Four supported paths, fastest first. All of them end up at http://localhost:8000.
docker run -p 8000:8000 casbin/casdoor-all-in-oneBundles 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.yml starts Casdoor next to a MySQL 8 container.
Two things to know before running it:
- Compose builds the image from source (Go backend plus React frontend). The first
docker compose uptakes several minutes, so it is not the quick-trial path — use the all-in-one image above for that.- 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 = casdoorUse 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 upThe compose entrypoint already passes --createDatabase=true, so the casdoor database is created for you.
Guide: Try with Docker
Requires Helm v3 and a running cluster:
helm install casdoor oci://registry-1.docker.io/casbin/casdoor-helm-chartsThe chart does not expose Casdoor outside the cluster by default. To reach it, find the service and forward a port:
kubectl get svckubectl port-forward svc/<service-name-from-above> 8000:8000For 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
Use this if you intend to modify Casdoor. Prerequisites: Go 1.25+ (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 casdoorSet 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.goWhile 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
At this point you have a running identity provider with nothing connected to it yet. Next:
admin password. 123 is a demo credential and must not survive contact with production.🔐 Authentication
🏢 Organizations and access control
🤖 AI and agents
🛠️ Developer experience
Casdoor is a frontend–backend separated application:
web/). The previous Ant Design console is kept for reference at web-old/ and is no longer built or served.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 |
Official SDKs and framework integrations, by language:
The complete list, including reverse proxies and third-party applications, is in the Integrations documentation.
Please do not report security vulnerabilities in public GitHub issues. Email [email protected] instead — SECURITY.md has the full policy and disclosure process.
Before exposing a Casdoor instance to the internet:
admin password. Never ship the demo credential 123.origin in conf/app.conf to your public URL.conf/app.conf for values inherited from the sample file, especially dataSourceName and any provider secrets.runmode = prod and keep showSql = false in production.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 guide
File session provider creates one file per cookieless API request and never cleans them up; fills disk/inodes (root cause of #5186)
Optional AgentCert / agent-trust verification for agent authZ — fit?
Add organization-level exclusive signin for SSO
[feature] support penetration test for LLM agents
Support global browser session limits for SSO
[docs] sync the recent project updates to the docs site
[ui] support UI like this
Support Casdoor's development by donating on Open Collective
[Feature] Make CORS `Access-Control-Allow-Headers` configurable via `app.conf`
[ui] support login UI like this