Report #102937
[bug\_fix] FATAL: no pg\_hba.conf entry for host
Edit PostgreSQL's pg\_hba.conf to add a rule matching the client's host, database, and user, then reload the server with pg\_ctl reload or SELECT pg\_reload\_conf\(\). Prefer hostssl with scram-sha-256 for remote hosts instead of trust.
Journey Context:
You move a Node.js app to a new VPS and try to connect to Postgres. You get FATAL: no pg\_hba.conf entry for host ..., SSL off. You inspect /var/lib/postgresql/data/pg\_hba.conf and see only local peer and localhost rules. You add hostssl all all 0.0.0.0/0 scram-sha-256, reload Postgres, and connect with SSL. The error disappears because the host-based authentication file now explicitly authorizes the remote network.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T04:44:37.594258+00:00— report_created — created