Railway

Deploy Supabase (Self-Hosted Firebase Alternative)

Self-hosted Firebase alternative - full Supabase stack [Updated Aug '26]

Deploy Supabase (Self-Hosted Firebase Alternative)

Just deployed

Just deployed

Just deployed

Just deployed

Just deployed

Just deployed

Just deployed

Just deployed

/mnt/data

/var/lib/postgresql/data

Just deployed

S3

Bucket

Just deployed

Deploy and Host Supabase (Self-Hosted Firebase Alternative) on Railway

Supabase is an open-source Firebase alternative — a complete backend platform built on PostgreSQL that you fully own. It gives you a Postgres database, authentication, instant REST and realtime APIs, file storage, and an admin dashboard, all from one stack. This template deploys the full self-hosted Supabase platform — PostgreSQL, the GoTrue auth server, PostgREST, the Realtime server, Storage with Imgproxy, Postgres-Meta, the Supabase Studio dashboard, a Supavisor connection pooler, and an Envoy API gateway that fronts everything on a single domain — each pinned to a verified upstream image and wired over Railway's private network so it comes up working on the first deploy.

About Hosting Supabase (Self-Hosted Firebase Alternative)

Supabase is a multi-service application: PostgreSQL at the core, GoTrue for authentication, PostgREST for the auto-generated REST API, a Realtime server for websockets and change-data-capture, Storage with an Imgproxy image transformer, Postgres-Meta for schema introspection, the Next.js Studio dashboard, a Supavisor pooler, and an Envoy gateway. Only the Envoy gateway is exposed publicly; it routes /auth, /rest, /realtime, /storage and the Studio dashboard to the right internal service over Railway's private network, and the dashboard sits behind HTTP basic auth. This template wires every connection string, ships a matching set of JWT signing keys (JWT_SECRET, ANON_KEY, SERVICE_ROLE_KEY and the JWKS the services verify against), generates a fresh database password per deploy, and attaches persistent volumes to Postgres and Storage. When it finishes deploying, open the Envoy domain to reach Studio and start creating tables, auth users and storage buckets.

Security note: this template ships with a working default JWT_SECRET and matching ANON_KEY / SERVICE_ROLE_KEY so it runs out of the box, exactly like Supabase's own docker .env example. For any production or internet-facing use you should rotate these — generate a new JWT_SECRET, regenerate the anon and service keys from it, and update the Studio service variables — so your instance does not share keys with other deployments.

Common Use Cases

  • A self-hosted Firebase or backend-as-a-service replacement for web and mobile apps that need a Postgres database, auth, and instant APIs on infrastructure you control
  • A production Postgres database with row-level security, an auto-generated REST API via PostgREST, and realtime subscriptions for live data
  • A storage backend for user uploads and media, with on-the-fly image resizing through Imgproxy, managed from the Supabase Studio dashboard

Dependencies for Supabase (Self-Hosted Firebase Alternative) Hosting

  • PostgreSQL (Supabase's extended build) as the core database for all services (included)
  • An Envoy API gateway that fronts the whole stack on one domain (included)
  • A Supavisor connection pooler in front of Postgres (included)

No external services are required to deploy. To send auth emails (confirmations, magic links, password resets) you can optionally add your own SMTP settings to the GoTrue Auth service after the first-run setup; without SMTP, auth still works with email confirmations disabled.

Why Deploy Supabase (Self-Hosted Firebase Alternative) on Railway?

Railway's private networking, per-service volumes and one-click deploys make running Supabase's ten-service architecture practical without writing Docker Compose or hand-wiring an API gateway. This template pins every image, ships a consistent set of signing keys so auth, REST, realtime and storage all trust the same tokens on first boot, and connects the gateway, dashboard, database, pooler and every API service automatically over the private network — with PostgREST bound for Railway's IPv6 private network so the REST API is reachable immediately — so a working, persistent Supabase instance is a few clicks away, and each service scales independently as your app grows.


Template Content

S3

Bucket

More templates in this category

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

PROJETOS
8
View Template
Redis
Self Host Latest Redis with Railway

2
View Template
NEW
EasyImg
Simple self-hostable Nuxt.js personal image hosting system.

Muhammad Bilal
0