---
title: "Deploy Supabase Self-Hosted"
description: "Full Supabase stack in one click: database, auth, storage, Studio"
category: "Storage"
url: https://railway.com/deploy/supabase-self-hosted
---

# Deploy Supabase Self-Hosted

Full Supabase stack in one click: database, auth, storage, Studio

**[Deploy Supabase Self-Hosted on Railway](https://railway.com/template/supabase-self-hosted)**

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

- **Creator:** ninja
- **Category:** Storage

## Template content

### Postgres

- **Source:** AdeelAhmedKhan/supabase-selfhost-railway

### Realtime

- **Image:** supabase/realtime:v2.143.3

### Gateway

- **Source:** AdeelAhmedKhan/supabase-selfhost-railway
- **Public domain:** Yes

### REST

- **Image:** postgrest/postgrest:v14.18
- **Start command:** `postgrest`

### Functions

- **Source:** AdeelAhmedKhan/supabase-selfhost-railway

### Storage

- **Source:** AdeelAhmedKhan/supabase-selfhost-railway

### Imgproxy

- **Image:** darthsim/imgproxy:v3.31.4

### Meta

- **Image:** supabase/postgres-meta:v0.100.0

### Supavisor

- **Source:** AdeelAhmedKhan/supabase-selfhost-railway

### Auth

- **Image:** supabase/gotrue:v2.197.0

### Studio

- **Source:** AdeelAhmedKhan/supabase-selfhost-railway

## Buckets

- **StorageBucket**

## Documentation

# Deploy and Host Supabase Self-Hosted on Railway

Supabase Self-Hosted gives you a complete, open-source backend in one click on Railway: Postgres for your database, Auth for sign-in, Storage for files, Studio for managing it all, plus Realtime, REST, Edge Functions, and a connection pooler. You get the building blocks of a modern app without running servers yourself, and all services talk to each other over Railway's private network, with only the Gateway exposed to the internet.

## About Hosting Supabase Self-Hosted

Hosting Supabase yourself means running several services together: a Postgres database, an authentication service, a file storage service, a dashboard, and the APIs that connect them. This template wires those services together for you, with passwords and secrets generated at deploy time, a single public entry point, and a Railway Bucket for file storage, so you can focus on building your app instead of configuring infrastructure.

Honest verification status: This template was verified locally on 2026-11-03, and a live Railway deploy test has NOT happened yet. The following items are still untested on Railway and should be checked on first deploy: storage S3 endpoint format, gateway PORT override behavior, inter-service private-domain ports, imgproxy fetch path, supavisor pooler port 6543, functions main worker boot, and first-day cost.

## Common Use Cases

- Build a web or mobile app backend with Postgres, user authentication, and file storage in one place.
- Prototype a full-stack app quickly, then keep the same backend as it grows.
- Run a self-hosted alternative to a managed backend, with full control over your data and services.

## Dependencies for Supabase Self-Hosted Hosting

- A Railway account, plus the included Postgres, Auth, REST, Realtime, Storage, Imgproxy, Meta, Studio, Functions, Supavisor, and Gateway services.
- A Railway Bucket for file storage, created automatically with this template.
- No other external service is required to get started; email and other providers are optional and can be added later.

## Implementation Details

The Gateway is the only public service. All other services use Railway private domains, so database and internal API traffic does not leave the private network. Secrets such as the JWT secret and database passwords are generated at deploy time, and the Studio dashboard is reached through the Gateway. Note: Railway allows one volume per service, so Studio carries the /app/snippets volume in this template; the /app/edge-functions folder is not persisted as a separate volume in this version, and function code lives in the Functions image.

## Why Deploy Supabase Self-Hosted 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 Self-Hosted 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.
- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.

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