Deploy Pomerium
Identity-aware proxy: put SSO and access policy in front of any web app
Just deployed
/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
/datafor 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 examplehttp://my-app.railway.internal:3000ALLOWED_DOMAINS: allow a whole email domain, for exampleexample.comEXTRA_ROUTES: more Pomerium routes as YAML list items, each with its ownpolicyand 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
ALLOWED_EMAILS
Comma-separated email addresses allowed to sign in, e.g. you@example.com

