4

I recently setup an instance of Airbyte on my local machine using a Docker container. I also have a local instance of Postgres running which I would like to use as a data source in Airbyte. It seems like I cannot connect to the local Postgres instance because of the Docker container. Any thoughts on how to establish this connectivity?

3 Answers 3

13

I joined the Airbyte Slack channel and was told to use host.docker.internal instead of "localhost" or "127.0.0.1" and it worked.

Sign up to request clarification or add additional context in comments.

Comments

2

zadroga's answer is partially correct. Adding to that you have to also edit the postgresql.conf and pg_hba.conf files (which are located in the Postgresql installation folder /usr/local/var/postgresql).

In postgresql.conf make sure to add the following line.

listen_addresses = '*'

In pg_hba.conf,

host all all 0.0.0.0/0 md5

Then restart the Postgresql server.

Now try to connect to Postgresql server in Airbyte using the following config.

Host: host.docker.internal
Port: 5432
Database Name: your_database
Database User: your_username
Database Password: your_password

1 Comment

I assume you mean the .conf files at /etc/postgresql/xx/main/ because on Ubuntu by default there are no Postgres files at /usr/local/var/. In either case, making the changes you and zadroga suggested on the conf files on the local host and using the suggested details on the Airbyte connection page still doesn't work.. Maybe something else is still amiss.
0

I had the same problem. Is it difficult to issue a URL for external publication when using ngrok?

ngrok tcp 5432

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.