---
title: "Deploy FerrisKey+PostgreSQL"
description: "Unofficial hardened ferriskey docker image from Danny"
category: "Authentication"
url: https://railway.com/deploy/ferriskeypostgresql
---

# Deploy FerrisKey+PostgreSQL

Unofficial hardened ferriskey docker image from Danny

**[Deploy FerrisKey+PostgreSQL on Railway](https://railway.com/template/ferriskeypostgresql)**

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

- **Creator:** Danny
- **Category:** Authentication

## Template content

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

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

### FerrisKey https://ferriskey.rs/logo.svg

- **Image:** ghcr.io/ucndanny/ferriskey-hardened:latest
- **Start command:** `/usr/local/bin/ferriskey-api`
- **Health check:** /api/health/ready
- **Public domain:** Yes

## Documentation

# Deploy and Host FerrisKey+PostgreSQL on Railway

FerrisKey is an open-source Identity & Access Management (IAM) server built in Rust with a hexagonal architecture — a fast, self-hosted alternative to Keycloak with OIDC/OAuth2, multi-tenant realms, and built-in MFA. Running natively in Rust instead of on the JVM, FerrisKey uses roughly 10 MB of memory versus ~500 MB for a typical Keycloak instance, with sub-second cold starts — so this template runs comfortably on the smallest Railway plan. This image is built with a minimal base and reduced attack surface (no unnecessary packages, non-root runtime) as general good practice, not as a certified or independently audited security standard. It ships alongside its own PostgreSQL database, ready to issue tokens for your apps out of the box.

## About Hosting FerrisKey+PostgreSQL

Hosting FerrisKey means running the FerrisKey API server connected to a PostgreSQL instance that stores realms, users, clients, and credentials. On first boot, FerrisKey runs its own database migrations and provisions an initial admin account and realm. From there it exposes standard OIDC endpoints (authorization, token, userinfo, JWKS, discovery) that any OAuth2/OIDC-compliant application or gateway can point at, plus an admin console for managing realms, clients, users, and roles. Its low memory footprint means you can run it on a minimal instance size without the resource pressure a JVM-based IAM requires.

## Common Use Cases

- Centralized login (SSO) for internal tools and microservices via OIDC/OAuth2
- Self-hosted, low-resource replacement for Keycloak or Auth0 with full data ownership
- Multi-tenant authentication for SaaS products, isolating users/clients per realm
- Adding MFA (TOTP, WebAuthn) and audit logging to existing applications

## Dependencies for FerrisKey+PostgreSQL Hosting

- PostgreSQL database (included in this template)
- An OIDC-compliant client or reverse proxy to integrate with your apps

## Why Deploy FerrisKey+PostgreSQL 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 FerrisKey+PostgreSQL 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.

This project was built with the help of Claude and ChatGPT.

**Disclaimer:** This is an unofficial, community-maintained template packaging the open-source FerrisKey project. The template maintainer is not affiliated with or the owner of FerrisKey itself. Deploy and use at your own risk.

## 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/ferriskeypostgresql
