Self-host ory
v26.2.0Headless identity and user management over HTTP APIs
$ docker run --rm -it oryd/kratos:<version-you-want> help- Stars
- 13 951
- Ports
- 4433 (Public (browser) API for login, registration and other self-service flows), 4434 (Admin API for managing identities and sessions)
oryd/kratosWhat is ory?
Ory Kratos is the identity and login engine of the Ory stack: it answers with JSON instead of HTML, so your own web, mobile or backend code renders sign-up, sign-in and account screens while Kratos owns the logic behind them. It centralizes the flows applications usually hand-roll, covering registration, login, logout, verification of email or phone addresses, account recovery, settings changes and session handling, with credentials such as passwords, one-time codes, passkeys, TOTP second factors and social sign-in providers. Each user record is an identity whose shape you define with JSON Schema, and admin APIs let you create, import, update or delete those accounts. Outbound email and SMS for codes and recovery links are sent by the built-in courier with configurable SMTP/HTTP delivery and custom templates. Self-hosting means running one Go binary, the oryd/kratos container image or the Ory Helm chart against SQLite, PostgreSQL, MySQL or CockroachDB, with the public API on 4433 and the admin API on 4434; the open-source build ships without any access control on those APIs, so you are expected to guard them behind Ory Oathkeeper or a comparable gateway. SAML, SCIM, organization login and CAPTCHA support require the paid Ory Enterprise License, and the same engine is also sold as managed Ory Identities on the Ory Network. There is no bundled admin or login UI at all.
ory alternatives
zitadelSelf-hosted open-source IAM stack: password, passkey and second-factor logins, external IdP brokering, OIDC/SAML tokens, on PostgreSQL with Docker or Kubernetes.Comparezitadel with ory
autenticoSelf-hosted OIDC identity provider as a single Go binary with SQLite, handling login, MFA, passkeys, sessions, and tokens with built-in admin UI.Compareautentico with ory
AuthorizerSelf-hosted open-source auth and authorization server: OAuth2/OIDC, social logins, magic links, MFA, passkeys, SAML SSO, RBAC plus embedded OpenFGA, on 13+ databases.CompareAuthorizer with ory
logtoSelf-hosted, open-source auth server for SaaS and AI apps: OIDC, OAuth 2.1 and SAML with passwordless, social login, MFA, RBAC and multi-tenant organizations.Comparelogto with ory
authgearSelf-hosted open-source CIAM and identity provider, an Auth0/Clerk alternative with passkeys, MFA, SAML SSO and RBAC, deployed via Helm.Compareauthgear with ory
DexOpen-source, self-hosted OIDC and OAuth 2.0 identity service that fronts LDAP, SAML, GitHub, Google and other IdPs, so every app just speaks OpenID Connect.CompareDex with ory
authentikSelf-hosted, open-source identity provider for SSO over OIDC, SAML, LDAP, RADIUS and SCIM, with TOTP and passkeys, configurable flows, RBAC and Helm or Compose installs.Compareauthentik with ory
CasdoorSelf-hosted open-source IAM and SSO server with a web console, a built-in MCP server for AI agents, and support for more than 100 identity providers.CompareCasdoor with ory
All self-hosted alternatives to Auth0 → All self-hosted alternatives to Firebase Authentication → All self-hosted alternatives to Okta →
Should you self-host ory?
ory scores 72/100 on selfhost.directory (how scoring works) and ranks #6 of 19 in Identity & Auth. It has 13 951 GitHub stars, +43 in the last 30 days.
It shipped 2 stable releases in the past year. The latest, v26.2.0, came out on 20 March 2026. New versions land roughly every 4 months.
Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Go.
Its closest alternative on selfhost.directory is authentik (80/100, 26 290 stars). It scores higher overall, so compare the two before you pick. See ory vs authentik side by side.
Features
- Account Recovery
- Admin API for identity management
- Cookie and CSRF protected browser flows
- Custom identity schemas
- Customizable authentication workflow
- Email and phone verification
- Email and SMS delivery with templates
- Enterprise SAML and SCIM supportRequires the paid Ory Enterprise License.
- Headless API-only authentication
- Multi-Factor Authentication
- Passkeys and passwordless login
- Self-service login and registration
- Session Management
- Social sign-in
ory README
Chat · Discussions · Newsletter · Docs · Try Ory Network · Jobs
Ory Kratos is an API first identity and user management system for cloud native applications. It centralizes login, registration, recovery, verification, and profile management flows so your services consume them instead of reimplementing them.
Table of contents
Ory Kratos is an API first identity and user management system that follows cloud architecture best practices. It focuses on core identity workflows that almost every application needs:
- Self service login and registration
- Account verification and recovery
- Multi factor authentication
- Profile and account management
- Identity schemas and traits
- Admin APIs for lifecycle management
We recommend starting with the Ory Kratos introduction docs to learn more about its architecture, feature set, and how it compares to other systems.
Ory Kratos is designed to:
- Remove identity logic from your application code and expose it over HTTP APIs
- Work well with any UI framework through browser based and native app flows
- Scale to large numbers of identities and devices
- Integrate with the rest of the Ory stack for OAuth2, OpenID Connect, and access control
- Fit into modern cloud native environments such as Kubernetes and managed platforms
If you are migrating from Auth0, Okta, or another identity provider that uses OAuth2 / OpenID Connect based login, consider using Ory Hydra + Ory Kratos together:
- Ory Hydra acts as the OAuth2 and OpenID Connect provider and can replace most authorization server and token issuing capabilities of your existing IdP.
- Ory Kratos provides identity, credentials, and user-facing flows (login, registration, recovery, verification, profile management).
This combination is often a drop-in replacement for OAuth2 and OpenID Connect capabilities at the protocol level. In practice, you update client configuration and endpoints to point to Hydra, migrate identities into Kratos, and keep your applications speaking the same OAuth2 / OIDC protocols they already use.
You can run Ory Kratos in two main ways:
- As a managed service on the Ory Network
- As a self hosted service under your own control, with or without the Ory Enterprise License
The Ory Network is the fastest way to use Ory services in production. Ory Identities is powered by the open source Ory Kratos server and is API compatible.
The Ory Network provides:
- Identity and credential management that scales to billions of users and devices
- Registration, login, and account management flows for passkeys, biometrics, social login, SSO, and multi factor authentication
- Prebuilt login, registration, and account management pages and components
- OAuth2 and OpenID Connect for single sign on, API access, and machine to machine authorization
- Low latency permission checks based on the Zanzibar model with the Ory Permission Language
- GDPR friendly storage with data locality and compliance in mind
- Web based Ory Console and Ory CLI for administration and operations
- Cloud native APIs compatible with the open source servers
- Fair, usage based pricing
Sign up for a free developer account to get started.
You can run Ory Kratos yourself for full control over infrastructure, deployment, and customization.
The install guide explains how to:
- Install Kratos on Linux, macOS, Windows, and Docker
- Configure databases such as PostgreSQL, MySQL, and CockroachDB
- Deploy to Kubernetes and other orchestration systems
- Build Kratos from source
This guide uses the open source distribution to get you started without license requirements. It is a great fit for individuals, researchers, hackers, and companies that want to experiment, prototype, or run unimportant workloads without SLAs. You get the full core engine, and you are free to inspect, extend, and build it from source.
If you run Kratos as part of a business-critical system, for example login and account recovery for all your users, you should use a commercial agreement to reduce operational and security risk. The Ory Enterprise License (OEL) layers on top of self-hosted Kratos and provides:
- Additional enterprise features that are not available in the open source version such as SCIM, SAML, organization login ("SSO"), CAPTCHAs and more
- Regular security releases, including CVE patches, with service level agreements
- Support for advanced scaling, multi-tenancy, and complex deployments
- Premium support options with SLAs, direct access to engineers, and onboarding help
- Access to a private Docker registry with frequent and vetted, up-to-date enterprise builds
For guaranteed CVE fixes, current enterprise builds, advanced features, and support in production, you need a valid Ory Enterprise License and access to the Ory Enterprise Docker registry. To learn more, contact the Ory team.
Install the Ory CLI and create a new project to try Ory Identities.
# Install the Ory CLI if you do not have it yet: bash <(curl https://raw.githubusercontent.com/ory/meta/master/install.sh) -b . ory sudo mv ./ory /usr/local/bin/ # Sign in or sign up ory auth # Create a new project ory create project --create-workspace "Ory Open Source" --name "GitHub Quickstart" --use-project ory open ax login
The Ory community stands on the shoulders of individuals, companies, and maintainers. The Ory team thanks everyone involved - from submitting bug reports and feature requests, to contributing patches and documentation. The Ory community counts more than 50.000 members and is growing. The Ory stack protects 7.000.000.000+ API requests every day across thousands of companies. None of this would have been possible without each and everyone of you!
The following list represents companies that have accompanied us along the way and that have made outstanding contributions to our ecosystem. If you think that your company deserves a spot here, reach out to office@ory.com now!
| Name | Logo | Website | Case Study |
|---|---|---|---|
| OpenAI |
|
openai.com | OpenAI Case Study |
| Fandom |
|
fandom.com | Fandom Case Study |
| Lumin |
|
luminpdf.com | Lumin Case Study |
| Sencrop |
|
sencrop.com | Sencrop Case Study |

0 comments