Skills Required: Intermediate terminal knowledge.

Along with basic terminal commands, you should also already know what shell you’re using, how to configure it, how to use auto-completion while typing commands, and have a decent understanding of file permissions.

The sensible way to install Postgres on a Mac is to use one of the recommended macOS package installers. Building from source is “only recommended for people developing PostgreSQL or extensions.”

But if you’re comfortable using a terminal and determined enough (or required), the directions for installing PostgreSQL from source on Unix-compatible platforms are relatively simple and only require a few modifications (steps #2 and #4) to work on macOS.

  1. Download and install postgres
  2. Create postgres user (on macOS)
  3. Start the server and configure your environment
  4. Start the server automatically (on macOS)

Tested with PostgreSQL 14 on macOS Big Sur (11) and Monterey (12).