From DFC Node — verified 2026-03-19
Problem
Connecting a Docker container to Supabase fails with “Tenant or user not found” even when the project is ACTIVE_HEALTHY. The direct DB hostname (db.{ref}.supabase.co) is IPv6-only. Most VPS providers do not assign public IPv6 by default.
Diagnosis Steps
- Test pooler:
psql postgresql://postgres.{ref}:[pass]@aws-0-us-east-1.pooler.supabase.com:6543/postgres→ Tenant not found - Test direct host DNS:
nslookup db.{ref}.supabase.co→ returns only AAAA (IPv6) record - Check your server:
ip -6 addr show | grep "scope global"→ empty = no public IPv6
Fix
Option A — Enable IPv6 on your server:
Get your IPv6 range from your provider (IONOS: Control Panel → Server → Network). Add it:ip -6 addr add {your-ipv6}/64 dev eth0
Persist in /etc/netplan/60-ipv6.yaml
Option B — Enable Supabase pooler:
Supabase Dashboard → Settings → Database → Connection Pooling → Enable. Then use the pooler URL. Note: pooler uses postgres.{ref} as username, not just postgres.
Option C — Create a DB user that can connect:
Via Supabase Management API SQL endpoint, create a user with BYPASSRLS. The postgres password is managed by Supabase internally — you cannot change it.
Gotcha: network_mode: host
If using host networking for IPv6 access, Plesk Docker proxy cannot see your container ports. Use bridge network with explicit -p port mappings for Plesk, and --add-host=host.docker.internal:host-gateway to reach host Postgres.
Leave a Reply