Self-Hosted Only

Production-Ready
Self-Hosted Supabase

Docker Compose setup with automated secret management and MCP integration for AI assistants.

supabase-sf — zsh
user@dev:~$ git clone https://github.com/Song-JunHyeong/supabase-sf.git

Everything You Need

Complete stack with automated secret management.

MCP Integration for AI Assistants

Connect Claude, Cursor, or any MCP-compatible AI to your self-hosted Supabase. AI can check health, create backups, rotate secrets, and manage your instance autonomously.

View supabase-mcp-sf →

Auto Secret Generation

JWT_SECRET, POSTGRES_PASSWORD, API keys - all generated automatically on first deployment.

Key Rotation Scripts

Safe rotation with --dry-run preview. Rotate JWT, Postgres password, and Vault keys.

Production-Grade Architecture

Kong Gateway (API Gateway), Supavisor (Connection Pooler), PostgreSQL 15.8, and all Supabase services.

# Architecture

Kong :8000/:8443

├─ Auth REST Realtime

└─ Storage Functions

Supavisor :5432/:6543

PostgreSQL

Multi-Platform Ready

Docker CLI, EasyPanel, Portainer, Coolify. Deploy anywhere.

Security Hardening

Caddy SSL (Let's Encrypt), rate limiting on Auth/API, port restrictions.

Quick Start

git clone .../supabase-sf.git

cd supabase-sf

docker compose up -d

Dashboard: localhost

API: localhost/rest/v1

AI-Powered Operations

With MCP connected, your AI assistant can do these:

database

  • execute_sql
  • list_tables
  • list_extensions
  • list_migrations
  • +1 more

auth

  • list_users
  • get_user
  • create_user
  • delete_user
  • +1 more

storage

  • create_storage_bucket
  • list_storage_buckets
  • list_files
  • upload_file
  • +3 more

functions

  • list_edge_functions
  • get_edge_function
  • invoke_edge_function
  • deploy_edge_function

operations

  • check_health
  • backup_now
  • rotate_secret
  • get_stats
  • +1 more

debugging

  • get_logs
  • get_advisors

development

  • get_project_url
  • get_anon_key
  • get_publishable_keys
  • generate_typescript_types

docs

  • search_docs

Official MCP vs
Self-Hosted MCP

The official MCP is for Supabase Cloud. We built this for self-hosted instances.

Instead of Manual Config Required

Auto Secret Generation

Instead of Cloud Only (OAuth)

Self-Hosted MCP Server

Instead of None

Health, Backup, Rotate

Instead of Manual Setup

Caddy SSL + Rate Limiting

Official MCP (Cloud Only)

"OAuth authentication required. Supabase Cloud account needed."

Supabase-MCP-SF

"Direct key auth. Health checks, backups, secret rotation included."

Take Control of Your Data

Self-host Supabase with production-grade tooling. Open source, Apache 2.0 licensed.