Backend & Database⭐ 79k+ GitHubLicense: Apache 2.0

How to Self-Host Supabase Self-Hosted with Docker Compose

Open-Source Alternative to: Firebase ($25+/mo)

Supabase gives developers a full Postgres database with Row Level Security (RLS), instant CRUD APIs, user authentication, and S3-compatible file storage in a single docker stack.

MINIMUM HARDWARE
4 GB RAM, 2 vCPU, 40 GB Disk
ESTIMATED SAVINGS
$600/year
OFFICIAL REPOSITORY
github.com/supabase/supabase ↗

Production Docker Compose File

Copy this tested configuration directly into your server's directory:

🐳 docker-compose.yml
# Supabase provides a dedicated docker repo:
# git clone --depth 1 https://github.com/supabase/supabase
# cd supabase/docker
# cp .env.example .env
# docker compose up -d

Quick Deployment Steps

1. git clone --depth 1 https://github.com/supabase/supabase 2. cd supabase/docker && cp .env.example .env 3. Generate secret keys and run: docker compose up -d 4. Access Supabase Studio UI at http://localhost:8000

Key Advantages & Trade-Offs

✓ Why Self-Host Supabase Self-Hosted?

  • True relational SQL (PostgreSQL) instead of NoSQL document silos
  • Built-in JWT authentication with social logins (Google, GitHub, etc.)
  • Zero vendor lock-in: standard Postgres backups can be moved anywhere

⚠ What to Keep in Mind

  • Docker compose stack runs multiple microservices (Kong, GoTrue, PostgREST, Storage)
  • Requires minimum 4 GB RAM for stable local operations

More Self-Hosted Alternatives

Knowledge & Workspace
AppFlowy
Replaces Notion ($10/seat/mo)
Project Management
Plane
Replaces Jira ($8.50/seat/mo) & Linear
No-Code Database
NocoDB
Replaces Airtable ($20/seat/mo)