Back to all templates
Supabase logo

Supabase

Development4096MB+ RAM

Full Supabase self-hosted with Kong, GoTrue Auth, Realtime, and Studio

baaspostgresrealtimeauthfirebase-alternative

Deploy Supabase in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select Supabase

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
Step-by-step deployment guide

Self-Host Supabase on a VPS with Server Compass

Use the Supabase template in Server Compass to deploy a full self-hosted Supabase stack with Kong, Auth, Realtime, Studio, and PostgreSQL, then verify the Supabase Studio dashboard in a browser.

About 10 minutesBrowser verified
1
Step 1

Open the server Apps tab

Select your VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Server Compass Apps tab before creating a Supabase app
2
Step 2

Choose an app template

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Choosing to deploy an app from a Server Compass template
3
Step 3

Search for Supabase

Use the template picker search to find Supabase in the Server Compass template catalog. The full Supabase template includes Kong, Auth, REST, Realtime, Studio, Meta, and PostgreSQL.

Searching for Supabase in the Server Compass template picker
4
Step 4

Select the Supabase template

Choose the full Supabase template. Server Compass fills the multi-service Docker Compose stack, persistent database volume, generated secrets, and default ports.

Full Supabase template selected in Server Compass
5
Step 5

Review the generated stack

Confirm the app name, seven Supabase services, compose snapshot, preserved advanced settings, and host ports. In the pilot run, the app was named supabase-demo and used ports 8000, 8443, and 5432.

Reviewing generated Supabase services and host ports
6
Step 6

Deploy Supabase

Review the masked generated passwords, JWT values, API keys, dashboard username, optional SMTP fields, and port check result. When Server Compass confirms the ports are available, click Deploy Now.

Reviewing masked Supabase environment variables before deployment
7
Step 7

Watch the deployment finish

Keep the deployment modal or activity panel open while Server Compass uploads the Compose file, creates the Supabase initialization files, pulls the images, starts the services, and verifies the stack.

Server Compass deployment activity for the Supabase template
8
Step 8

Confirm Supabase is running

After deployment finishes, return to the Apps tab and confirm Supabase is marked Running. The app card should show seven services and the application URL on port 8000.

Supabase template running in the Server Compass Apps tab
9
Step 9

Open Supabase Studio in the browser

Open the application URL and sign in with the generated Supabase Studio credentials from Server Compass. The Supabase Studio project home confirms the protected dashboard is reachable.

The deployed Supabase Studio dashboard loaded in a browser

After Supabase Opens

  • Store the generated dashboard password, database password, JWT secret, anon key, and service role key in your team password manager.
  • Change the default dashboard username if this stack will be used beyond a demo.
  • Restrict direct PostgreSQL port access to trusted IP addresses.
  • Put Supabase behind HTTPS before production use.
  • Configure SMTP before using email invites or password reset flows.
  • Plan backups for the PostgreSQL data volume.

Verified Result

The root URL returned a Kong Basic Auth challenge before login. After authenticating with the generated dashboard credentials, the browser loaded Supabase Studio with title Default Project | Default Organization | Supabase.

Supabase deployment questions

What does the full Supabase template deploy?

It deploys Kong, GoTrue Auth, PostgREST, Realtime, Postgres Meta, Supabase Studio, and PostgreSQL with generated secrets and initialization files.

Which ports did the pilot use?

The pilot used port 8000 for the Kong gateway, port 8443 for the Kong HTTPS mapping, and port 5432 for PostgreSQL.

Why is Supabase Studio protected by a login prompt?

The full template protects Studio with Kong Basic Auth. Use the generated dashboard username and password from Server Compass to open the dashboard.

Do I need SMTP for Supabase?

A demo can run without SMTP, but production auth flows should configure SMTP so invites, confirmations, and password resets can send email.

Should this become a blog post?

No. The deployment guide should live on the Supabase template detail page and be linked from the reusable template deployment docs page.

Terminal Deployment

Supabase CLI Deployment

Deploy Supabase the traditional way with SSH and Docker Compose.

1

Open a Terminal Connection

Start by opening a terminal window and connecting to your VPS via SSH.

terminal
# Connect to your VPS
ssh root@your-server-ip

# Or with a specific SSH key
ssh -i ~/.ssh/your-key root@your-server-ip

First time? Docker required! Install it with: curl -fsSL https://get.docker.com | sh

2

Create Application Directory

Create a dedicated space for your application deployment.

terminal
# Create and navigate to project directory
mkdir -p ~/apps/supabase
cd ~/apps/supabase
3

Create Deployment Configuration

Create a docker-compose.yml file with the following configuration:

docker-compose.yml
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:
Deployment Settings
PORTKong API Gateway port(default: 8000)
KONG_HTTPS_PORTKong HTTPS port(default: 8443)
DB_PORTPostgreSQL port (for direct access)(default: 5432)
POSTGRES_PASSWORDDatabase password
JWT_SECRETJWT secret (min 32 chars)
DASHBOARD_USERNAMEStudio login username(default: admin)
4

Launch Your Application

Deploy the stack and monitor the startup process.

terminal
# Spin up containers
docker compose up -d

# Verify deployment
docker compose ps

# Check logs for errors
docker compose logs -f
5

Enable External Access

Set up firewall rules to permit incoming connections.

terminal
# Allow the application port through firewall
sudo ufw allow 8000/tcp
sudo ufw reload

# Access your app at:
# http://your-server-ip:8000
Skip the Terminal

Skip 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
Download Server Compass$29 one-time • Lifetime license

After Deployment

After deploying Supabase with Server Compass, complete these steps to finish setup

1

Access Studio

2

Create database tables

3

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.

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