How to Install PostgreSQL on Windows 10 or 11 |Video upload date:  · Duration: PT8M49S  · Language: EN

Step by step guide to install PostgreSQL on Windows 10 or 11 with Node and Python testing and basic configuration

Complete PostgreSQL setup on Windows 10 and 11 with pgAdmin and CLI

Want a working PostgreSQL server on Windows without crying into the Event Viewer That is doable and mildly satisfying This guide walks through the download install and basic verification steps for developers using Node and Python

What you need before you start

  • Admin access on the Windows machine
  • Internet access to grab the official installer from the PostgreSQL site or EnterpriseDB
  • Basic comfort with a terminal and editing a text file if you want to tweak config

Download and run the installer

Head to the PostgreSQL download page and pick the latest stable Windows package that matches your system architecture You do not have to be perfect about versions unless your production service depends on being precious

Run the installer and follow the prompts Choose Typical unless you like clicking lots of checkboxes Include command line tools and pgAdmin if you prefer a GUI over terminal bravado You will be asked to set a password for the postgres superuser so pick one you can remember or stash in a password manager Treat it like a small treasure

Configure PATH and optional pgAdmin

Let the installer add the command line tools to PATH or add the Postgres bin folder manually so psql works from any prompt Open pgAdmin if you want a visual way to manage databases Otherwise the CLI is faster and uglier

Start the service and verify the server is alive

The installer can start the PostgreSQL service for you or you can use the Services app to start it later Once running open a terminal and connect as the postgres superuser

psql -U postgres

Enter the password you set during install You can run a quick check to prove the server responds

SELECT version()

If that prints the server version congratulations Postgres is listening and answering questions

Quick Node and Python connection test

From Node use the popular pg package and from Python use psycopg to confirm connections These are the standard libraries and work nicely for simple checks and real apps

  • Node example high level steps install pg require and create a Client then connect
  • Python example high level steps pip install psycopg connect with connection string and run a simple query

Running a simple query like SELECT version() from each client proves credentials and network are fine

Basic security and practical production notes

For local development the default settings are usually fine If you want to allow remote access edit the listen_addresses setting in postgresql.conf and add appropriate entries and users instead of giving everyone the postgres password Remember to create dedicated users and databases for each app

Open firewall rules only for the ports and hosts you need Do not fling the database open to the internet and hope nothing bad happens

Set the PostgreSQL Windows service to start automatically if you want the server to come back after a reboot otherwise expect some sadness during morning standup

Checklist before you call it done

  • Installer downloaded from PostgreSQL or EnterpriseDB
  • Superuser password set and stored
  • Path configured so psql is usable from a terminal
  • Service started and SELECT version() returned results
  • Optional pgAdmin installed for GUI management
  • Firewall and listen_addresses adjusted for any remote access
  • Dedicated users and databases created for your apps

If you followed these steps you have a working PostgreSQL instance on Windows 10 or 11 that plays nicely with Node and Python Now go write the app and let the database quietly store your mistakes

I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!

This is a dedicated watch page for a single video.