NEED YOUR HELP : n8n AI Agent Node + Postgres Chat Memory (Supabase)

Describe the problem/error/question

Hey everyone, I’m running into an issue connecting my AI Agent’s Postgres Chat Memory node to a Supabase instance.

What is the error message : couldn’t connect with these settings, connect ENETUNREACH 2406:da14:271:9921:e596- local (:::0)

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Information on your n8n setup

  • n8n version: latest one
  • Database (default: SQLite): supabase (postgres)
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):cloud
  • Operating system: windows
3 Likes

Hey! That ENETUNREACH error usually means a network connectivity issue between n8n Cloud and your Supabase instance. Quick diagnosis steps:

  1. Check if n8n Cloud IP is whitelisted in Supabase → Database → Project Settings → Network → IPv4 allow list (add 0.0.0.0/0 for testing, then restrict later)
  2. Verify SSL mode in your connection string (usually ‘require’ for Supabase) — some proxies drop SSL
  3. If you’re on n8n Cloud, you can’t directly test network connectivity — instead, try switching to Supabase’s connection pooler (port 6543) if you’re using a direct connection (port 5432), or vice versa.

Also: Are you using a direct Postgres connection or Supabase’s pooler? Pooler sometimes has stricter timeout settings. Have you tested this workflow locally first to rule out n8n Cloud infrastructure?

@Rudra_Bhattacharjee that error is IPv6 — n8n cloud can’t reach the IPv6 address supabase gave you. go to supabase dashboard → project settings → database, copy the connection string under “URI” with the IPv4 toggle ON, use that in your postgres credentials instead. here’s a minimal agent + postgres memory setup:

plug your supabase postgres creds (with the IPv4 URI) into the memory node, add your openai key to the model node, should connect right away.

I have seen this a couple times with n8n + Supabase setups that ENETUNREACH error usually isn’t about the credentials or node config itself.

It’s more of a network/connectivity issue, especially when IPv6 gets involved with cloud instances.
Most people try to fix it from the database side, but the issue is often happening earlier in the connection layer.

Quick question are you connecting using the default Supabase connection string or a modified one?

1 Like

Hi @Rudra_Bhattacharjee Welcome to the team!

This is a network issue (ENETUNREACH), not credentials.

Your n8n can’t reach Supabase , likely because it’s trying IPv6.

Fix:

  • Use the IPv4 / direct connection string from Supabase

  • Or ensure your server supports IPv6

1 Like