This is an unofficial guide. The official installer is provided by EDB at postgresql.org/download/windows.
Installation
Install PostgreSQL on Windows step by step
- 1
Download the installer
Use the download button above to get
postgresql-18.3-3-windows-x64.exe. Approximately 300 MB, includes all components. - 2
Run as Administrator
Right-click the .exe → Run as administrator. Accept the UAC prompt. The setup wizard opens.
- 3
Select components
Check: PostgreSQL Server, pgAdmin 4, Command Line Tools. Stack Builder is optional — skip unless you need extra drivers.
- 4
Set superuser password
Enter a strong password for the
postgressuperuser. Store it securely — this is the master password for your database server. - 5
Verify install
C:\> psql -U postgres -c "SELECT version();"Password for user postgres:PostgreSQL 18.3, compiled by Visual C++ build 1940, 64-bitIf psql is not recognized, see Fix PATH issues.
Post-install checks
Verify your PostgreSQL installation
# Check service is running:
C:\> sc query postgresql-x64-18
STATE : 4 RUNNING
# Verify port 5432 is listening:
C:\> netstat -ano | findstr 5432
TCP 0.0.0.0:5432 0.0.0.0:0 LISTENING
Version guide
Which PostgreSQL version should I install?
| Version | Status | End of Life | Recommended for |
|---|---|---|---|
| 18.3 | Latest stable | Nov 2029 | New installations |
| 17.x | Supported | Nov 2029 | Existing 17 deployments |
| 16.x | Supported | Nov 2028 | Existing 16 deployments |
| 14.x or older | Near EOL | Nov 2026 | Plan upgrade now |
FAQ
Install questions
Why does the installer require Administrator rights?
PostgreSQL installs to Program Files and registers a Windows service, both of which require admin privileges. The service itself runs under NetworkService, not your admin account.
Can I install multiple PostgreSQL versions side by side?
Yes. Each major version installs to its own directory and uses a different port. You can run PostgreSQL 16, 17 and 18 simultaneously on the same machine.
What is Stack Builder and do I need it?
Stack Builder downloads additional drivers and tools (JDBC, .NET connector, PostGIS). Skip it during install and run it later from the Start menu if needed.
psql is not recognized after installing
Open a new Command Prompt or PowerShell window after install. PATH changes only take effect in new terminal sessions. If still failing, see Fix PATH issues.