Getting 'Connection refused' after installing PostgreSQL and PG Admin 4 I had installed PostgreSQL Server on a machine. I had installed PGAdmin4 on another machine but when trying to connect, I am getting error on the startup of the PG Admin4 'Connection refused'.

How can I get it working?  I have just started using PostgreSQL.
Edit postgresql.conf and change listen_addresses = 'localhost' to listen_addresses = '*'
Edit pg_hba.conf file and add an entry for the IP/network you are connecting from.
To allow anyone to connect add:

host    all             all             0.0.0.0/0            md5

Only one IP (10.0.0.10):

host    all             all             10.0.0.10/32            md5
Change firewall settings on the server to allow connections to port 5432.