PORT 5432 / TCPDatabase & CacheExposure Risk: Critical
Port 5432: PostgreSQL — PostgreSQL Database Server & Supabase Local
Standard port for PostgreSQL connections. Used by Prisma, Drizzle, TypeORM, and backend services.
Default Service
PostgreSQL
Process: postgres
Transport Protocol
TCP
IANA Registered Port 5432
Docker Port Flag
-p 5432:5432
Container to Host Mapping
How to Check & Kill Process on Port 5432 (EADDRINUSE Fix)
macOS & Linux (lsof / kill)
# Find process using port 5432 sudo lsof -i :5432 # Instantly kill process on port 5432 lsof -ti:5432 | xargs kill -9
Windows (PowerShell & CMD)
# Find PID listening on port 5432 netstat -ano | findstr :5432 # Force kill by PID taskkill /PID <PID_NUMBER> /F
Cross-Platform Node.js One-Liner
# Kill port 5432 via npx npx kill-port 5432 # Or diagnose via Castov CLI npx castov fix "EADDRINUSE :::5432"
Linux Firewall (UFW) & Connectivity Test
# Test if port 5432 is reachable nc -zv localhost 5432 # Allow or deny port 5432 in UFW sudo ufw allow 5432/tcp
Frequently Asked Questions about Port 5432
What is Port 5432 used for?
Port 5432 is the standard network port for PostgreSQL (PostgreSQL Database Server & Supabase Local) operating over TCP. The typical system daemon or process is postgres.
How do I kill a process running on Port 5432 (EADDRINUSE)?
On macOS and Linux, run: lsof -ti:5432 | xargs kill -9 (or npx kill-port 5432). On Windows PowerShell/CMD, run: netstat -ano | findstr :5432 and then taskkill /PID <PID> /F.
Is it safe to expose Port 5432 to the internet?
Port 5432 has a Critical security risk profile. Standard port for PostgreSQL connections. Used by Prisma, Drizzle, TypeORM, and backend services.