Per-project databases, provisioned in one click
Pick an engine, name the instance, click Create. PortBay initialises an isolated data directory, allocates a port, supervises the process, and injects the connection into your project on every start.
How do I run a separate local database for each project on a Mac?
Per-project isolation means each database gets its own data directory, its own port and its own config file, instead of one global Homebrew daemon on :3306 that every project's migrations collide inside. By hand that is mysqld --initialize-insecure --datadir ~/db/blog, a port you have to remember, a DATABASE_URL line in .env, and something to bring it all back after a reboot — repeated per project. PortBay provisions and supervises those instances for six engines: MySQL, MariaDB, PostgreSQL, Redis, MongoDB and Memcached, each run under Process Compose, the same supervision layer as your dev servers. Link one to a project and DATABASE_URL, DB_CONNECTION, DB_HOST, DB_PORT, DB_USERNAME and DB_PASSWORD are injected into the project's process on every start, with your own env values still winning. A Client button opens mysql, psql, mongosh or redis-cli already pointed at the instance.
Verified against the product, 2026-07-10.
Provisioned, wired, supervised
An instance is created with its own data directory and port, the connection variables reach the linked project, and captured mail shows the services panel working as one.
From engine to connected app
- Add a database
- Link it to a project
- Open a client when you need SQL
- Let supervision do the babysitting
- Remove without losing data
Add a database
Pick an engine, name the instance, optionally choose a port (auto-allocated otherwise). First-time MySQL and PostgreSQL initialisation runs in the background and can take a minute or two.
mysql://[email protected]:3306/Link it to a project
On the project's next start, PortBay injects DATABASE_URL, DB_CONNECTION, DB_HOST, DB_PORT, DB_USERNAME and DB_PASSWORD into its process. Your per-project env overrides always win, and unlinking is one click.
Open a client when you need SQL
The Client button resolves the engine's CLI and opens it in your terminal, preconfigured for the instance's port.
psql -U postgres -h 127.0.0.1 -p 5432 postgresLet supervision do the babysitting
Start, stop and restart from the detail panel with live status. Auto-start brings the instances you rely on up with the app.
Remove without losing data
Deregister-only stops the daemon and keeps the data directory, so re-adding the instance later reuses it. Delete removes the data too, and says so before it does.
Databases, tier by tier
MySQL, MariaDB, PostgreSQL, Redis, MongoDB, Memcached.
Engine binaries install once per engine via Homebrew; the wizard shows the command when one is missing.
The engines it provisions
One shared Homebrew MySQL for everything
The manual route is a single global daemon every project fights over, or a hand-rolled data directory and port per project that you must remember to wire in.
PortBay keeps each instance isolated and supervised, and the connection variables arrive on every start instead of living in a stale .env.
$ brew install mysql && brew services start mysql# One global instance on :3306 — every project's migrations collide. # Per-project isolation, by hand:$ mysqld --initialize-insecure --datadir ~/db/blog$ mysqld --datadir ~/db/blog --port 3307 & # remember the port$ echo "DATABASE_URL=mysql://[email protected]:3307/blog" >> .env# Second project: another datadir, another port, another .env edit.# Reboot: nothing comes back up unless you scripted that too.
One app, not a stack of tools
HTTPS + .test domains
https://name.test per project: mkcert certificates, managed local DNS and a bundled Caddy edge, with expiry and reissue in view.
Explore →Agent dev environment
Stack detection, runtimes, HTTPS, databases and mail, provisioned per project — the running app your agents verify their work against.
Explore →Agent task board
A Kanban board both you and your agents work. Cards are Markdown in the repo; moving one to To Do dispatches the agent.
Explore →Asked before downloading
Which database engines does PortBay manage?
MySQL, MariaDB, PostgreSQL, Redis, MongoDB and Memcached. Each instance gets an isolated data directory, an engine-specific config file and a dedicated port, and the version is detected from the daemon binary at create time.
How does my app get database connection details from PortBay?
Link the instance to the project. On every PortBay-managed start, DATABASE_URL, DB_CONNECTION, DB_HOST, DB_PORT, DB_USERNAME and DB_PASSWORD are injected into the project's process. They are not written into your .env file, and your own per-project env values override them.
Do I need to install a database engine before PortBay can provision one?
The engine's binary, once per engine, via Homebrew (for example brew install mysql or brew install postgresql@16). The Add Database wizard detects a missing binary and shows the exact install command.
Can two projects each have their own MySQL?
Yes. Create one instance per project: each gets its own data directory, config and port, so migrations and data never collide. MySQL and MariaDB can even coexist; whichever is added second is auto-allocated a different port.
What happens to my data when I remove a PortBay database instance?
Your choice, stated in the dialog: deregister-only keeps the data directory on disk so re-adding the instance later reuses it, while delete-and-deregister removes the data too and is irreversible.

Give your projects and your agents a real local home.
Download for macOSFree & open source · macOS 11+ on Apple Silicon · Pro from $10/mo