How it helps your business
pg_hba.conf, custom extensions, and scalability parameters while maintaining the same world-class developer experience as the managed version.Key Benefits
- Postgres Empowerment: Use a real relational database with the ease of a BaaS.
- Data Sovereignty: Host your data anywhere (on-prem, AWS, Azure, GCP) while staying compliant with GDPR/HIPAA.
- No Vendor Lock-in: Move between self-hosted and managed Supabase with zero code changes.
- AI-Ready: Native
pgvectorsupport makes it the perfect backend for retrieval-augmented generation (RAG) applications. - Real-time Engine: Broadcast state changes to millions of clients with sub-100ms latency.
Production Architecture Overview
- Kong: The API gateway that routes all requests.
- GoTrue: The authentication engine.
- PostgREST: Converts your database schema into a RESTful API.
- Realtime: Elixir-based engine for listening to Postgres changes.
- Storage API: S3-compatible service for file management.
How we deploy this for you
Security Hardened
Firewalls, SSL, and hardened kernels out of the box.
Performance Tuned
Optimized for speed with cache and DB fine-tuning.
Automated Backups
Daily off-site backups so you never lose your data.
Private Cloud
You own the server and the data. No middleman.
Implementation Blueprint
Prerequisites
- Recommended Resources: 4 vCPUs, 8GB RAM, and 50GB SSD.
- Operating System: Ubuntu 22.04 LTS or higher.
- Tools: Docker, Docker Compose, and Git.
Step 1: Initialize the Environment
# Clone the Supabase repository
git clone --depth 1 https://github.com/supabase/supabase
cd supabase/docker
# Copy env template and generate secrets
cp .env.example .env
# IMPORTANT: Run the setup script to generate secure keys
./generate-passwords.shStep 2: Deployment
# Pre-pull the images (over 20+ containers)
docker compose pull
# Start the stack in detached mode
docker compose up -d
# Verify all services are healthy
docker compose psExternal Access and SSL
Scaling Strategy
- Database Offloading: For extreme scale, move the PostgreSQL engine to a managed cluster (like RDS or Aurora) and point the Supabase microservices to it.
- Load Balancing: Use a global load balancer to distribute traffic across multiple Kong instances.
- Storage Backend: Replace the local storage volume with an external S3 bucket to ensure infinite file scalability and multi-region availability.
Includes Security & performance standards
Best place to host Supabase
We recommend Hostinger for its reliability and low cost. It's the perfect home for your new apps, featuring easy setup and 24/7 support.
Get Started on Hostinger