Deploy Casdoor

Casdoor 4.9 identity provider with OAuth 2.0, OIDC, SAML and a web UI.

Deploy Casdoor

Just deployed

/var/lib/postgresql/data

Deploy and Host Casdoor on Railway

Casdoor is an open-source identity and access management platform with a web UI. It acts as an OAuth 2.0, OIDC, SAML, CAS and LDAP provider, supports social logins, MFA, passkeys and user management, and includes Casbin-based permissions. SDKs are available for Go, Java, Node.js, Python, PHP, .NET and frontend frameworks.

About Hosting Casdoor

This template deploys Casdoor v4.9.0 from the official image with a Railway Postgres database. On first start the well-known default admin password 123 is replaced with a generated one, so the instance is never exposed with it. The OIDC issuer is your Railway domain, and the discovery document works out of the box. Casdoor listens on the public domain and the private network, so backend services can call its API internally. It is light enough for the Hobby plan. Back up Postgres regularly, since it holds your users and applications.

Common Use Cases

  • Single sign-on for internal tools and customer-facing apps
  • An OIDC provider for apps that support generic OAuth login
  • Central user management with social login and MFA

Dependencies for Casdoor Hosting

  • casbin/casdoor:4.9.0 (official image)
  • Railway Postgres (ghcr.io/railwayapp-templates/postgres-ssl:18) with a volume

Deployment Dependencies

Implementation Details

ServiceImageNetworkingStorage
casdoorcasbin/casdoor:4.9.0public domain on 8000; privatenone (state in Postgres)
PostgresRailway Postgres 18private onlyvolume

Log in at https:// as admin with CASDOOR_ADMIN_PASSWORD, then create an organization and application. OIDC discovery:

curl https:///.well-known/openid-configuration
VariableDefaultPurpose
CASDOOR_ADMIN_PASSWORDgeneratedReplaces the default 123 on first start
originhttps://Public URL and OIDC issuer
driverName / dataSourceNamePostgres referencesDatabase

Notes:

  • The password is only replaced while admin/123 still works; change it later in the UI.
  • Casdoor reads lowercase variables such as origin and runmode directly; keep their names.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the Casdoor project or its maintainers.

Why Deploy Casdoor on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Casdoor on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Keycloak
Keycloak template with keywind theme + apple and discord providers

beuz
755
View Template
lua-protector
Test deployed my project first

trianaq765-cmd's Project
36
View Template
bknd
Feature-rich yet lightweight backend

10