Ostiary documentation
Guides to self-host Ostiary, the open-source Auth0 alternative: configuration, connecting apps, SAML SSO, SCIM, webhooks, API keys and MCP clients.
Ostiary is a self-hosted, open-source identity provider built on Better Auth. New here? The Quickstart takes you from nothing to signing in to your own app with Ostiary in about ten minutes.
Getting started
Quickstart
Run Ostiary on your machine, make yourself an admin, register an app and sign in to it through Ostiary. It takes about ten minutes.
Deploy on Vercel
Deploy Ostiary on Vercel with a Neon Postgres database, add the admin console as a second project, and put both on your own domain.
Self-hosting
Run Ostiary on your own server with Docker Compose behind a reverse proxy, and keep it running: client IP, housekeeping, backups and upgrades.
Connect an app
Register your app in the admin console and sign users in with any OpenID Connect library.
Build with Ostiary
Protect an API
Register your APIs and their scopes in Ostiary, get access tokens for them, and verify those tokens in your API, for users and for machine-to-machine…
Tokens and claims
Reference for Ostiary's OpenID Connect endpoints, scopes, the claims in ID tokens, access tokens and UserInfo, token lifetimes, and signing keys.
Use Ostiary with MCP and AI agents
Let MCP clients and AI agents (Claude, VS Code, Cursor, agent frameworks) register themselves with Ostiary and get tokens for your MCP server.
API keys
Let people and organizations create long-lived API keys for their scripts, scoped to one of your APIs, and check those keys from your API.
Webhooks
Get a signed HTTPS request in your app when users, roles or organization memberships change in Ostiary, instead of polling for changes.
Users and sign-in
Sign-in methods
How people sign in to Ostiary (password, username, email codes, passkeys, two-factor, captcha) and manage their account from the dashboard.
Social sign-in
Let people sign in with Google, GitHub, Apple, Microsoft and 30+ other providers. You turn each one on from the admin console, without a redeploy.
Enterprise SSO (OIDC and SAML 2.0)
Let an organization's people sign in with their company identity provider (Okta, Entra ID, Google Workspace) over OIDC or SAML 2.0.
Provision users with SCIM
Let an organization's identity provider (Okta, Entra ID and others) create its people's accounts over SCIM 2.0 and deactivate them when they leave.
Organizations
Organizations group accounts for B2B use: members with roles, email invitations, and per-organization SSO, SCIM and API keys. Read this to set them up.
Import users
Move users from Auth0, or from anything that can write a CSV, without asking them to sign up again. Their bcrypt passwords keep working.
Your data: export and account deletion
Every user can download what Ostiary stores about them and delete their account from the dashboard. This guide covers both, and what each one does.
Operate
Admin console
A page-by-page tour of the admin console (apps/admin), where platform admins manage users, applications, APIs, sign-in and security, and who can open it.
Configuration
Every environment variable the auth app and the admin console read, grouped by topic, with its default and the app that uses it.
Security
How Ostiary protects accounts, admin access, tokens and secrets, and the production settings to get right: rate limits, COOKIE_DOMAIN and client IP.
Troubleshooting
Real errors Ostiary produces, with the message you see, why it happens and how to fix it. Search this page for the exact text or code you got.
Testing
How to run Ostiary's checks: lint, types and unit tests, and the end-to-end suite that runs both apps against a real Postgres database.