---
title: "Deploy Passflow with your own Postgres"
description: "Self-hosted auth server for your own Neon or Supabase Postgres"
category: "Authentication"
url: https://railway.com/deploy/passflow-with-your-own-postgres
---

# Deploy Passflow with your own Postgres

Self-hosted auth server for your own Neon or Supabase Postgres

**[Deploy Passflow with your own Postgres on Railway](https://railway.com/template/passflow-with-your-own-postgres)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/passflow-with-your-own-postgres/manifest.json

- **Creator:** erudenko's Projects
- **Category:** Authentication
- **Total deploys:** 1

## Template content

### Passflow https://raw.githubusercontent.com/usepassflow/deploy/main/assets/passflow.png

- **Image:** passflow/passflow:v0.100.1
- **Health check:** /ping
- **Public domain:** Yes

## Buckets

- **Bucket**

## Documentation

# Deploy and Host Passflow with Railway

Passflow is a source-available auth server with an admin panel. It is an OIDC and OAuth2 provider with passkeys, magic links, social login, 2FA and multi-tenancy. This template runs its Docker image with a Postgres database you already have at Neon or Supabase.

## About Hosting Passflow

You paste a Neon or Supabase URL as `DATABASE_URL`. It must have `sslmode=require` or `verify-full`. Passflow keeps users and sessions in Postgres, and its settings and keys in the bucket. Anyone with a copy of the bucket has those keys. For production, keep settings and keys in a separate store such as AWS SSM. When you deploy, you type the first admin sign-in as email:password. Open `/adminpanel` on the public domain, sign in and add a passkey. Then delete `PASSFLOW_EMERGENCY_LOGIN_CREDENTIALS` and redeploy. The image is pinned to one release, so you choose when to update.

## Common Use Cases

- Sign-in for your own web and mobile apps over OIDC or OAuth2
- Passkeys, magic links, social login and 2FA from one server
- B2B apps where each customer is a tenant with its own users and roles

## Dependencies for Passflow Hosting

- A Postgres database at Neon or Supabase
- Railway Storage Bucket

### Deployment Dependencies

- [Passflow documentation](https://docs.usepassflow.com)
- [Passflow image on Docker Hub](https://hub.docker.com/r/passflow/passflow)
- [Deploy templates and first sign-in guide](https://github.com/usepassflow/deploy)
- [Neon](https://neon.com) or [Supabase](https://supabase.com)

### Why Deploy Passflow on Railway?

The template fills in the bucket variables, so you type two values: your database URL and your first admin sign-in. Users stay in your own Postgres.

### After you deploy

Set up backups in Neon or Supabase before you store real users.

Leave Railway's "Enable CDN Caching" off for the `Passflow` service. If you turn it on, sign in and check that Passflow still records your own address.

## 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/passflow-with-your-own-postgres
