Hi, how can i connect my postgres database from su...
# ask-ai
n
Hi, how can i connect my postgres database from supabase to airbyte? I'm having the 08001 error code @kapa.ai
k
08001
means Airbyte can’t open a TCP connection to the Postgres host (“Connection refused” / “could not connect”). With Supabase (hosted Postgres), the most common causes are: 1. Host/port not reachable from Airbyte - If you run Airbyte locally with Docker,
localhost
inside the container is not your laptop. Use either: - Your machine’s IP address, or - The public hostname Supabase gives you (e.g.
db.xxxxx.supabase.co
). - A similar issue was fixed by using the machine IP instead of
localhost
when connecting through a local proxy.[[Cloud SQL proxy issue](https://discuss.airbyte.io/t/4251)] 2. Network / firewall / VPC rules - Make sure Supabase allows incoming traffic from where Airbyte is running (your IP, VPN, VPC, etc.). This is analogous to allowlisting Airbyte IPs when using Cloud SQL.[[Cloud SQL quick start](https://docs.airbyte.com/integrations/sources/postgres/cloud-sql-postgres#step-3-airbyte-cloud-only-allow-inbound-traffic-from-airbyte-ips)] 3. Wrong SSL settings - Supabase Postgres requires SSL. In the Airbyte Postgres connector config: - Set host to the Supabase DB host. - Port usually
5432
. - Use the Supabase database name, user, and password. - Set SSL mode to
require
or
verify-ca
depending on Supabase’s recommendation.[[Postgres destination](https://docs.airbyte.com/integrations/destinations/postgres)] 4. Basic sanity check - From the same network where Airbyte runs, confirm you can connect with
psql
or a client using the exact same host, port, user, db, and SSL settings. If
psql
can’t reach it, Airbyte won’t either.[[External DB forum](https://discuss.airbyte.io/t/729)] If you share the exact Airbyte Postgres configuration (host, port, SSL mode – with secrets redacted) and whether you’re on Airbyte Cloud or local Docker, I can map it more precisely to what the docs show.
A message from kapa.ai
08001
in the Postgres connector means Airbyte cannot open a TCP connection to the database (host/port not reachable). From the docs and forum posts, the main things to check are: 1. Host / port Supabase exposes - In Airbyte, for the Postgres source: - Host: use the Supabase Postgres host (not
localhost
and not
127.0.0.1
). - Port: usually
5432
(use the value shown in Supabase). - Similar connection-refused issues were fixed by not using
localhost
and instead using an address reachable from inside Docker / Airbyte (e.g. machine IP or remote host). [[Cloud SQL proxy](https://discuss.airbyte.io/t/4251)] 2. Network reachability -
08001
is the error you get when the database is not accepting TCP connections at that host:port. This is the same pattern seen when trying to connect Airbyte to an external Postgres and the DB isn’t reachable. [[External DB troubleshooting](https://discuss.airbyte.io/t/729)] - Ensure: - Airbyte can reach the Supabase host on port 5432 (no firewall/VPC block). - If you run Airbyte in Docker locally, remember the containers have their own network namespace. 3. SSL mode - Supabase Postgres requires SSL. In the Postgres connector config, you must: - Enable SSL. - Set SSL Mode to something like
require
(or higher), not
disable
. [[Postgres destination](https://docs.airbyte.com/integrations/destinations/postgres); [Cloud SQL quick start](https://docs.airbyte.com/integrations/sources/postgres/cloud-sql-postgres#quick-start)] - Don’t try to override
ssl
/
sslmode
through custom JDBC URL parameters; those keys are ignored/overwritten by Airbyte. [[Postgres JDBC params](https://docs.airbyte.com/integrations/sources/postgres/postgres-troubleshooting#advanced-custom-jdbc-connection-strings); [Destination JDBC params](https://docs.airbyte.com/integrations/destinations/postgres#naming-conventions)] 4. Config pattern to follow - Use the same pattern as any external managed Postgres (e.g. Cloud SQL): - Host: Supabase DB host - Port: 5432 - Database: Supabase DB name - User / Password: Supabase credentials - SSL mode:
require
or
verify-ca
(according to Supabase) [[Cloud SQL quick start](https://docs.airbyte.com/integrations/sources/postgres/cloud-sql-postgres#quick-start)] If you paste (with secrets removed) the exact Airbyte Postgres source configuration (host, port, SSL mode, any JDBC URL params) and how you’re running Airbyte (Cloud vs local Docker), I can point to the most likely misconfiguration relative to these docs.