VM Supabase Deployment

Deploying Your Supabase Instance on a Virtual Machine


What You’ll Get

Once deployed, your VM will run a full Supabase stack locally via Docker.

Service
Purpose
Default Port

Postgres

Database

5432

Kong Gateway (API)

REST + Auth endpoint

8000

Studio

Web UI dashboard

3000

Storage

File uploads

5000


Step 1 — Prepare Your VM Environment

Recommended Specs

  • Ubuntu 22.04 LTS (or Debian 12)

  • 2 vCPUs, 2 GB RAM minimum

  • 10 GB+ disk

  • Docker + Docker Compose installed

Install dependencies:

sudo apt update
sudo apt install -y docker.io docker-compose git
sudo systemctl enable --now docker

Step 2 — Clone the Supabase Docker Setup

This directory contains Docker Compose files for all Supabase services.


Step 3 — Configure Your Environment

Copy and edit the example environment file:

Open .env and minimally edit:

Replace <YOUR_VM_IP> with your VM’s public IP or domain name (e.g. http://203.0.113.10 or https://supabase.yourdomain.com).


Step 4 — Start the Stack

Launch Supabase services:

Check that all services are healthy:

If successful, you’ll see containers like:


Step 5 — Import Your Existing Data

If you previously exported your Supabase Cloud project to a dump file (supabase_backup.sql):

Your local database now contains all tables and data from your old cloud project.


Step 6 — Connect Your Frontend

In your web project (HTML/JS):

✅ Your frontend now communicates directly with your VM’s Supabase instance


Step 7 — Verify via Supabase Studio

Access the dashboard at:

Log in using your local keys from .env.

You’ll see your tables, users, and storage buckets — just like in Supabase Cloud.


Enterprise Deployment Support

If you’d like to deploy your Supabase environment to a virtual machine (VM) or your own production server, we can help you set that up securely.

For enterprise deployment assistance, please contact our team here:

Our enterprise support can guide you through:

  • Deploying Supabase on your own infrastructure (AWS, Azure, GCP, etc.)

  • Setting up backups, SSL, and domain routing

  • Scaling from local to production-grade environments


References

Last updated