Get location of postgresql.conf

$ psql -U postgres -c 'SHOW config\_file'

Append to postgresql.conf

listen_addresses = '*'

Append to pg_hba.conf (Same location as postgresql.conf)

host  all  all  0.0.0.0/0  md5
host  all  all  ::/0       md5

Restart PostgreSQL server

$ sudo systemctl restart postgresql
Comments