Never expose to the internet

Port 5432 — PostgreSQL

The default PostgreSQL port.

Port
5432
Service
PostgreSQL
Protocol
TCP

Security guidance

Private network only. If you must expose it, require TLS with client certificates and restrict by IP.

Is port 5432 open on your server?

Test it from outside your network — the only view that matters.

Check port 5432