This guide covers deploying Permify on Railway, either via a one-click template or manual setup.
One-Click Deploy
The fastest way to get started:This template automatically provisions:
A Permify instance with API authentication enabled
A PostgreSQL database for persistent storage
Private networking between services
What Gets Deployed
Permify Service
The template deploys the latest Permify container image with the following default configuration:
Variable
Default Value
Description
PERMIFY_DATABASE_ENGINE
postgres
Database backend
PERMIFY_DATABASE_URI
Auto-configured
Connection string to PostgreSQL
PERMIFY_AUTHN_ENABLED
true
Enable API authentication
PERMIFY_AUTHN_METHOD
preshared
Authentication method
PERMIFY_AUTHN_PRESHARED_KEYS
Auto-generated
32-character secret key
PERMIFY_LOG_LEVEL
info
Logging verbosity
PostgreSQL Database
A dedicated PostgreSQL instance is provisioned and connected to Permify over Railway’s private network. The database connection is configured automatically—no manual setup required.
Connecting Your Application
After deployment, add these environment variables to your application service to connect to Permify:
Both ports are accessible over Railway’s private network by default. To expose them publicly, configure a public domain in your Railway service settings.
Verifying the Deployment
By default, Permify runs on Railway’s private network with no public access. To verify the deployment:Option 1: Check Railway logsView the deployment logs in Railway’s dashboard. A successful start shows:
🚀 grpc server successfully started: 3478🚀 http server successfully started: 3476
Option 2: Expose a public domainTo test externally, add a public domain in Railway’s service settings (Settings → Networking → Public Networking). Then:
curl https://<your-public-domain>/healthz
You should see:
{"status":"SERVING"}
Option 3: From another Railway serviceYour application can reach Permify on the private network at:
http://permify.railway.internal:3476/healthz
Manual Deployment
If you prefer to deploy manually instead of using the template:
1. Create a New Project
Create a new project in Railway and add a PostgreSQL database.
2. Add the Permify Service
Add a new service and deploy from the Docker image:
ghcr.io/permify/permify:latest
3. Configure Environment Variables
Set the following environment variables on your Permify service: