---
title: "Deploy Pomerium"
description: "Identity-aware proxy: put SSO and access policy in front of any web app"
category: "Authentication"
url: https://railway.com/deploy/pomerium-1
---

# Deploy Pomerium

Identity-aware proxy: put SSO and access policy in front of any web app

**[Deploy Pomerium on Railway](https://railway.com/template/pomerium-1)**

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

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

## Template content

### Pomerium https://cdn.jsdelivr.net/gh/pomerium/pomerium@v0.34.1/ui/dist/apple-touch-icon.png

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

## Documentation

# Deploy and Host Pomerium on Railway

Pomerium is an open-source identity-aware reverse proxy. Instead of a VPN or a login screen in each app, you put Pomerium in front: it signs users in and checks a policy on every request before passing it on. Apps behind it stay private and receive the user's identity in signed headers.

## About Hosting Pomerium

This template runs Pomerium Core v0.34.1 in all-in-one mode as a single service, built from a small GitHub repo that pins the official image by version and digest. Railway's edge terminates TLS, so Pomerium serves plain HTTP on its Railway domain. A volume keeps the databroker (sessions survive redeploys) and the secrets generated on first boot, so there are no default passwords. Sign-in uses Pomerium's free hosted authenticate service (email and password, Google or GitHub), so no OAuth client is needed. At deploy you enter the email addresses allowed in; set `UPSTREAM_URL` to the app you want to protect.

## Common Use Cases

* Put a login in front of internal tools such as Grafana, admin panels or dashboards, without a VPN
* Add single sign-on to apps that have no login of their own, using Pomerium's identity headers
* Give a contractor access to one app only, and remove it by editing an allow list

## Dependencies for Pomerium Hosting

* A Railway volume at `/data` for the databroker, generated secrets and JWT signing key
* Pomerium's hosted authenticate service (`authenticate.pomerium.app`), or your own OIDC identity provider

### Deployment Dependencies

* Pomerium source and releases: https://github.com/pomerium/pomerium/releases/tag/v0.34.1
* Pomerium documentation: https://www.pomerium.com/docs
* Hosted authenticate service: https://www.pomerium.com/docs/capabilities/hosted-authenticate-service
* Template repo: https://github.com/aalfath/pomerium-railway-template

### Implementation Details

After deploy, open the service's public URL and sign in with an allowed email: you'll see a "signed in" page, and `/.pomerium/` shows your session. Then set these on the Pomerium service:

* `UPSTREAM_URL`: the app to protect, over the private network, for example `http://my-app.railway.internal:3000`
* `ALLOWED_DOMAINS`: allow a whole email domain, for example `example.com`
* `EXTRA_ROUTES`: more Pomerium routes as YAML list items, each with its own `policy` and hostname (add custom domains to the service)

The hosted authenticate service is free but has no uptime commitment, and it asks users to sign in again about every hour. To use your own provider (Google Workspace, Okta, Entra ID, Keycloak and others), set `IDP_PROVIDER`, `IDP_PROVIDER_URL`, `IDP_CLIENT_ID`, `IDP_CLIENT_SECRET` and `AUTHENTICATE_SERVICE_URL` (a second custom domain on this service, such as `https://auth.YOUR-DOMAIN`). Every other Pomerium setting can be set as an upper-case environment variable.

## Why Deploy Pomerium 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 Pomerium 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/pomerium-1
