Timeout when connecting PgAdmin4 to Droplet postgres

Hi guys,

I’m tearing my hair out!

I’ve done a tonne of research on connecting to this postgres instance, which is housed on a droplet (even just a basic connection).

So far I’ve: -Changed the postgres port on the Droplet to 5433 (I already have a local postgres server so wanted to avoid clashes?) -updated the pg_hba.conf file with

host all all (My public IP)/32 md5

  • then I’ve changed the postgresql.conf file:

listen_addresses = '*'

  • changed the postgres password to 1234 for my ‘postgres’ user (otherwise it would have no p/w)

  • restarted postgresql on the droplet.

Now I’m trying to set up a server on PgAdmin4 and using the Droplet IP as the Host Name, port 5433, username postgres and password 1234. No role or service.

Result is: ‘Unable to connect to server: timeout expired’

I’ve tried changing pg_hba to ‘trust’ instead, and to allowing all IPs (, but I’m just not getting anything back from the droplet at all.

Any ideas?


Hi , Did u find solution to this? I am also facing the same issue.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there @simondavidmusic01,

What I could suggest is to run the following command to check if your PostgreSQL service is listening on

netstat -plant

Another thing that I could suggest is to use an SSH tunnel with your SQL client rather than allowing direct access to the database for the whole world.

Regards, Bobby