Supabase
What is Supabase?
The open source Firebase alternative.
Screenshots
Notes
You can find your anonymous key in the Environment Variables area under SERVICE_SUPABASEANON_KEY.
New services use Envoy as the API gateway instead of Kong. The gateway is the supabase-envoy component, and its URL is in SERVICE_URL_SUPABASEENVOY. Existing services keep Kong.
Public Port Access
There is a bug with making database publicly accessible. This bug will be fixed soon. In the meantime, you can use the following workaround:
Set Supabase Db to public
Then
Go to the General tab then Edit Compose File
Then add this line:
ports:
- ${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}To
supabase-db:
image: "supabase/postgres:17.11.0.019"
healthcheck:
test: "pg_isready -U postgres -h 127.0.0.1"
interval: 5s
timeout: 5s
retries: 10
ports:
- ${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}And Restart
NOTE if you are changing the port to a different port altogether to update the POSTGRES_PORT in the Environment Variables
Opening ports with ufw-docker
Finally, to allow external access to the PostgreSQL port in a Docker setup, you need to open the port in the firewall using the command:
ufw route allow proto tcp from any to any port 5432This rule ensures traffic can reach your PostgreSQL database through the Docker network. For more information, read the docs from ufw-docker.
Using Hetzner's firewall UI
If your server is hosted on Hetzner, you may not need ufw-docker. Instead, you can open the relevant database port (e.g., 5432) directly using Hetzner's firewall UI.
Studio shows the logs of another Supabase stack
When two Supabase services run on one server, Supabase Studio of an older service can show the API logs of the other stack. Since Coolify v4.7.0, the Vector container of the template reads only the logs of its own stack.
An existing service keeps its vector.yml. To fix it:
-
On the server, open
/data/coolify/services/<service-uuid>/volumes/logs/vector.yml. -
Add
include_labelsundersources.docker_host:sources: docker_host: type: docker_logs include_labels: - 'com.docker.compose.project=${COOLIFY_RESOURCE_UUID}' exclude_containers: - supabase-vector -
Restart the service.
Upgrade to Supabase with PostgreSQL 17
New services use the Supabase self-hosted release 0.8.4 with PostgreSQL 17.11 and Envoy. An existing service keeps Kong and its images until you change them in Configuration > General > Edit Compose File.
Do not start PostgreSQL 17 on PostgreSQL 15 data.
- Back up the database.
- Run
utils/upgrade-pg17.shas the official guide tells. - Update the OAuth callback URLs at your providers. They now use
/auth/v1.
The storage migrations from v1.81 are one-way. The gateway does not add CORS headers to functions.
See the official PostgreSQL 17 upgrade guide.
