Supabase
Supabase is an open-source Firebase alternative built on PostgreSQL. It bundles a Postgres database, authentication, instant REST and GraphQL APIs, realtime subscriptions, storage, and a Studio admin dashboard into one self-hostable stack. The Studio and APIs are served through the Kong gateway on port 8000.
Software included
Section titled “Software included”| Component | Version |
|---|---|
| Supabase | Self-hosted stack |
| PostgreSQL | 17 |
| Docker | Latest stable |
| Docker Compose | Latest stable |
| Ubuntu | 24.04 LTS |
The stack includes Studio, the Kong API gateway, Auth (GoTrue), PostgREST, Realtime, Storage, and postgres-meta, all on PostgreSQL 17.
Requirements
Section titled “Requirements”| Resource | Minimum | Recommended |
|---|---|---|
| vCPU | 2 | 4 |
| RAM | 4 GB | 8 GB |
| Storage | 30 GB | 80 GB |
Environment variables
Section titled “Environment variables”You can optionally set these when deploying Supabase from the marketplace. Leave a password field blank to have a secure random value generated automatically.
| Variable | Description |
|---|---|
SITE_URL | Public URL for the Supabase instance and Studio dashboard |
POSTGRES_PASSWORD | Password for the PostgreSQL database |
DASHBOARD_PASSWORD | Password for the Studio dashboard login |
These are the only variables you set at deploy time. SUPABASE_PUBLIC_URL and API_EXTERNAL_URL,
referenced under Security, are edited in /data/supabase/.env on the running VM.
Getting started
Section titled “Getting started”1. Connect to your VM
Section titled “1. Connect to your VM”ssh ubuntu@<your-vm-ip>2. Wait for first-boot configuration
Section titled “2. Wait for first-boot configuration”On the first boot, a setup script generates the database password, JWT secret, API keys, and Studio credentials, then pulls the container images and starts the stack. The image pull is large, so this takes roughly 15-20 minutes. Track progress:
journalctl -u supabase-first-boot.service -fThe login message (MOTD) confirms when Supabase is ready.
3. Retrieve the dashboard credentials and API keys
Section titled “3. Retrieve the dashboard credentials and API keys”The Studio username and password, plus the anon and service_role API keys, are written to a
root-only file:
sudo cat /root/.credentials/supabase.txt4. Access the Studio dashboard
Section titled “4. Access the Studio dashboard”Open a browser and navigate to:
http://<your-vm-ip>:8000Sign in with the supabase username and the generated password. The REST and Auth APIs are served
through the same gateway at http://<your-vm-ip>:8000/rest/v1/ and
http://<your-vm-ip>:8000/auth/v1/.
Managing Supabase
Section titled “Managing Supabase”Supabase runs as a Docker Compose stack in /data/supabase.
# Check statuscd /data/supabase && docker compose ps
# Restartcd /data/supabase && docker compose restart
# View logscd /data/supabase && docker compose logs -fEnvironment configuration: /data/supabase/.env. Database and storage data are stored under
/data/supabase/volumes.
Security
Section titled “Security”Ports 8000, 80, and 443 are open on the VM’s network interface. UFW is enabled and allows those ports plus SSH (port 22). Direct PostgreSQL access (5432) is not exposed.
Change the Studio dashboard password after first login. For production use, set
SUPABASE_PUBLIC_URL, API_EXTERNAL_URL, and SITE_URL in /data/supabase/.env to your domain,
restart the stack, and place Supabase behind a reverse proxy such as nginx with a TLS certificate so
Studio and the APIs are served over HTTPS instead of exposing port 8000 directly.