# Cannot access main postgres database with coolify

**URL:** <https://community.nocodb.com/t/cannot-access-main-postgres-database-with-coolify/1353>\
**Category:** Self-Host\
**Created:** [September 7, 2024, 7:36pm UTC](https://community.nocodb.com/t/cannot-access-main-postgres-database-with-coolify/1353 "2024-09-07T19:36:31Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Navi](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@Navi](https://community.nocodb.com/u/Navi)\
**Post date:** [January 11, 2025, 2:26pm UTC](https://community.nocodb.com/t/cannot-access-main-postgres-database-with-coolify/1353/22 "2025-01-11T14:26:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![elgoko](https://avatars.discourse-cdn.com/v4/letter/e/5daacb/32.png) [@elgoko](https://community.nocodb.com/u/elgoko)\
**Post date:** [January 11, 2025, 2:26pm UTC](https://community.nocodb.com/t/cannot-access-main-postgres-database-with-coolify/1353/23 "2025-01-11T14:26:53Z")

</div>

> [@elgoko](#):
>
> As a user, when I install Nocodb on coolify , it create a sql defaut database .
> 
> I tried like you from the new project to add 🙂
> 
> ```auto
> - 'NC_REDIS_URL=${NC_REDIS_URL}'
> - 'NC_DB=${NC_DB}'
> 
> ```
> 
> but when I try to access to my new session through the url :
> 
> I get a blackscreen and “no available server” !!!
> 
> I have double check my both PG and Redis variable and credential, and all good, but can’t make nocodb use prostgress instead of the default SQL

thanks for your quick feedback

---

<div class="post-metadata">

**Author:** ![cloudpotions](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@cloudpotions](https://community.nocodb.com/u/cloudpotions)\
**Post date:** [July 10, 2025, 5:36am UTC](https://community.nocodb.com/t/cannot-access-main-postgres-database-with-coolify/1353/24 "2025-07-10T05:36:49Z")

</div>

@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:

```yaml
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/](https://www.linkedin.com/in/ellis-jesse/)

[Previous page](https://community.nocodb.com/t/cannot-access-main-postgres-database-with-coolify/1353.md?page=1)
