20 Aug 2026

PostgreSQL on Mac (Pro): Laravel and Symfony

Runtime → PostgreSQL, Stack credentials, pgsql alongside MySQL projects.

MySQL/MariaDB ship with the Free core. PostgreSQL is a Pro/Teams service: install from Settings → Runtime (Native artifacts) or in Docker mode; credentials on the Stack tab.

Install

  1. Active Pro or Teams license.
  2. Settings → Runtime → install PostgreSQL (and pgAdmin if you want).
  3. Start the service on Stack; default port 5432.
  4. .env snippets — Tools (Tools overview): DB_CONNECTION=pgsql, host 127.0.0.1, user/db macstack in Native.

In Docker mode, .env host is postgres, not 127.0.0.1. See /help/credentials-ports.

Laravel with pgsql

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=macstack
DB_USERNAME=macstack
DB_PASSWORD=macstack
php artisan migrate

One Mac can run MySQL client sites and a separate Postgres for a greenfield API — without per-repo Docker Compose.

Symfony / Doctrine

DATABASE_URL=postgresql://macstack:macstack@127.0.0.1:5432/macstack?serverVersion=16

After importing a production dump, verify server version and extensions.

Native vs Docker for Postgres

  • Native — daily driver, less overhead.
  • Docker — exact major version as production or isolated experiments.
  • Mode switch: macstack db migrate-runtime moves MySQL/MariaDB, not Postgres datasets — use pg_dump/pg_restore manually.

Service catalog: /help/services-catalog. Free vs Pro: /blog/besplatnyj-start.

MacFullStack

Try it on your Mac

Free — one PHP project and core stack. Pro unlocks Next/Django, Postgres, Share, and unlimited projects.

Download Pro Teams