Deploy Pomerium

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

Deploy Pomerium

/data

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

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.


Template Content

More templates in this category

View Template
Keycloak
[2026-11-04] Keycloak with keywind theme + Apple & Discord providers

beuz
754
View Template
lua-protector
Test deployed my project first

trianaq765-cmd's Project
37
View Template
bknd
Feature-rich yet lightweight backend

10