Step-by-step installation (Windows 10/11)
- Run the installer and select your data directory. Avoid system folders; use a dedicated path like
C:\PostgreSQL\data. - Set a strong postgres superuser password. Store it securely.
- Choose port 5432 (default) unless it's already in use.
- Review components (PostgreSQL server, command-line tools). Optional: pgAdmin.
- Finish and let the installer register the Windows service.
- Open Command Prompt and run
psql --version. If it fails, fix PATH issues.
Post-install checks
Service status
Open Services (services.msc) and confirm PostgreSQL is running. If not, see the service guide.
Local connection
Run psql -U postgres and enter your password to access the local server.
Firewall note
For remote access, add an inbound rule for port 5432 and configure pg_hba.conf accordingly.
Version selection tips
This guide links to PostgreSQL 18.3-3 (64-bit). For most users on Windows 10/11, this is a stable choice. If you maintain older apps or need specific extensions, confirm compatibility before upgrading.
Troubleshooting — quick answers
“psql is not recognized”
Add the PostgreSQL bin folder to your PATH, restart the terminal, then verify with where psql. See PATH guide.
Port 5432 already in use
Choose another port (e.g., 5433) during setup. Update client DSNs and connection strings accordingly.
Service fails to start
Check data directory permissions and logs. Run Services as admin. See service guide.
Related guides
Offline Installer
Install PostgreSQL without internet access.
ODBC Drivers (x64/x86)
Choose the right psqlODBC and set up a DSN.
Configure Windows Service
Service account, startup type, and logs.
Fix PATH Issues
Resolve “psql is not recognized” fast.
Migrate from Older Versions
Backups, pg_upgrade, and post-checks.
Disclaimer: This is an unofficial resource. PostgreSQL is a registered trademark of the PostgreSQL Community Association of Canada. Links may include affiliate tracking.