# Cannot connect to postgres

**URL:** <https://community.n8n.io/t/cannot-connect-to-postgres/267663>\
**Category:** Questions\
**Tags:** postgres\
**Created:** [February 20, 2026, 11:36am UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663 "2026-02-20T11:36:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![MoritzSchoelderle](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/moritzschoelderle/32/57445_2.png) [@MoritzSchoelderle](https://community.n8n.io/u/MoritzSchoelderle)\
**Post date:** [February 20, 2026, 11:36am UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663/1 "2026-02-20T11:36:57Z")

</div>

I tried to connect to Postgres, as I need advanced API access, that the normal supabase node does not provide. But when I try to connect with the correct host and db etc,

I only get: connect ENETUNREACH 2a05:d018:135e:1657:3dcd:10dd:6e40:d7e2:5432 - Local (:::0)

By the way, I could establish a connection using the session pooler with ssl off. But that is not possible for live production, as it is way too unsafe.

Workflow:

n8n version: 1.123.9

---

<div class="post-metadata">

**Author:** ![barn4k](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/barn4k/32/8170_2.png) [@barn4k](https://community.n8n.io/u/barn4k)\
**Post date:** [February 20, 2026, 1:33pm UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663/2 "2026-02-20T13:33:38Z")

</div>

hello @MoritzSchoelderle

Describe more about the network. Where is the n8n hosted? where is the Postgres hosted?

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [February 20, 2026, 2:13pm UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663/3 "2026-02-20T14:13:35Z")

</div>

Hi @MoritzSchoelderle I would recommend upgrading your n8n instance to the latest stable version before trying any other fixes.

---

<div class="post-metadata">

**Author:** ![A\_A4](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/a_a4/32/58794_2.png) [@A\_A4](https://community.n8n.io/u/A_A4)\
**Post date:** [February 20, 2026, 9:12pm UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663/4 "2026-02-20T21:12:51Z")

</div>

Hi @MoritzSchoelderle

The `ENETUNREACH` error is due to **IPv6-only Supabase direct host** ; n8n can’t reach it.

try to use the **Supabase Session pooler host (IPv4)**.

- For production‑grade SSL:
  - First try `SSL: Require` on the pooler host.

  - If that fails and you’re on n8n Cloud, you may be limited to `Ignore SSL Issues` or self‑hosting if you need strict TLS validation. [[Postgres credential options](https://docs.n8n.io/integrations/builtin/credentials/postgres/#using-database-connection); [Supabase SSL in Cloud](http://community.n8n.io/t/94927)]

---

<div class="post-metadata">

**Author:** ![achamm](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/achamm/32/143734_2.png) [@achamm](https://community.n8n.io/u/achamm)\
**Post date:** [February 20, 2026, 11:26pm UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663/5 "2026-02-20T23:26:43Z")

</div>

The error shows n8n is trying to reach an IPv6 address and failing, which is the `ENETUNREACH` on that `2a05:d018:...` address. Supabase’s direct connection uses IPv6 but n8n Cloud probably doesn’t have IPv6 routing configured. The session pooler works because it’s IPv4, and honestly using the pooler with SSL set to “Require” in the postgres credentials should be fine for production, that’s what Supabase recommends anyway for serverless/cloud environments.

---

<div class="post-metadata">

**Author:** ![MoritzSchoelderle](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/moritzschoelderle/32/57445_2.png) [@MoritzSchoelderle](https://community.n8n.io/u/MoritzSchoelderle)\
**Post date:** [February 21, 2026, 7:35am UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663/6 "2026-02-21T07:35:01Z")

</div>

Thank you so much, I’ll try that out.

---

<div class="post-metadata">

**Author:** ![MoritzSchoelderle](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/moritzschoelderle/32/57445_2.png) [@MoritzSchoelderle](https://community.n8n.io/u/MoritzSchoelderle)\
**Post date:** [February 21, 2026, 11:35am UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663/7 "2026-02-21T11:35:52Z")

</div>

My only problem with this is, that I then get the “self-signed certificate in certificate chain” error. I challenged Supabase and it told me that this means I would have to somehow add the Supabase SSL CA to the connection, which n8n does not allow in the postgres credential.

BTW I don’t know if this helps but I use n8n cloud on version

---

<div class="post-metadata">

**Author:** ![achamm](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/achamm/32/143734_2.png) [@achamm](https://community.n8n.io/u/achamm)\
**Post date:** [February 21, 2026, 2:00pm UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663/8 "2026-02-21T14:00:52Z")

</div>

The self-signed certificate error is a known thing with Supabase’s pooler, you can try setting SSL mode to “Allow” instead of “Require” or check the “Ignore SSL Issues” toggle in the postgres credentials if there is one. Supabase’s pooler uses their own CA which n8n doesn’t have in its trust store by default, so unless n8n adds a field to upload a custom CA cert you’re kind of stuck with either ignoring the SSL validation or self-hosting n8n where you could potentially add the cert to the container’s trust store.

---

<div class="post-metadata">

**Author:** ![Samuel\_Ross](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/samuel_ross/32/61252_2.png) [@Samuel\_Ross](https://community.n8n.io/u/Samuel_Ross)\
**Post date:** [February 23, 2026, 3:52pm UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663/9 "2026-02-23T15:52:11Z")

</div>

![Capture d’écran 2026-02-23 104352](https://europe1.discourse-cdn.com/n8n/original/3X/6/a/6a0e515e65fb62c37baa1c41e2132f51cc499dd4.png)

 ![Capture d’écran 2026-02-23 104703](https://europe1.discourse-cdn.com/n8n/original/3X/d/b/db2826cc2a7ae8f0b2b9fe8cade99c0df4dd04f2.png)

 ![Capture d’écran 2026-02-23 104718](https://europe1.discourse-cdn.com/n8n/original/3X/8/f/8f39942b8c0c1b1297f5055cb25ba01c1db4ff1c.png)

I had the same issue as you if you’re trying to use postgres as a memory for your AIs. My solution was to create two Supabase tools:

1. The read conversation: you retrieve the number at the limit number you want of the same session id.

2. The write conversation: you save the session id and the output of the AI and you make sure that the AI is prompted to save his output in the field. You let the AI decide what it wants to put inside.

If you prompt it well it will work the same as the postgres memory and for me it ran faster because I had a lot of timeout connection issues. Now my workflow is faster like this.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [May 24, 2026, 3:52pm UTC](https://community.n8n.io/t/cannot-connect-to-postgres/267663/10 "2026-05-24T15:52:31Z")

</div>

Closed on May 24, 2026, 3:52pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
