---
title: "Deploy Supabase"
description: "Self-hosted Supabase: Postgres, Auth, REST, Realtime, Storage and Studio"
category: "Storage"
url: https://railway.com/deploy/supabase-2
---

# Deploy Supabase

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

**[Deploy Supabase on Railway](https://railway.com/template/supabase-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/supabase-2/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Storage

## Template content

### imgproxy https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/supabase.png

- **Source:** https://github.com/aalfath/supabase-railway-template

### REST https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/supabase.png

- **Source:** https://github.com/aalfath/supabase-railway-template

### Storage https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/supabase.png

- **Source:** https://github.com/aalfath/supabase-railway-template

### Studio https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/supabase.png

- **Source:** https://github.com/aalfath/supabase-railway-template
- **Health check:** /api/platform/profile

### Auth https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/supabase.png

- **Source:** https://github.com/aalfath/supabase-railway-template

### Supabase https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/supabase.png

- **Source:** https://github.com/aalfath/supabase-railway-template
- **Health check:** /health
- **Public domain:** Yes

### Postgres https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/supabase.png

- **Source:** https://github.com/aalfath/supabase-railway-template

### Functions https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/supabase.png

- **Source:** https://github.com/aalfath/supabase-railway-template

### Meta https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/supabase.png

- **Source:** https://github.com/aalfath/supabase-railway-template

### Realtime https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/supabase.png

- **Source:** https://github.com/aalfath/supabase-railway-template

## Buckets

- **Bucket**

## Documentation

# 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

* Supabase self-hosting guide: https://supabase.com/docs/guides/self-hosting/docker
* Supabase self-hosting kit (versions used here): https://github.com/supabase/supabase/tree/master/docker
* Template source, one folder per service: https://github.com/aalfath/supabase-railway-template

### 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 &gt; 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.



## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Neo4j 2026.10 Community](https://railway.com/deploy/neo4j-202610-community) — Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

Open this page in a browser: https://railway.com/deploy/supabase-2
