---
title: "Deploy Supabase (Self-Hosted, Full Stack)"
description: "Full Supabase stack: Postgres, Auth, REST, Storage, Studio behind Kong."
category: "Storage"
url: https://railway.com/deploy/supabase-self-hosted-full-stack
---

# Deploy Supabase (Self-Hosted, Full Stack)

Full Supabase stack: Postgres, Auth, REST, Storage, Studio behind Kong.

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

- **Creator:** Nick K's Projects
- **Category:** Storage
- **Total deploys:** 4

## Template content

### rest

- **Image:** postgrest/postgrest:v14.12

### auth

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

### Postgres

- **Image:** supabase/postgres:17.6.1.136

### studio

- **Image:** supabase/studio:2026.07.07-sha-a6a04f2

### storage

- **Image:** supabase/storage-api:v1.60.4

### meta

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

### kong

- **Image:** kong/kong:3.9.1
- **Public domain:** Yes

## Documentation

# Deploy and Host Supabase (Self-Hosted, Full Stack) on Railway

Supabase is the open-source Firebase alternative: a full backend built on PostgreSQL with instant REST and GraphQL APIs, authentication, file storage, and a beautiful admin dashboard. This template deploys the real self-hosted stack — 7 services wired together over Railway's private network — not just a bare database.

## About Hosting Supabase (Self-Hosted, Full Stack)

One click deploys PostgreSQL 17 (Supabase build, on a persistent volume), GoTrue auth, PostgREST, Storage API (persistent volume), postgres-meta, Supabase Studio, and a Kong API gateway that exposes everything on a single public URL — exactly like the official docker-compose, adapted for Railway. Before deploying you must generate three secrets (2 minutes): open the official generator at https://supabase.com/docs/guides/self-hosting/docker#securing-your-services, create a `JWT_SECRET` with matching `ANON_KEY` and `SERVICE_ROLE_KEY`, and paste them into the deploy form. Everything else (database password, dashboard password) is auto-generated.

**After deploy:**

- Open the `kong` service's public URL → Supabase Studio (login: `DASHBOARD_USERNAME` / `DASHBOARD_PASSWORD` from the kong service variables)
- Your API endpoints: `https:///rest/v1/`, `/auth/v1/`, `/storage/v1/`, `/graphql/v1`
- Use with supabase-js: `createClient("https://", "")`

## Common Use Cases

- Full open-source Firebase alternative you own end-to-end: database, auth, APIs, and file storage on one URL
- Escaping Supabase Cloud project pricing while keeping the exact same client SDKs and Studio workflow
- Internal tools and MVPs that need instant CRUD APIs, row-level security, and user management out of the box

## Dependencies for Supabase (Self-Hosted, Full Stack) Hosting

- JWT_SECRET + ANON_KEY + SERVICE_ROLE_KEY generated with Supabase's official tool (required at deploy time)
- Two persistent Railway volumes (database + file storage), included

### Deployment Dependencies

- [Generate your API keys (required)](https://supabase.com/docs/guides/self-hosting/docker#securing-your-services)
- [Supabase self-hosting docs](https://supabase.com/docs/guides/self-hosting)
- [supabase-js client library](https://supabase.com/docs/reference/javascript/introduction)

### Implementation Details

Kong routes `/auth/v1/`, `/rest/v1/`, `/graphql/v1`, `/storage/v1/` and `/pg/` to the right internal services and serves Studio at `/` behind basic-auth, using a declarative config generated from your keys. All inter-service traffic stays on Railway's private network. Image transformation is disabled because it would require a volume shared between two services, which Railway does not support; everything else matches the official docker-compose (Realtime and Edge Functions are not included in this template).

## Why Deploy Supabase (Self-Hosted, Full Stack) 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, Full Stack) 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

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

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