Deploy Authorizer
Open-source auth server: login, OAuth/OIDC, MFA, roles; Postgres included
Authorizer
Just deployed
Just deployed
/var/lib/postgresql/data
Deploy and Host Authorizer on Railway
Authorizer is an open-source (Apache-2.0) authentication and authorization server. It gives your apps sign-up, login, sessions, magic links, social logins, multi-factor authentication, roles and OAuth 2 / OpenID Connect, plus an admin dashboard, all on your own database. Apps use it through its GraphQL API, standard OAuth / OpenID Connect endpoints, or its JavaScript and React SDKs.
About Hosting Authorizer
This template runs Authorizer 2.4.5 (the official image, pinned by digest) and a Railway Postgres 18 database with a volume. Authorizer keeps users, sessions and settings in Postgres and nothing on local disk, so a redeploy or restart loses nothing. The admin secret, OAuth client ID and secret, JWT key and encryption key are generated for you, so the deploy asks no questions. After deploy, open https://YOUR-DOMAIN/dashboard and log in with the ADMIN_SECRET variable of the Authorizer service. Add your app's origin to ALLOWED_ORIGINS, and set SMTP variables if you want verification and password-reset emails. Updates arrive as Railway update notices.
Common Use Cases
- Self-hosted login, sign-up and sessions for web and mobile apps, instead of Auth0, Clerk or Firebase Auth
- An OpenID Connect provider for your own services, with roles and MFA
- User management and email or social login for internal tools
Dependencies for Authorizer Hosting
- PostgreSQL (included, Railway Postgres 18 with a volume)
- Optional: an SMTP server for verification, magic-link and password-reset emails
Deployment Dependencies
- Authorizer source: https://github.com/authorizerdev/authorizer
- Authorizer docs: https://docs.authorizer.dev
- This template's repo: https://github.com/aalfath/authorizer-railway-template
Implementation Details
- The Authorizer service builds from
aalfath/authorizer-railway-template, which pinsquay.io/authorizer/authorizer:2.4.5by digest. When the version is bumped there, Railway shows an update notice in your project; readCHANGELOG.mdand apply it when you choose. Authorizer migrates its schema on start. - Login page:
/app. Admin dashboard:/dashboard. GraphQL:/graphql. OpenID discovery:/.well-known/openid-configuration. Health check:/healthz, which also checks the database. - No Redis is needed: without
REDIS_URL, sessions are stored in Postgres. Add Redis and setREDIS_URLonly if you run several replicas. - Every other Authorizer flag can be set as a variable: drop the
--, upper-case it and turn-into_. For example--smtp-hostbecomesSMTP_HOST, and--google-client-idbecomesGOOGLE_CLIENT_ID. - New users are asked to set up MFA after their first login and can skip it. Upstream's MFA flags control this.
- Custom domain: add it to the Authorizer service, then set
AUTHORIZER_URLandALLOWED_ORIGINSto it. Never changeENCRYPTION_KEYonce users have enrolled in MFA.
Why Deploy Authorizer 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 Authorizer 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

