[HELP] Metabase install issue - Can't connect to postgres database

I'm unable to install Metabase.

I'm using a Postgres DB and Docker. I'm trying to get persistant storage as outlined in the Metabase Install Instructions page.

Below are the steps I've followed.

  1. Created a new DO droplet with Docker

  2. Installed postgres. Created a superuser userrole. Created a database

  3. Modified postgresql.conf to allow listen addresses as 172.17.0.0/16 so that all the postgres db is expecting connections for all possible Docker IP's addresses

  4. Modified pb_hba.conf so that all docker container IP's are allowed to connect to the postgres db
    image

  5. Restarted postgres

  6. Initialized Metabase with the following command:
    yes, my dbname and username for the postgres database are the same
    image

And this is the error I get

What am I doing wrong?

Thanks!

Hi @akash47
You’re allowing the 172.17 subnet to connect to Postgres, but you’re telling Metabase to use an external IP.
You might want to look at this docker-compose examples:
https://medium.com/@martinahindura/how-to-setup-metabase-with-postgresql-and-docker-compose-bf4cc7e7f899
https://github.com/metabase/metabase/issues/12100
Otherwise I would recommend stackoverflow.com, since your problem is more specific to Docker and networking than it is to Metabase.

Got it, thanks @flamber