1. Set up your Supabase Installation
After choosing your Zone, Network, click on the Marketplace Apps tab, select Supabase and pick your desired version.
A section for Environment Variables will be displayed. Fill in the following information.
Your Email
- This is the email address that will receive any LetsEncrypt certificate alerts.
Your Domain
-
This is the domain you want to use for your Supabase instance, we will configure the A records later since we don't know what the public IP will be just yet.
-
Note: Only input your subdomain or root domain. Do not include "https" or "www". Just "my-subdomain.rootdomain.com"
JWT
-
Go here to find a new JWT token. Use it to generate an
ANON_KEY
and aSERVICE_KEY
from it while you're there and paste into the following 2 settings. -
If you don't want to use the key generated by the site, you can create your own with
openssl rand 48 | base64
and use that on that page to generate ANON and SERVICE keys.
ANON_KEY
- The
ANON_KEY
from the JWT step above.
SERVICE_KEY
- The
SERVICE_KEY
from the JWT step above.
BASIC_AUTH_USER
- The username you want to use to access Supabase in your browser.
BASIC_AUTH_PASSWORD
- The password you want to use to access Supabase in your browser.
2. Initialize your Supabase
After setting your environment variables, choose a server size and then click on "Add a new startup script". This will apply the environment variables you set earlier, so no further action is needed.
Click "Add startup script" to confirm.
(Optional)
Apply any ssh keys you wish to use, and name your instance. Review, and deploy.
3. Configure DNS
After your server has been created, note the public IP address on the instance overview page, then navigate to your DNS provider for your_domain
and create A records for your domain.
Create one mapping for your domain/subdomain, and one prefixed with "www.", as seen in the example below. (use your VM's public IP as the value instead of 0.0.0.0)
- Note: DNS providers have different methods of doing this, please contact your DNS provider if you are having any issues
4. (Optional) Restart Proxy
The last step is to tell your server to get new certificates, now that DNS is configured. This step might not be necessary if you configured your A records quickly, since the proxy container usually takes a minute or two to finish starting.
SSH into your server, using the Username, IP address, and Password provided to you.
- Note: Use your Public IP instead of 0.0.0.0
ssh [email protected]
Once you are in the VM, run the following command to restart your nginx proxy:
cd ~/nginx && docker compose restart nginx
5. Check your site
Congratulations! Your Supabase will be available shortly at the domain you configured earlier.
Just be aware that the proxy can take a few minute to initialize and apply certificates, so try waiting 2 minutes or so before inspecting the VM.
Troubleshooting
If your Supabase installation is having issues, you can inspect the logs by connecting to the system with ssh and using docker compose.
cd ~/supabase/docker && docker compose logs -f
cd ~/nginx && docker compose logs -f
If you are having trouble with your domain, or certificates/ssl, try restarting the proxy service.
cd ~/nginx && docker compose restart nginx
If you are stuck on the page that says "Connecting to Default Project", you may wish to recreate your database.
To recreate your database, run the following commands to recreate your database:
cd ~/supabase/docker
docker compose down
sudo rm -rf volumes/db/data/
docker compose up -d