DEV Community

[Comment from a deleted post]
Collapse
 
dmfay profile image
Dian Fay • Edited

Postgres' authentication settings are stored in $datadir/pg_hba.conf. To allow access over the network, you'll need to add an entry with host type, an IP mask that includes the computer you're connecting from, and a suitable authentication method (the current standard is scram-sha-256). After changing pg_hba.conf issue select pg_reload_conf(); in psql or pg_ctl reload from the shell to get the server to read the new configuration.

Oh, and make sure port 5432 (by default) is open.

Collapse
 
doylecodes profile image
Ryan Doyle

Ok thanks. Am I correct in that all I need is Postgres running on my virtual server with Ubuntu, or am I also needing something like Apache?

Collapse
 
dmfay profile image
Dian Fay

Just Postgres. Database servers (like Postgres) and web servers (like Apache) both handle comms their own way.