Configure via Services (services.msc)
- Open the Windows Services console and locate the PostgreSQL service.
- Open Properties → General and set Startup type to Automatic (Delayed Start).
- In Log On, select a dedicated account with minimal privileges, and provide credentials if needed.
- In Recovery, set First failure and Second failure to Restart the Service. Configure the restart delay.
- Apply changes, then Start or Restart the service to validate.
Manual registration (overview)
If you installed PostgreSQL from binaries or need a custom setup, you can register it as a service using supported tools. Ensure the service account has access to the data directory and the executable. Prefer the official installer for simplicity.
Logs and rotation
Default location
By default, server logs reside inside the data directory. Check your configuration to confirm the exact path.
Rotation basics
Use built‑in logging settings to rotate logs regularly and avoid large files. Adjust retention to your policy.
Permissions
Ensure the service account can write to the log directory and the data folder without excessive privileges.
Firewall and remote access
To allow remote connections, create an inbound rule for the PostgreSQL port (default 5432) in Windows Defender Firewall, and configure client access in your server settings. Limit exposure to trusted networks.
Troubleshooting — quick answers
Service won’t start
Check data directory permissions and verify that configuration paths are correct. Review the latest server logs for details.
Starts, then stops
Inspect logs for fatal errors. Ensure the port is free and the service account can access required files.
Wrong account
Switch to a dedicated least‑privilege account in the service Log On tab and restart the service.
Related guides
Download & Install
Install the PostgreSQL server on Windows 10/11.
Fix PATH Issues
Resolve “psql is not recognized” fast.
Offline Installer
Install PostgreSQL without internet access.
ODBC Drivers (x64/x86)
Choose the right psqlODBC and set up a DSN.
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.