Skip to content

Casdoor: Powerful IAM/SSO with Streamlined Server Installation

Casdoor simplifies user login and authorization, offering a user-friendly interface for management and Single Sign-On (SSO) functionality.

Key Features

  • UI-first design: Manage users, applications, and policies through a web interface.
  • Flexible integrations: Supports OAuth, OIDC, SAML, LDAP, and more for various login options.
  • Third-party login: Login with popular services like GitHub, Google, QQ, and WeChat.
  • Fine-grained authorization: Manage access control with Casbin (ACL, RBAC, ABAC, RESTful).
  • Security features: Secure login options, audit logs, and database integration for smooth migration.
  • Customization: Customize registration, login, and password retrieval pages.
  • Scalability: Supports high concurrency and major databases (MySQL, PostgreSQL).

Server Installation Made Easy

  1. Prerequisites: Ensure you have Go 1.17+, Node.js LTS (18), and Yarn 1.x (recommended) installed on your server.

  2. Choose Your Database: Casdoor supports various databases. Refer to the official guide for a complete list and detailed configuration instructions. Popular options include MySQL and PostgreSQL.

  3. Download the Code: Clone the Casdoor source code from GitHub: https://github.com/casdoor/casdoor

Configuration (Optional)

  • Default Configuration: Casdoor uses a built-in SQLite database by default. No additional configuration is needed in this case.
  • Custom Database: Edit the conf/app.conf file to specify connection details for your chosen database (refer to official guide for specific steps). You can also use environment variables for configuration.

Run Casdoor

  • Development:
  • Start the backend server: go run main.go (runs on port 8000 by default)
  • Start the frontend UI:
    • Navigate to the web directory: cd web
    • Install dependencies: yarn install
    • Run the frontend server: yarn start (runs on port 7001 by default)
  • Production:
  • Build the backend executable: go build (Linux) or go build && casdoor.exe (Windows)
  • Build the frontend static resources: cd web && yarn install && yarn build (creates static HTML, JS, CSS files)
  • Access Casdoor dashboard: http://localhost:8000 (login with built-in/admin and password 123)

Explore Casdoor

Remember: Refer to the official Casdoor documentation for detailed installation steps and advanced configuration options.