NATVPS.id – Supabase is open source Backend as a service (BaaS) which provides a set of tools to help developers develop web and mobile applications. Supabase provides a set of services in one place, such as database, storageand authentication.
This article discusses the steps for installing Supabase on a NAT VPS using Docker, along with NGINX configuration for reverse proxy. This article uses Ubuntu 22.04 as a reference, but you can use other distributions such as Debian and CentOS. Make sure the OS used supports Docker.
Port Forwarding Configuration
Considering we are using NAT, we need to add 2 port forwarding configurations on the Virtualizor panel (or other VPS panel according to provider), ie HTTP and HTTPS port forwarding For Supabase domains.
For example, in this article we will use a domain supabase.tutorial.mdinata.my.id to access Supabase. You are free to change the domain according to your choice. Note this port and domain, because we will use them again in the installation process.

Don’t forget to add a DNS record that goes to your VPS’ NAT public IP, like this:

If you are confused, please read our article regarding domain forwarding here: Explanation of Domain Forwarding in NAT VPS.
Install Docker
We will use docker and write docker for spread Supabase.
First, Install curly using order:
apt update && apt install curl -y

Then, run script automatic installation of Docker by entering:
curl -fsSL get.docker.com | sh
Wait until the installation process is complete.

Install Supabase
First, clone supabase git repository
git clone --depth 1 /opt/supabase

Create a new folder for Project Supabase:
mkdir /opt/supabase-project1 cd /opt/supabase-project1

Copy all docker files and imagine from Supabase Repository:
cp -rf /opt/supabase/docker/* /opt/supabase-project1 cp /opt/supabase/docker/.env.example /opt/supabase-project1/.env

Before running SUPABASE, EDIT ENV first using NANO:
apt install nano -y # Jika belum nano .env
Some configurations to note:
JWT_SECRET: Private key >= 32 characters long for authentication. To create it, enter the commandpwgen -s 40 1. MUST BE COMPLETED.POSTGRES_PASSWORD: PostgreSQL Password. MUST BE COMPLETED.DASHBOARD_USERNAME: Username to log in to the Supabase dashboard. MUST BE COMPLETED.DASHBOARD_PASSWORD: Password to log in to the Supabase dashboard. MUST BE COMPLETED.JWT_SECRET: Encryption key >= 32 characters long for database secret. To create it, enter the commandpwgen -s 40 1. MUST BE COMPLETED.

Save the file with Ctrl-X, yThen Enter.
Finally, run Supabase:
docker compose up -d
Wait until the process spread finished. The first deployment may take a few minutes due to the entire download picture Supabase components and configuring them from the beginning.

NGINX (Reverse Proxy) Configuration
So that we can access URLs via domains such as supabase.tutorial.mdinata.my.idwe can use reverse proxy like NGINX.
First, install NGINX via command:
# Hapus Apache2 dan pendukungnya (biasanya terpasang secara bawaan di VPS OpenVZ) apt purge apache2* -y # Install NGINX apt install nginx -y

Create a new host configuration specifically for Supabase:
nano /etc/nginx/sites-available/supabase
Then paste the following configuration:
#
server {
server_name supabase.tutorial.mdinata.my.id;
listen 80;
listen [::]:80;
location / {
proxy_pass
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Change supabase.tutorial.mdinata.my.id with your domain.

Activate the configuration by:
ln -sf /etc/nginx/sites-available/supabase /etc/nginx/sites-enabled/supabase systemctl restart nginx # Restart NGINX
Generate SSL Certificate (Let’s Encrypt)
In order for our domain to be accessible via HTTPS, we need to create an SSL certificate. We can use a free SSL certificate from Let’s Encrypt via Certbot.
Install Certbot and its NGINX plugin use the command:
apt install python3-certbot python3-certbot-nginx

So, produce certificate via Certbot with command
certbot --nginx -d supabase.tutorial.mdinata.my.id
Change supabase.tutorial.mdinata.my.id with your domain.

Happy! Your Supabase is currently accessible via a secure HTTPS connection.
Accessing Supabase Studio (Dashboard)
Supabase can be accessed via your previous domain. Example: https://supabase.tutorial.mdinata.my.id.

Cover
That’s the end of this article regarding the steps to install Supabase on a NAT VPS. If you are confused or in doubt, don’t hesitate to ask in the Telegram group @IPv6Indonesia. Thank You!
News
Berita
News Flash
Blog
Technology
Sports
Sport
Football
Tips
Finance
Berita Terkini
Berita Terbaru
Berita Kekinian
News
Berita Terkini
Olahraga
Pasang Internet Myrepublic
Jasa Import China
Jasa Import Door to Door