Skip to main content
Version: 2.x (Latest)

Deploy on Railway

Introduction

Railway is a deployment platform where you can provision infrastructure, develop locally, and deploy to the cloud.

Requirements

A Railway account.

Deploy an Authorizer Instance

Deploy a production-ready Authorizer instance with PostgreSQL and Redis:

Deploy on Railway

Before getting started, make sure you have given permission to Railway for further deployments as it will create a repository in your GitHub account.

Railway deployment

Configure for v2

After deployment, configure the following required variables in Railway's environment settings:

VariableExample Value
DATABASE_TYPEpostgres
DATABASE_URL(auto-configured by Railway)
JWT_TYPEHS256
JWT_SECRETtest
ADMIN_SECRETadmin
CLIENT_ID123456
CLIENT_SECRETsecret

Update the start command to pass CLI flags:

./build/server \
--database-type=$DATABASE_TYPE \
--database-url=$DATABASE_URL \
--jwt-type=$JWT_TYPE \
--jwt-secret=$JWT_SECRET \
--admin-secret=$ADMIN_SECRET \
--client-id=$CLIENT_ID \
--client-secret=$CLIENT_SECRET

Update Instance

Update the Docker image to the desired version in the repository created with your deployment.

Find all versions on GitHub or Docker Hub.