Railway

Deploy Supabase (Self-Hosted, Full Stack)

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

Deploy Supabase (Self-Hosted, Full Stack)

Just deployed

Just deployed

/var/lib/postgresql

Just deployed

/var/lib/storage

Just deployed

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

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.


Template Content

More templates in this category

View Template
Garage S3 Storage
Ultra-light S3 server: fast, open-source, plug-and-play.

PROJETOS
7
View Template
NEW
Redis
Self Host Latest Redis with Railway

Arloodots
0
View Template
Postgres Backup to Cloudflare R2 (S3-Compatible)
Automated PostgreSQL backups to S3-compatible storage with encryption

Artour
7