---
title: "Deploy Authorizer"
description: "Open-source auth server: login, OAuth/OIDC, MFA, roles; Postgres included"
category: "Authentication"
url: https://railway.com/deploy/authorizer-2
---

# Deploy Authorizer

Open-source auth server: login, OAuth/OIDC, MFA, roles; Postgres included

**[Deploy Authorizer on Railway](https://railway.com/template/authorizer-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/authorizer-2/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Authentication

## Template content

### Authorizer https://raw.githubusercontent.com/authorizerdev/authorizer/2.4.5/web/app/favicon_io/android-chrome-512x512.png

- **Source:** https://github.com/aalfath/authorizer-railway-template
- **Health check:** /healthz
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# 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 pins `quay.io/authorizer/authorizer:2.4.5` by digest. When the version is bumped there, Railway shows an update notice in your project; read `CHANGELOG.md` and 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 set `REDIS_URL` only 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-host` becomes `SMTP_HOST`, and `--google-client-id` becomes `GOOGLE_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_URL` and `ALLOWED_ORIGINS` to it. Never change `ENCRYPTION_KEY` once 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.



## Similar templates

- [Keycloak](https://railway.com/deploy/mSwigX) — [2026-11-04] Keycloak with keywind theme + Apple & Discord providers
- [lua-protector](https://railway.com/deploy/lua-protector) — Test deployed my project first
- [bknd](https://railway.com/deploy/p4nTYL) — Feature-rich yet lightweight backend

Open this page in a browser: https://railway.com/deploy/authorizer-2
