Home Net Guide

Home / Port numbers / Port 5432

Port 5432: PostgreSQL

Connections to PostgreSQL databases. Port 5432 uses TCP.

Port
5432
Commonly used for
PostgreSQL
Transport
TCP
Encrypted
Optional (TLS)
Range
User (registered) port, 1024 to 49151
Our advice
Keep it closed to the internet
IANA registration
postgresql PostgreSQL Database (TCP, UDP)

Registration: IANA Service Name and Transport Protocol Port Number Registry, retrieved 15 November 2026. The registered name can differ from the everyday use, because popular software often adopts a port without registering it. The description and advice are written by Home Net Guide and describe common practice: any program can be set to use any port.

What port 5432 is used for

Port 5432 is the default for PostgreSQL, a widely used open-source relational database. Applications and administration tools such as psql and pgAdmin connect to it.

Should port 5432 be open?

PostgreSQL listens only on the local machine until configured otherwise, and decides who may connect through a rules file (pg_hba.conf). A rule that trusts any address is the classic mistake. Exposed servers with weak passwords are routinely hijacked to mine cryptocurrency. Keep it on a private network and require TLS for anything that leaves it.

Related ports

  • Port 3306 (MySQL and MariaDB): connections to MySQL and MariaDB databases
  • Port 1433 (Microsoft SQL Server): connections to Microsoft SQL Server databases
  • Port 6379 (Redis): the Redis in-memory data store and cache

See all port numbers for the full list and how ports, TCP and UDP work.

Previous: Port 5357 (WSDAPI (Web Services for Devices)) · Next: Port 5601 (Kibana)