PG On Rails

Self-Hosted Supabase. Amazing developer experience.
RailwaySupabasePostgreSQLNext.jsDocker RailwaySupabasePostgreSQLNext.jsDocker

Bootstrap, self-host and build with Supabase, on Railway and beyond. Full feature parity, active maintenance, and technical support.

01

Sane Defaults

Get working on real application features in seconds. Smart defaults help you start building right away. Avoid drowning in config, and opt in to more hackability as needed.

02

Transparent

Get a clearer picture of how your Supabase app works. Codebase structure that makes it easier to understand your architecture and build faster.

03

Configurable

For the hackers. Configure every aspect of your Supabase app. We provide the full reference of environment config and links to official docs, per-service, right in your codebase.

04

Versionable

Every service gets its own directory, so watchpaths just work. Add new functions, migrations, or config to a service, commit your work, and Railway (or your CI/CD of choice) will trigger a new build.

Back to basics. Build with the tooling beneath the tooling.

Docker, GitHub, Shell, YAML. Develop directly with Docker Compose, see more deeply into your project, and move faster while managing multiple projects locally.

supabase init
supabase link
supabase start
supabase stop
supabase status
supabase projects create
supabase projects delete
supabase branches
supabase functions new
supabase functions download
supabase functions serve

git clone
docker compose build
docker compose up
docker compose down
docker compose ps
git push
gh repo create
gh repo delete
git branch

DX with Supabase, reimagined

Built for modern clouds

Railway service watch paths. Fly.io app build contexts. These features allow for a monorepo code format, with one directory per cloud service. Build fast and watch modern CI/CD continuously deploy your app.

From local to production seamlessly

Committed to a dev experience using Docker Compose, and a deployment story that looks as much as possible like local dev. Easier mental mapping from local dev to deployed cloud environments.

Your frontend included in the stack

Reduce context-switching and host as much of your stack as possible on the same platform. For NextJS, Django, htmx or any server-rendered frontend, get fast and secure access to Supabase data APIs via the shared internal network.

Own your infra again. Software sovereignty for any era.

From startups to enterprises, government to banking. Stay above politics, and run your Supabase app reliably wherever you choose. Bringing software sovereignty to the Supabase stack, so you can build with the Postgres development platform of the future, no matter what your deployment needs are.

Tech Startups
Enterprise SaaS
E-commerce
Fintech
Healthcare
Real Estate
Marketing Agencies
Consulting Firms
Education & EdTech
Logistics & Supply Chain
Media & Publishing
Hospitality
Nonprofits
Telecommunications
Legal Services
Automotive
Recruitment & HR
Construction
Energy & Utilities
Consumer Products
Tech Startups
Enterprise SaaS
E-commerce
Fintech
Healthcare
Real Estate
Marketing Agencies
Consulting Firms
Education & EdTech
Logistics & Supply Chain
Media & Publishing
Hospitality
Nonprofits
Telecommunications
Legal Services
Automotive
Recruitment & HR
Construction
Energy & Utilities
Consumer Products

It's all in the details. Packed with thoughtful features for a fantastic DX.

Single-command deploy

Deploy to Railway with a single command using the PG On Rails CLI. Run a deploy script via curl and get working on your application in minutes.

Frontend dev mode

NextJS dev mode within Docker Compose. Seamless hot-reloading within the Docker Compose stack, so you can access all of the Supabase data APIs in development. Local dev that accurately reflects prod.

Modern auth UI out of the box

SaaS template included. Integrated right into the Docker Compose stack, and including a UI to manage users with Supabase Auth.

Manage email templates

First-class support for auth email templates. Edit your templates and see them instantly update in local development. Version your templates and colocate them with the auth service in git.

No mail server yet, no problem

By default, mailing is disabled. Once a user signs up with their email and password, their email is "auto-confirmed" by the auth server and they are signed in.

DB migrations automated

The frontend service ("Site") automatically runs DB migrations on startup. Optionally move migrations to a GitHub action - boilerplate included.

CI/CD made easy

Railway's CI/CD works seamlessly from the moment you create your project. Begin pushing code and watch your app continuously deploy.

Version everything

No feature or config is too small. Colocate all of a service's files in its own directory, so no matter how micro your change, your service will be rebuilt by CI/CD.

Extensible

Add more services, or tear out those you don't need. Add plugins or routes to Kong Gateway. A transparent repo structure and the open nature of Docker Compose allows for maximum extensibility.

Portable between clouds

Railway is just the beginning. Take your app to any VPS or cloud that supports Docker Compose. Our roadmap includes first-class support and tutorials for Fly.io, Linode, Azure and more.

Ready to enjoy building with Supabase like never before? / Build with PG On Rails.

Deploy on Railway

Integrations

Connect PG On Rails to Stripe, BigQuery, and More — Easily plug into your existing workflow with all of the integrations you expect from Supabase.

Deploy on Railway