---
title: "Deploy Supabase + Edge Functions"
description: "Self-hosted Supabase with Auth, Storage, Realtime, Studio and Functions"
category: "Storage"
url: https://railway.com/deploy/supabase-edge-functions
---

# Deploy Supabase + Edge Functions

Self-hosted Supabase with Auth, Storage, Realtime, Studio and Functions

**[Deploy Supabase + Edge Functions on Railway](https://railway.com/template/supabase-edge-functions)**

- **Creator:** Auromations
- **Category:** Storage
- **Total deploys:** 1

## Template content

### storage https://supabase.com/favicon/favicon-196x196.png

- **Image:** ghcr.io/hmseeb/supabase-railway-storage:v0.8.0-r3
- **Health check:** /status

### db https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/hmseeb/supabase-railway-db:v0.8.0-r3

### studio https://supabase.com/favicon/favicon-196x196.png

- **Image:** ghcr.io/hmseeb/supabase-railway-studio:v0.8.0-r3
- **Health check:** /api/platform/profile

### meta https://supabase.com/favicon/favicon-196x196.png

- **Image:** supabase/postgres-meta:v0.96.6
- **Health check:** /health

### functions https://supabase.com/favicon/favicon-196x196.png

- **Image:** ghcr.io/hmseeb/supabase-railway-functions:v0.8.0-r3
- **Health check:** /hello

### realtime-dev https://supabase.com/favicon/favicon-196x196.png

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

### pooler https://supabase.com/favicon/favicon-196x196.png

- **Image:** ghcr.io/hmseeb/supabase-railway-pooler:v0.8.0-r3
- **Health check:** /api/health

### auth https://supabase.com/favicon/favicon-196x196.png

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

### gateway https://supabase.com/favicon/favicon-196x196.png

- **Image:** ghcr.io/hmseeb/supabase-railway-gateway:v0.8.0-r3
- **Health check:** /healthz
- **Public domain:** Yes

### rest https://supabase.com/favicon/favicon-196x196.png

- **Image:** postgrest/postgrest:v14.12
- **Start command:** `postgrest`
- **Health check:** /

## Documentation

# Deploy and Host Supabase + Edge Functions on Railway

Supabase is an open source backend platform built around Postgres. This template deploys Studio, Auth, REST, Realtime, Storage, Edge Functions, postgres-meta, Supavisor, and a persistent Supabase Postgres 17 database behind one Envoy gateway.

## About Hosting Supabase + Edge Functions

This template follows the official `self-hosted/v0.8.0` Docker snapshot and pins its tested service versions. Railway generates every database, dashboard, and JWT secret. Six thin wrapper images package the configuration files that Docker Compose normally bind-mounts. Matching anon and service-role API keys are derived automatically from one generated JWT secret, so the deploy form has no manual key-generation step.

Studio is available through the gateway and protected with generated HTTP Basic Auth. Postgres data and uploaded files each persist on their own Railway volume. The direct database and Supavisor transaction pool both receive TCP endpoints.

## Common Use Cases

- Private Postgres backend with Auth, REST, Realtime, and Storage
- Development or staging Supabase environment under your Railway account
- Backend for web and mobile applications that need row-level security
- Edge Function experiments using the included Supabase Edge Runtime
- Migration target when managed Supabase does not fit data-location requirements

## Dependencies for Supabase + Edge Functions Hosting

### Deployment Dependencies

No external account or API key is required for the first deploy. Railway provisions two persistent volumes, one for Postgres and one for uploaded files.

The full stack is resource intensive. Supabase documents 4 GB RAM and 2 CPU cores as the minimum for the complete self-hosted stack, with 8 GB RAM and 4 cores recommended for small to medium production workloads. Railway bills each running service and its storage usage.

### Implementation Details

After deploy, open the gateway domain with `DASHBOARD_USERNAME` and `DASHBOARD_PASSWORD` from the gateway Variables tab. In Studio, open Project Settings, then API to copy the project URL, anon key, and service-role key.

The first deploy uses email auto-confirm so a real signup and login can be tested without a fake SMTP server. Before production, configure SMTP on Auth, set `GOTRUE_MAILER_AUTOCONFIRM=false`, set your application Site URL and allowed redirects, and close open signup if it is not required.

The included `/functions/v1/hello` function proves Edge Runtime is connected. Railway cannot share a writable volume between Studio and Edge Runtime, so function code is changed through the adapter repository. Fork it, add a function directory, build a new image tag, then redeploy both Functions and Studio.

Logflare and Vector are omitted. Vector requires access to the Docker socket, which Railway does not expose. Use Railway service logs instead.

Storage keeps files on a Railway volume, so uploads, downloads, public and signed URLs, and the S3 protocol endpoint all work. Image transformation is not included, because Supabase's file backend requires imgproxy to share the same filesystem and a Railway volume attaches to only one service. The readme explains how to enable transformations later by pointing Storage at an external S3 provider and adding an imgproxy service.

## Why Deploy Supabase + Edge Functions on Railway?

Railway provisions the complete multi-service backend, private networking, persistent storage, generated domains, and generated credentials from one template. This adapter removes the manual secret generator required by the largest existing Supabase template and includes Edge Functions that template omits.


## 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-edge-functions
