Cannot access main postgres database with coolify

Please reach out to coolify forums to sort issues like above. It would be hard to know what goes within coolify setup as I understand from our devs that they 've customised our docker and hosting setup.

1 Like

thanks for your quick feedback

@shady I came across this thread while looking for a solution and wanted to share what worked for me for NocoDB in a Coolify setup.

I set up Postgres via the 1-click Supabase install in Coolify, then added NocoDB as a 1-click app in the same project. The key step is to add the Postgres database’s Docker network to NocoDB’s Docker Compose so NocoDB can communicate with the database container.

Here’s how to do it:

  1. In Coolify, go to your Supabase service.
  2. Under the General tab, click Edit Compose File.
  3. Click Show Deployable Compose to see the network Coolify created for your database (it looks like a random string, e.g., r0gw0c88wwckow84kg4k4s4g).
  4. When setting up NocoDB, add this network to its Docker Compose under networks:.

Example snippet for NocoDB’s compose:

services:
  nocodb:
    image: nocodb/nocodb
    environment:
      - SERVICE_FQDN_NOCODB_8080
    volumes:
      - 'nocodb-data:/usr/app/data/'
    healthcheck:
      test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8080/api/v1/health"]
      interval: 5s
      timeout: 20s
      retries: 10
    networks:
      - r0gw0c88wwckow84kg4k4s4g

volumes:
  nocodb-data:

networks:
  r0gw0c88wwckow84kg4k4s4g:
    external: true

Important:
When adding an external database in NocoDB’s UI, the hostname should be the service name of your Postgres container (e.g., supabase-db), not localhost or your server IP.

Use the correct port (usually 5432), username, password, and database name from your Supabase setup (refer to the docker compose file or Environment Tab in Coolify to see these details).


This minimal change lets NocoDB and Supabase talk internally over Docker’s network in Coolify, avoiding connection issues.

~ Cloud Potions https://www.linkedin.com/in/ellis-jesse/