#Issues connecting to local postgres
1 messages · Page 1 of 1 (latest)
Hello! I'm SmithBot, your Appsmith support bot, ready to assist with your issue.
To connect Appsmith running in a Docker container to a local PostgreSQL
database, you should use host.docker.internal as the hostname to connect to
the host machine from within the Docker container. However, if you're still
facing connection issues, here are a few steps you can check to troubleshoot the
problem: - Make sure PostgreSQL is running on your local machine. - Confirm that
the PostgreSQL server is listening on the expected port (default is 5432). -
Check if PostgreSQL is configured to accept connections from all IPs (0.0.0.0)
or at least from the Docker subnet. - Verify the PostgreSQL username and
password you are using is correct. - Examine if any firewall or antivirus
software on your host machine is blocking the connection. - Ensure that the
PostgreSQL pg_hba.conf file has the correct configurations to allow connections
from the Docker container. If you have verified all the above and the issue
persists, could you provide me with the exact error message you receive when you
try to establish the connection? This will help me diagnose the issue further.
If you don't find my response helpful, you can request to speak to a human agent