Install PgAdmin 4 on Mac OS with brew: Quick Guide

Updated

pgAdmin 4 setup on a Mac

Install pgAdmin 4 on macOS with one command:

brew install --cask pgadmin4

Then launch it from Applications, or from the terminal with open -a "pgAdmin 4". It opens as a normal Mac application window — you do not browse to localhost:5050. The reason is explained below.

Everything here was run on this machine on 2026-08-09: macOS 26.6 (build 25G72), Apple silicon (arm64), Homebrew 6.0.15, pgAdmin 4 version 9.17.

Installing

If you do not have Homebrew yet:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew --version

Then install the cask. On this machine the install took just under two minutes end to end:

$ brew install --cask pgadmin4
==> Fetching downloads for: pgadmin4
==> Installing Cask pgadmin4
==> Moving App 'pgAdmin 4.app' to '/Applications/pgAdmin 4.app'
🍺  pgadmin4 was successfully installed!

real	1m59.169s

There is no separate pgadmin4 formula to choose between — brew info pgadmin4 resolves to the cask. The cask picks the right disk image for your CPU automatically (arm64 or x64) and fetches it from ftp.postgresql.org, so the same command is correct on both Apple silicon and Intel Macs.

Verify what landed:

$ defaults read "/Applications/pgAdmin 4.app/Contents/Info.plist" CFBundleShortVersionString
9.17

First launch: expect a Gatekeeper prompt

The cask leaves the standard com.apple.quarantine attribute on the app, so macOS wants your approval before the first run. This is worth knowing because of how it fails: on this machine the first launch left a pgAdmin 4 process running with no child processes, no configuration directory, and no server listening — it looked like the app had started when in fact it was blocked.

Approve it the normal way — open it once from Finder and confirm, or allow it under System Settings > Privacy & Security. Once the quarantine attribute was cleared, the same launch immediately produced the full process tree: the Electron shell, its helper processes, and the bundled Python server.

Why it is not localhost:5050

pgAdmin 4 ships in two shapes. In server mode — the container and web deployments — it is a web application and 5050 is its conventional port. The Mac application is the other shape. Its bundled configuration file Contents/Resources/web/config_distro.py contains exactly one meaningful line for this purpose:

SERVER_MODE = False

In desktop mode the app still runs a small local Python web server, but it chooses a free high port at startup and displays the interface in its own window. Three consecutive launches on this machine bound three different ports:

run 1 -> 127.0.0.1:54008
run 2 -> 127.0.0.1:54083
run 3 -> 127.0.0.1:54153

Nothing was ever listening on 5050. The value DEFAULT_SERVER_PORT = 5050 does exist in config.py — pgAdmin’s config.py reference describes it as the default port the app server listens on if not set by the runtime, and describes config_distro.py as the packager file read after it — which is almost certainly where the advice to browse to localhost:5050 came from, but it applies to server mode and is overridden here. So there is no fixed URL to bookmark, and no reason to look for one — use the app window. This page’s script checks that nothing is listening on 5050, tests the psql bundled inside the app against a temporary PostgreSQL cluster that it creates and deletes itself, and, only with PGADMIN_LAUNCH=1 set (it starts a GUI application), launches the app twice and compares the ports it binds.

You will be asked to set a master password on first run. That password encrypts the saved credentials for your database connections in ~/.pgadmin/pgadmin4.db — pgAdmin’s master password documentation states that saved server passwords are encrypted and decrypted using it; it is local to this installation and is not a database login.

It brings its own psql

A detail that saves time later: the app bundle ships PostgreSQL client binaries and points at them by default, via DEFAULT_BINARY_PATHS in the same config file. They are real and they work — the bundled psql connected to a live server in testing:

/Applications/pgAdmin 4.app/Contents/SharedSupport/
  psql  pg_dump  pg_dumpall  pg_restore

This is why pgAdmin’s backup and restore dialogs work on a fresh Mac with no separate PostgreSQL installation. If those dialogs ever complain about a version mismatch with your server, this is the path to point at a different set of binaries.

What I did not try inside the pgAdmin window

The install, the launch, the bound port, and the bundled client tools were all verified by running them. The GUI itself was not driven — connecting to a server, running queries, and using the backup dialogs require interactive use and were not exercised, so nothing here is a claim about how well those features work.

Photo of author
Sudhir P. founded HeatWare.com in 1999 and has built and operated it full-stack ever since; it is now used by more than 88,000 people. He writes here about the PostgreSQL, MySQL, Linux and DevOps work that keeps it running. Articles are rewritten only after the commands in them have actually been run, and the verification scripts are published alongside them so anyone can check the claims. Reach him at blog@heatware.net.