SelfHostStackOpen-Source Directory

Why Migrate Away from Firebase Backend?

Firebase locks you into proprietary NoSQL Firestore queries and Google Cloud pricing. When queries run wild, cloud bills explode. Self-hosted alternatives give you standard PostgreSQL with relational power, full vector search for AI, instant REST/GraphQL APIs, and zero read/write per-operation pricing.

Top 2 Recommended Open-Source Replacements

Tested and production-ready. Click any tool to view hardware specs and docker-compose configurations.

Supabase

Apache-2.0⭐ 76.8k+

The open source Firebase alternative with PostgreSQL, real-time subscriptions, Auth, Storage, and Vector AI.

Min RAM4 GB
Min CPU2 vCPU
GitHub Repo ↗

✅ Advantages

  • No vendor lock-in (pure Postgres)
  • Full SQL power & extensions
  • Modern dashboard and auth

⚠️ Trade-offs / Limitations

  • Requires 4GB+ RAM for full stack docker compose
  • Self-hosted Studio requires config care

Core Features

Full PostgreSQL database with Row Level Security (RLS)
Instant REST, GraphQL and Realtime WebSockets APIs
Built-in JWT Authentication with OAuth providers
S3-compatible Object Storage for file uploads
Integrated pgvector for embeddings and LLM RAG pipelines
📄 docker-compose.yml
Production Ready
version: '3.8'
# Standard Supabase Self-Hosted Stack
# Clone https://github.com/supabase/supabase/tree/master/docker for full configuration
services:
  kong:
    image: kong:2.8.1
    restart: unless-stopped
    ports:
      - "8000:8000"
      - "8443:8443"
  db:
    image: supabase/postgres:15.6.1.139
    restart: unless-stopped
    environment:
      POSTGRES_PASSWORD: your_db_password
    volumes:
      - db_data:/var/lib/postgresql/data
volumes:
  db_data:

🚀 5-Minute Deployment Guide

  1. 1Spin up a VPS with 4GB+ RAM (Hetzner CX32 or DigitalOcean 4GB).
  2. 2Clone repo: `git clone --depth 1 https://github.com/supabase/supabase`.
  3. 3Navigate to `cd supabase/docker`.
  4. 4Copy env template: `cp .env.example .env` and replace JWT secrets & passwords.
  5. 5Run `docker compose up -d`.
  6. 6Access Supabase Studio web UI on port 8000.

Recommended VPS for Running Supabase

Hetzner Cloud€7.14/mo

CX32 (4 vCPU, 8GB RAM, 80GB NVMe)

Ideal power for high-throughput Postgres production.

View Deploy Instructions →
DigitalOcean$24.00/mo

4GB Droplet (2 vCPU, 4GB RAM, 80GB SSD)

Reliable US/EU datacenters with automatic snapshot backups.

View Deploy Instructions →

PocketBase

MIT⭐ 43.2k+

Open source backend in 1 single file: embedded SQLite, realtime subscriptions, auth, and file storage.

Min RAM256 MB
Min CPU1 vCPU
GitHub Repo ↗

✅ Advantages

  • Insanely low RAM usage (<50MB)
  • Zero maintenance single binary
  • Built-in SDK for JS/Dart

⚠️ Trade-offs / Limitations

  • Single node SQLite (not designed for multi-region clustering)
  • Extending requires Go or JS hooks

Core Features

Single Go binary (< 35MB) with embedded SQLite + WAL mode
Realtime subscriptions over Server-Sent Events (SSE)
Admin UI dashboard built-in out of the box
Runs effortlessly on $3/mo servers or Raspberry Pi
📄 docker-compose.yml
Production Ready
version: '3.8'
services:
  pocketbase:
    image: ghcr.io/muchobien/pocketbase:latest
    container_name: pocketbase
    restart: unless-stopped
    ports:
      - "8090:8090"
    volumes:
      - ./pb_data:/pb_data
    healthcheck:
      test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/api/health"]
      interval: 10s
      timeout: 5s
      retries: 3

🚀 5-Minute Deployment Guide

  1. 1Provision the smallest VPS available ($3-$4/mo).
  2. 2Create `docker-compose.yml` with the snippet above.
  3. 3Run `docker compose up -d`.
  4. 4Open `http://your-ip:8090/_/` and create your superuser admin account.

Recommended VPS for Running PocketBase

Hetzner Cloud€3.79/mo

CX22 (2 vCPU, 4GB RAM)

Can run 10+ PocketBase instances on a single node.

View Deploy Instructions →

Quick Specification Matrix

ToolLicenseMin RAMMin CPUGitHub RepoPrimary Benefit
Firebase Backend (Proprietary)Proprietary ClosedManaged CloudManaged CloudN/ATurnkey but vendor lock-in & paywalls
SupabaseApache-2.04 GB2 vCPUsupabase/supabaseNo vendor lock-in (pure Postgres)
PocketBaseMIT256 MB1 vCPUpocketbase/pocketbaseInsanely low RAM usage (<50MB)