Deploy Supabase

Self-hosted Supabase: Postgres, Auth, REST, Realtime, Storage and Studio

Deploy Supabase

/app/data

/var/lib/postgresql/data

Just deployed

Bucket

Bucket

Just deployed

Deploy and Host Supabase on Railway

Supabase is an open-source backend platform built on Postgres. It gives you a database with a REST and GraphQL API, user authentication, file storage with image transformations, realtime subscriptions over WebSockets, Deno edge functions and the Studio dashboard to manage it all, in one project you can host yourself.

About Hosting Supabase

Self-hosted Supabase is a set of services around Supabase's own Postgres image: Auth, PostgREST, Realtime, Storage, imgproxy, postgres-meta, the Edge Runtime, Studio and an API gateway. They share one JWT secret, and each one needs the database's role passwords, API keys signed with that secret, and the others' addresses. This template sets all of that up for you. Every secret is generated at deploy time and the API keys are derived from the JWT secret, so there is nothing to fill in. Postgres data and the Vault encryption key live on a volume, files go to a Railway Bucket, and Studio sits behind a login.

Common Use Cases

  • Backend for web and mobile apps: database, auth, file uploads and realtime in one place
  • A Firebase alternative you control, on your own Railway account and region
  • Postgres with an instant REST API, row-level security and a web SQL editor for internal tools

Dependencies for Supabase Hosting

  • Supabase's Postgres 17 image (supabase/postgres 17.6.1.136) with a volume
  • A Railway Bucket for Storage files

Deployment Dependencies

Implementation Details

Services: Supabase (Envoy API gateway, the public URL), Studio, Auth, REST, Realtime, Storage, imgproxy, Meta, Functions, Postgres and the Bucket. Versions: Studio 2026.11.02, Auth v2.197.0, PostgREST v14.18, Realtime v2.148.3, Storage v1.89.12, Edge Runtime v1.77.9, all pinned by digest and built from the template repo, so you get an update notice when the repo moves to a new Supabase release.

After deploying:

  • Open the Supabase service's URL and log in with DASHBOARD_USERNAME (supabase) and DASHBOARD_PASSWORD from that service's variables.
  • Your Project URL is the same address. The anon and service_role keys are in Studio under Project Settings > API Keys.
  • Connect to Postgres from outside Railway with DATABASE_URL on the Postgres service.
  • Set SITE_URL on Auth to your app's URL. To send auth e-mails, add SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS and SMTP_ADMIN_EMAIL to Auth; until then, new e-mail sign-ups are confirmed automatically.
  • Edge Functions are files in the repo's functions/functions folder: fork the repo to add your own.

Not included: Supavisor (connection pooler) and the log analytics stack.

Why Deploy Supabase 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 Supabase 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
RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set
S3-compatible object store, keys and public URL preset, volume kept

SuperSlowSloth
0
View Template
TimescaleDB
A PostgreSQL-based time-series database for analytics on Railway.

Rakit
1
View Template
NEW
Neo4j 2026.10 Community
Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

My Projects
0