Self-hosted Supabase is powerful. Twelve interconnected services, each with their own configuration, version pinning, and orchestration requirements. PostgreSQL with Supabase extensions, Kong as the API gateway, GoTrue for auth, PostgREST for the REST API, realtime for WebSockets, storage, image proxy, the management studio — the list goes on.
Run docker-compose up and you get a working stack, sure. But getting it production-ready — TLS, domain configuration, backup retention, SMTP for auth emails — that’s dozens of manual steps that are easy to get wrong once but painful to repeat.
One Installer, Full Stack #
bootstrap-supabase is my answer: a single install.sh that deploys the complete Supabase stack on Ubuntu 22.04 or 24.04.
It handles:
- All 12 services via Docker Compose
- Optional TLS (Let’s Encrypt HTTP-01 or Cloudflare DNS-01)
- Backup configuration with configurable retention
- Optional SMTP for transactional email
- Configuration persistence in
/opt/supabase/.install.conffor idempotent re-runs
Run it interactively:
sudo bash install.shOr unattended with all defaults:
sudo bash install.sh -yWhat’s Under the Hood #
| Service | Image | Role |
|---|---|---|
| db | supabase/postgres | PostgreSQL with Supabase extensions |
| kong | kong/kong | API gateway |
| auth | supabase/gotrue | Authentication |
| rest | postgrest/postgrest | REST API |
| realtime | supabase/realtime | WebSocket subscriptions |
| storage | supabase/storage-api | File storage |
| imgproxy | darthsim/imgproxy | Image transformations |
| meta | supabase/postgres-meta | Database management |
| functions | supabase/edge-runtime | Deno edge functions |
| studio | supabase/studio | Dashboard UI |
| analytics | supabase/logflare | Log analytics (optional) |
| vector | timberio/vector | Log collection (optional) |
All versions are pinned to a tested set. No :latest tags, no version drift.
Why Self-Hosted? #
A few reasons teams choose self-hosted Supabase:
- Data sovereignty — keep your data on your own infrastructure
- Cost control — no per-seat pricing, especially at scale
- Customization — run specific PostgreSQL extensions or configurations
- Air-gapped environments — deploy in private networks without external dependencies
Built with DevRail #
This project follows DevRail standards: the same make check contract, Dockerized toolchain, and consistent tooling approach I use across my other projects. If you’re already using DevRail templates, the workflow will feel familiar.
What’s Next #
The installer is stable for single-node deployments. Future work includes clustering support for HA, and more granular service scaling options.
Check the GitHub repo for the full documentation and installation options.