
Deploy Supabase Self Hosted vs Cloud
What you keep and lose self-hosting Supabase
Just deployed
Just deployed
/var/lib/postgresql/data
Just deployed
Just deployed
realtime
Just deployed
Just deployed
/var/lib/storage
Just deployed
Just deployed
/app/snippets
Just deployed
Deploy and Host self hosted Supabase Self Hosted vs Cloud (Open-Source Firebase Alternative) on Railway
Supabase Self Hosted vs Cloud gives you the open-source Postgres backend on your own Railway project: nine pinned services, generated secrets, and a verified healthy stack in one click.
About Hosting Supabase open-source software on Railway (self hosted Supabase template)
This Railway template deploys the full self-hosted Supabase stack with zero deploy-time input. It runs nine services: the public Envoy gateway, Postgres 17.6.1.136 on a volume, GoTrue auth, PostgREST, Realtime, Storage, postgres-meta, Edge Runtime, and the Studio dashboard.
Why Deploy Supabase, the Firebase alternative on Railway (Railway Free Trial)
Supabase Self Hosted vs Cloud on Railway keeps your data on infrastructure you control. You get flat monthly cost, no project pausing, no per-project limits on this instance, and full Postgres access.
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 vs Cloud 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.
Railway vs Other Hosting Providers and VPS for Supabase self hosting
| Provider | Key tradeoff for Supabase self hosting |
|---|---|
| DigitalOcean | Cheapest single Droplet starts around 6 USD/mo, but you must wire nine services manually and keep every secret in sync. No one-click Supabase stack. |
| AWS | EC2 or ECS gives fine-grained control and IAM, but the learning curve and egress costs make a nine-service Supabase deployment expensive to prototype. |
| Hetzner | Very low VPS prices and generous bandwidth, but you own the full compose file, reverse proxy, TLS, and volume backups. No managed dashboard or generated secrets. |
Common Use Cases for hosted Supabase
Self-hosted Supabase works well when you need a single project with auth, Postgres, realtime, storage, and edge functions without per-user pricing. Teams often deploy it for internal tools, side projects that must never pause, regional data residency, or as a Postgres-first backend that exposes REST and GraphQL automatically.
Dependencies for Supabase Docker hosted on Railway
The self-hosted template runs nine services, but the core dependency chain is simpler than it looks. Postgres is the foundation. Auth, PostgREST, Realtime, Storage, and postgres-meta all talk to it directly. The Envoy gateway routes public traffic to the right service based on path. Studio needs the gateway and meta service.
Deployment Dependencies for Managed Supabase Service (Postgres Backend)
On Railway, the db service uses the supabase/postgres image pinned to 17.6.1.136. It initializes roles, realtime, webhooks, and JWT settings via SQL on first boot. The auth service, GoTrue v2.196.0, requires JWT_SECRET, POSTGRES_PASSWORD, and the database host.
Implementation Details for Supabase (Using official Supabase docker images)
Every image in this template is the official upstream image pinned by digest. That means no latest tag drift. The gateway is Envoy v1.39.1 with the upstream self-hosted config.
How does Supabase compare against other backend platforms
Supabase vs Firebase
- Data model: Supabase uses Postgres with relational tables and SQL. Firebase uses proprietary NoSQL Firestore, which locks you into Google's SDK and query model.
- Self-hosting: Supabase is Apache-2.0 and runs on your own Railway project. Firebase has no self-hosted option; it is a managed Google service only.
- Cost at scale: Supabase self-hosted is flat infrastructure cost. Firebase bills per read, write, and delete, which gets unpredictable for chat or realtime-heavy apps.
Supabase vs Appwrite
- Database: Supabase is Postgres, with extensions like PostGIS and pgvector. Appwrite is built on MariaDB, which is fine but lacks Postgres's ecosystem.
- License: Supabase is Apache-2.0. Appwrite is BSD-3, also open source, but the community and SQL tooling around Supabase are larger.
- Realtime: Supabase Realtime is Postgres logical replication plus websockets. Appwrite has a separate realtime service with different subscription semantics.
Supabase vs PocketBase
- Scale: PocketBase is a single Go binary with SQLite, ideal for small apps on one VPS. Supabase is a nine-service stack built for concurrent Postgres workloads.
- Auth providers: Supabase GoTrue supports many OAuth providers, email, phone, and magic links. PocketBase supports email/password and a handful of OAuth providers.
- Operations: PocketBase has almost zero moving parts. Self-hosted Supabase requires you to watch volumes, secrets, and gateway routing, though Railway simplifies that.
Supabase vs Neon
- Scope: Neon is serverless Postgres only. Supabase adds auth, storage, realtime, edge functions, and a dashboard on top of Postgres.
- Pause behavior: Neon pauses inactive databases on lower tiers. Supabase Cloud free tier pauses projects after one week of inactivity. Self-hosted Supabase never pauses.
- Branching: Neon has instant database branching. Supabase Cloud has branching on paid plans. This self-hosted template has no branching; you clone the volume or restore a backup.
How to use Supabase (the OSS Postgres backend)?
After deploy, open the supabase service domain in a browser. Log into Studio with the username supabase and the DASHBOARD_PASSWORD from the supabase service variables. Create your first table, then turn on Row Level Security. Copy the anon key from the gateway deploy logs.
How to self host Supabase on other VPS Services (Supabase self hosting guide)
The upstream method works on any Linux VPS with Docker and Docker Compose. The Railway template automates the same steps, but knowing the manual path helps when you debug or migrate.
Clone the Repository
Run git clone --depth 1 https://github.com/supabase/supabase. Change into the supabase/docker directory.
Install Dependencies
Install Docker Engine and Docker Compose plugin. Upstream suggests at least 4 GB of RAM for a smooth self-hosted Supabase instance. A 2 GB VPS will run but may swap during heavy realtime or storage workloads.
Configure Environment Variables
Copy .env.example to .env. Change every secret: POSTGRES_PASSWORD, JWT_SECRET, PGSODIUM_ROOT_KEY, and all other generated values. Never reuse the example secrets. Set your public URL if you run behind a reverse proxy.
Start the Supabase Application
Run docker compose pull to fetch pinned images, then docker compose up -d. Check container health with docker compose ps. The gateway logs will print the anon key and public URL after the services are ready.
Official Pricing of Supabase (Supabase pricing)
Supabase Cloud pricing at supabase.com/pricing: Free includes two projects, a pause after one week of inactivity, and a 500 MB database. Pro starts at 25 USD per month per organization, including 10 USD of compute credits. Team is 599 USD per month. Enterprise is custom. Self-hosting Supabase is free at the software level.
Supabase cloud vs self hosted comparison (Pricing, features, costs, and more)
Monthly cost of self hosting Supabase on Railway
On Railway, expect about 20 to 40 USD per month for nine small services at light use. The exact cost rises as Postgres grows or if you scale Realtime and Edge Functions. That compares to Supabase Cloud Pro at 25 USD per month plus usage, or Team at 599 USD. Self-hosting has no per-seat or per-project markup.
System Requirements for Hosting Supabase on a VPS
Upstream recommends at least 4 GB RAM for a single self-hosted Supabase instance. The nine services together idle around 1.5 to 2.5 GB depending on Postgres shared buffers and edge runtime. Disk usage starts near 2 GB for images and volumes. Use a volume for /var/lib/postgresql/data and /var/lib/storage.
Frequently Asked Questions (FAQs)
What do I keep when I self-host Supabase instead of using Supabase Cloud?
You keep data ownership, flat infrastructure cost, no project pausing, no per-project limits on this instance, and full Postgres access. You can run pg_dump, install any extension, and inspect every table directly.
What do I lose with this self-hosted template versus Supabase Cloud?
You lose branching, managed daily backups and point-in-time recovery, multiple projects per instance, the platform org and billing UI, Supavisor pooler, Logflare log analytics, and managed upgrades. You must handle backups, SMTP, and pooler alternatives yourself.
How do I get the anon key after deploy?
Open the supabase service deploy logs in Railway. The gateway prints the Supabase URL and anon key when it starts. The service_role key is also derived, but you should never put it in client code.
Can I send real email with this self-hosted Supabase?
Yes. Set GOTRUE_SMTP_HOST, GOTRUE_SMTP_USER, GOTRUE_SMTP_PASS in the auth service variables and set GOTRUE_MAILER_AUTOCONFIRM to false. Without SMTP, autoconfirm is on by default and signup emails are skipped.
Is the Supabase Studio dashboard included?
Yes. Studio 2026.09.07 is included and runs behind HTTP basic auth with username supabase and the generated DASHBOARD_PASSWORD. It stores snippets and edge function files on a volume.
Can I run multiple projects on one self-hosted Supabase instance?
No. This template runs one Supabase project. Supabase Cloud supports multiple projects per organization with separate databases and auth tenants. To run multiple self-hosted projects, deploy separate instances or use schema separation with your own routing.
Template Content
realtime
supabase/realtime:v2.134.10