Skip to content
DatabaseOpen sourceDeployment noteSelf-hostable
Supabase logo

Supabase

Open-source Firebase alternative: managed Postgres, Auth, Storage, and Realtime. Choose Cloud ($25/mo) unless self-hosting capacity justifies ops cost.

Dhanji Bhagat

Dhanji Bhagat

Founder, Emiote

Managed Cloud

Fully hosted platform. Automated backups and SLA.

Reference Cost

$25/mo Cloud (or $0 free tier)

Self-Host Path

Private compute. Zero seat taxes; team runs ops.

Reference Cost

Rs 800/mo on 4GB VM (needs more RAM)

Supabase is an open-source Firebase alternative providing managed PostgreSQL, authentication, storage, edge functions, and realtime subscriptions in a unified platform. Engineering teams choose Supabase Cloud ($25/mo) to offload database maintenance, evaluating self-hosted deployments on Linux VMs only when regional compliance, data sovereignty, or infrastructure ownership outweighs ongoing operational maintenance overhead.

What It Replaces

Supabase replaces proprietary backend-as-a-service platforms and fragmented self-hosted components:

  1. Google Firebase: Replaces proprietary NoSQL Firestore with relational PostgreSQL, Firebase Auth with standard JWT authentication, and Firebase Storage with S3-compatible object storage.
  2. AWS Amplify: Replaces complex CloudFormation and AppSync deployments with a single cohesive developer interface and instant REST APIs.
  3. Fragmented In-House Stacks: Eliminates the need to independently assemble and maintain separate services for Postgres, Redis pub/sub, authentication microservices, and file storage gateways.

Architecture

Supabase integrates open-source projects behind a unified Kong API gateway:

flowchart TD
    Client[Web & Mobile Clients] -->|HTTP / WebSocket| Kong[Kong API Gateway]
    Kong -->|/auth/v1| GoTrue[GoTrue Auth Service]
    Kong -->|/rest/v1| PostgREST[PostgREST Engine]
    Kong -->|/realtime/v1| Realtime[Realtime WebSocket Engine]
    Kong -->|/storage/v1| Storage[Storage API Service]
    Kong -->|/studio| Studio[Supabase Studio UI]

    GoTrue --> Postgres[(PostgreSQL 15 Core)]
    PostgREST --> Postgres
    Realtime -->|WAL Logical Replication| Postgres
    Storage --> Postgres
    Storage --> ObjectStore[(S3 / Local Storage)]

The core architecture treats PostgreSQL as the single source of truth. Security and data isolation are enforced directly at the database layer using PostgreSQL Row Level Security (RLS) policies rather than custom application middleware.


Visual Tour / Workflow

The Supabase developer experience combines a graphical database dashboard with instant API reflection:

Supabase Studio Web Dashboard and Schema Designer

  1. Visual Schema & Table Editor: Teams design tables, configure foreign keys, and establish column-level constraints without writing raw DDL queries.
  2. Integrated SQL Editor & Plan Analyzer: Execute arbitrary SQL queries, inspect execution plans via EXPLAIN ANALYZE, and optimize slow join queries directly in the browser.
  3. Declarative Row Level Security (RLS): Configure authentication rules directly on database tables so that client applications query Postgres directly with total tenancy safety.
  4. Auto-Generated REST & GraphQL Endpoints: Any table created in the schema instantly exposes OpenAPI-documented endpoints with filtering, pagination, and relational joins.

Total Cost of Ownership (TCO)

Evaluation DimensionGoogle FirebaseSupabase Cloud (Pro)Supabase Self-Hosted
Base Monthly CostPay-as-you-go ($0 to $100s)$25 / month flat~$15 to $30 / mo (4GB to 8GB VM)
Database EngineProprietary Firestore NoSQLVanilla PostgreSQL 15Vanilla PostgreSQL 15
Backup AutomationPoint-in-time add-onIncluded daily backupsManual cron dumps to S3
Operational OverheadZero maintenanceZero maintenance4 to 8 hours / month (patching, upgrades)
Row Level SecurityFirebase Rules syntaxNative PostgreSQL RLSNative PostgreSQL RLS
Bandwidth & Egress$0.12 per GB250 GB includedIncluded in cloud VM allocation
Total Annualized Cost$300 to $2,400+ / yr$300 / yr$180 / yr + engineer ops hours

The Bad

While Supabase provides strong developer velocity, self-hosting introduces distinct operational liabilities:

  1. Substantial Memory Requirements: Running the full Docker Compose stack (Postgres, Kong, GoTrue, PostgREST, Realtime, Storage, and Studio) crashes reliably on 2GB VMs. A minimum of 4GB RAM is required for testing, and 8GB RAM is strongly recommended for production stability.
  2. Reverse Proxy & Storage Conflicts: Deploying Supabase storage behind Cloudflare proxy with caching active frequently causes file upload checksum mismatches. Storage hostnames must bypass Cloudflare edge caching.
  3. Multi-Container Version Orchestration: Upgrading self-hosted Supabase requires updating multiple Docker images simultaneously. Version mismatches between GoTrue and PostgreSQL extensions can cause authentication downtime.
  4. Realtime Domain Routing: Setting up WebSockets for Realtime across custom domains requires precise environment variable tuning for SSL termination and upstream proxy handshakes.

Quickstart / Deployment

Managed Cloud Deployment

  1. Create a project at supabase.com.
  2. Connect with your client SDK using the project URL and anonymous public API key.

Self-Hosted Docker Compose Setup

# Clone the official deployment repository
git clone --depth 1 https://github.com/supabase/supabase

# Navigate to docker environment and generate secret keys
cd supabase/docker
cp .env.example .env

# Pull images and launch the cluster on a 4GB+ Linux VM
docker compose pull
docker compose up -d

Recommendation

For startup founders, agencies, and lean product teams: Default to Supabase Cloud. The $25/month Pro tier eliminates hours of infrastructure toil, automated backup configuration, and container debugging.

Evaluate self-hosting only when:

  • Regulatory mandates require data storage on private on-premise hardware.
  • Monthly managed database bills exceed several hundred dollars while your team already retains dedicated systems administrators.

If your engineering team needs an objective evaluation of managed cloud databases vs self-hosting, book an Emiote Stack Review ($199 USD).