
Supabase
Full Supabase self-hosted with Kong, GoTrue Auth, Realtime, and Studio
Deploy Supabase in 3 Steps
Connect Your VPS
Add your server credentials to Server Compass
Select Supabase
Choose from our template library
Deploy & Configure
Fill in settings and click Deploy
Learn How to Deploy Supabase
Supabase CLI Deployment
Deploy Supabase the traditional way with SSH and Docker Compose.
Open a Terminal Connection
Start by opening a terminal window and connecting to your VPS via SSH.
# Connect to your VPS
ssh root@your-server-ip
# Or with a specific SSH key
ssh -i ~/.ssh/your-key root@your-server-ipFirst time? Docker required! Install it with: curl -fsSL https://get.docker.com | sh
Create Application Directory
Create a dedicated space for your application deployment.
# Create and navigate to project directory
mkdir -p ~/apps/supabase
cd ~/apps/supabaseCreate Deployment Configuration
Create a docker-compose.yml file with the following configuration:
services:
kong:
image: kong:2.8.1
ports:
- "8000:8000"
- "8443:8443"
environment:
- KONG_DATABASE=off
- KONG_DECLARATIVE_CONFIG=/var/lib/kong/kong.yml
- KONG_DNS_ORDER=LAST,A,CNAME
- KONG_PLUGINS=request-transformer,cors,key-auth,acl,basic-auth
- KONG_NGINX_PROXY_PROXY_BUFFER_SIZE=160k
- KONG_NGINX_PROXY_PROXY_BUFFERS=64 160k
volumes:
- ./kong.yml:/var/lib/kong/kong.yml:ro
restart: unless-stopped
depends_on:
- rest
- auth
- realtime
- studio
auth:
image: supabase/gotrue:v2.184.0
command: ['/bin/sh', '-c', 'gotrue migrate && gotrue serve']
environment:
- GOTRUE_API_HOST=0.0.0.0
- GOTRUE_API_PORT=9999
- API_EXTERNAL_URL=http://localhost:8000
- GOTRUE_DB_DRIVER=postgres
- GOTRUE_DB_DATABASE_URL=postgres://supabase_auth_admin:<your-postgres-password>@db:5432/postgres
- DATABASE_URL=postgres://supabase_auth_admin:<your-postgres-password>@db:5432/postgres
- DB_NAMESPACE=auth
- GOTRUE_SITE_URL=http://localhost:8000
- GOTRUE_URI_ALLOW_LIST=
- GOTRUE_DISABLE_SIGNUP=false
- GOTRUE_JWT_ADMIN_ROLES=service_role
- GOTRUE_JWT_AUD=authenticated
- GOTRUE_JWT_DEFAULT_GROUP_NAME=authenticated
- GOTRUE_JWT_EXP=3600
- GOTRUE_JWT_SECRET=<your-jwt-secret>
- GOTRUE_EXTERNAL_EMAIL_ENABLED=true
- GOTRUE_MAILER_AUTOCONFIRM=true
restart: unless-stopped
depends_on:
db:
condition: service_healthy
rest:
image: postgrest/postgrest:v12.2.0
environment:
- PGRST_DB_URI=postgres://authenticator:<your-postgres-password>@db:5432/postgres
- PGRST_DB_SCHEMAS=public,storage,graphql_public
- PGRST_DB_ANON_ROLE=anon
- PGRST_JWT_SECRET=<your-jwt-secret>
- PGRST_DB_USE_LEGACY_GUCS=false
- PGRST_APP_SETTINGS_JWT_SECRET=<your-jwt-secret>
- PGRST_APP_SETTINGS_JWT_EXP=3600
restart: unless-stopped
depends_on:
db:
condition: service_healthy
realtime:
image: supabase/realtime:v2.25.50
environment:
- PORT=4000
- DB_HOST=db
- DB_PORT=5432
- DB_USER=supabase_admin
- DB_PASSWORD=<your-postgres-password>
- DB_NAME=postgres
- DB_AFTER_CONNECT_QUERY=SET search_path TO _realtime
- DB_ENC_KEY=supabaserealtime
- API_JWT_SECRET=<your-jwt-secret>
- FLY_ALLOC_ID=fly123
- FLY_APP_NAME=realtime
- SECRET_KEY_BASE=<your-jwt-secret>
- ERL_AFLAGS=-proto_dist inet_tcp
- ENABLE_TAILSCALE=false
- DNS_NODES=
restart: unless-stopped
depends_on:
db:
condition: service_healthy
meta:
image: supabase/postgres-meta:v0.83.2
environment:
- PG_META_PORT=8080
- PG_META_DB_HOST=db
- PG_META_DB_PORT=5432
- PG_META_DB_NAME=postgres
- PG_META_DB_USER=supabase_admin
- PG_META_DB_PASSWORD=<your-postgres-password>
restart: unless-stopped
depends_on:
db:
condition: service_healthy
studio:
image: supabase/studio:20240729-ce42139
environment:
- PORT=3000
- STUDIO_PG_META_URL=http://meta:8080
- POSTGRES_PASSWORD=<your-postgres-password>
- DEFAULT_ORGANIZATION_NAME=Default Organization
- DEFAULT_PROJECT_NAME=Default Project
- SUPABASE_URL=http://kong:8000
- SUPABASE_PUBLIC_URL=http://localhost:8000
- SUPABASE_ANON_KEY=<your-anon-key>
- SUPABASE_SERVICE_KEY=<your-service-role-key>
- AUTH_JWT_SECRET=<your-jwt-secret>
- NEXT_PUBLIC_ENABLE_LOGS=true
- NEXT_ANALYTICS_BACKEND_PROVIDER=postgres
restart: unless-stopped
depends_on:
- meta
- rest
db:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=<your-postgres-password>
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
volumes:
- db_data:/var/lib/postgresql/data
- ./init-supabase-full.sql:/docker-entrypoint-initdb.d/01-init-roles.sql
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 60s
volumes:
db_data:
PORTKong API Gateway port(default: 8000)KONG_HTTPS_PORTKong HTTPS port(default: 8443)DB_PORTPostgreSQL port (for direct access)(default: 5432)POSTGRES_PASSWORDDatabase passwordJWT_SECRETJWT secret (min 32 chars)DASHBOARD_USERNAMEStudio login username(default: admin)Launch Your Application
Deploy the stack and monitor the startup process.
# Spin up containers
docker compose up -d
# Verify deployment
docker compose ps
# Check logs for errors
docker compose logs -fEnable External Access
Set up firewall rules to permit incoming connections.
# Allow the application port through firewall
sudo ufw allow 8000/tcp
sudo ufw reload
# Access your app at:
# http://your-server-ip:8000Skip the command line. Deploy visually.
Server Compass makes deploying Supabase effortless. Visual setup, one-click deploy, done.
- Visual config editor
- Instant deployment
- Automatic HTTPS
- Smooth updates
- Live monitoring
- Quick rollbacks
After Deployment
After deploying Supabase with Server Compass, complete these steps to finish setup
Access Studio
Create database tables
Set up Row Level Security
Need help? Check out our documentation for detailed guides.
Supabase FAQ
Common questions about self-hosting Supabase
How do I deploy Supabase with Server Compass?
Simply download Server Compass, connect to your VPS, and select Supabase from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.
What are the system requirements for Supabase?
Supabase requires a minimum of 4096MB RAM. We recommend a VPS with at least 8192MB RAM for optimal performance. Any modern Linux server with Docker support will work.
Can I migrate my existing Supabase data?
Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard Supabase backup and restore procedures.
How do I update Supabase to the latest version?
Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest Supabase image will be pulled and deployed with zero downtime.
Is Supabase free to self-host?
Supabase is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.
Related Templates
View all Development
PocketBase
Open-source backend in a single file with realtime database, auth, and file storage

Appwrite
Open-source backend-as-a-service - self-hosted Firebase alternative

Parse Server
Open-source backend framework with dashboard

NocoDB
Open-source Airtable alternative - turn any database into a smart spreadsheet
Ready to Self-Host Supabase?
Download Server Compass and deploy Supabase to your VPS in under 3 minutes. No Docker expertise required.
Download Server Compass