---
title: "Deploy Authorizer | (Just Updated) Auth0 Alternative, Login Page + Postgres Included"
description: "Auth0 alternative: login page, admin dashboard and Postgres included"
category: "Authentication"
url: https://railway.com/deploy/authorizer-or-just-updated-auth0-alterna
---

# Deploy Authorizer | (Just Updated) Auth0 Alternative, Login Page + Postgres Included

Auth0 alternative: login page, admin dashboard and Postgres included

**[Deploy Authorizer | (Just Updated) Auth0 Alternative, Login Page + Postgres Included on Railway](https://railway.com/template/authorizer-or-just-updated-auth0-alterna)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/authorizer-or-just-updated-auth0-alterna/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Authentication

## Template content

### postgres

- **Image:** postgres:18.6@sha256:74935e72241653ca55e0414067e6d8763aceb8a810eb51b452253ec3dcfc4336

### authorizer

- **Image:** lakhansamani/authorizer:2.4.2@sha256:7c87f8c4c39bdb245addf63f3f74dc2139d1129421900365ca2e645979532709
- **Start command:** `/bin/sh -c 'exec ./authorizer --url="https://$RAILWAY_PUBLIC_DOMAIN" --allowed-origins="https://$RAILWAY_PUBLIC_DOMAIN" --client-id="$CLIENT_ID" --client-secret="$CLIENT_SECRET" --admin-secret="$ADMIN_SECRET" --jwt-type=HS256 --jwt-secret="$JWT_SECRET" --encryption-key="$ENCRYPTION_KEY" --database-type=postgres --database-url="$DATABASE_URL" --env=production --log-level=info --disable-mfa --http-port="${PORT:-8080}"'`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Authorizer on Railway

Authorizer is an open-source authentication and authorization server: sign-up and login with email and password, a hosted login page, JWT sessions, social login, a GraphQL API and an OpenID Connect discovery document. This template deploys it together with its own Postgres database, with every secret generated for you.

## About Hosting Authorizer

The template starts two services: `authorizer` (the server, public HTTPS domain) and `postgres` (private, on a persistent volume). Authorizer v2 is configured only through command-line flags, so the start command builds the full flag set from environment variables at boot: public URL, allowed origin, client ID and secret, admin secret, JWT secret, encryption key and the database URL. All of these are generated per deploy as Railway secrets, so nothing has to be filled in before you click Deploy.

After the deploy turns green:

- `/app` is the hosted login and sign-up page.
- `/dashboard` is the admin dashboard. Sign in with the `ADMIN_SECRET` variable of the `authorizer` service.
- `/graphql` is the GraphQL API your applications call.
- `/.well-known/openid-configuration` is the OIDC discovery document.
- `/health` is the health endpoint Railway checks.

Multi-factor authentication is switched off with the `--disable-mfa` flag, because Authorizer v2 enforces MFA setup by default and a plain email and password login would otherwise never return a token. To turn it back on, remove `--disable-mfa` from the start command of the `authorizer` service and redeploy.

User accounts live in Postgres on a volume mounted at `/var/lib/postgresql`, so they survive redeploys and restarts.

## 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.

- Login page, admin dashboard and Postgres in one click
- Secrets generated automatically, nothing to paste
- User data kept on a persistent volume
- Public HTTPS domain with the correct redirect URL already configured

## Common Use Cases

- Replace a hosted identity provider such as Auth0 with a server you own
- Add email and password login to a web or mobile app through the GraphQL API
- Act as an OpenID Connect provider for internal tools
- Prototype sign-up flows before committing to a larger identity stack

## Dependencies for Authorizer Hosting

### Deployment Dependencies

- [Authorizer on GitHub](https://github.com/authorizerdev/authorizer)
- [Authorizer documentation](https://docs.authorizer.dev/)
- [Authorizer Docker image](https://hub.docker.com/r/lakhansamani/authorizer)
- [PostgreSQL](https://www.postgresql.org/)

### Implementation Details

The start command is wrapped in `/bin/sh -c` so environment variables expand, and it passes `--url` and `--allowed-origins` from `RAILWAY_PUBLIC_DOMAIN`. Because Authorizer reads its configuration only from flags, change a setting by editing the start command of the `authorizer` service. The database connection uses the private network address of the `postgres` service, with the generated password shared between the two services.


## Similar templates

- [Keycloak](https://railway.com/deploy/mSwigX) — Keycloak template with keywind theme + apple and 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-or-just-updated-auth0-alterna
