Warden

My current local dev environment for Magento (goodbye Valet)


For years I ran everything natively on macOS and later moved to Valet Plus . It was fast, but it also tied my machine to specific PHP, MySQL and search versions, and every project that needed a slightly different stack meant fighting the host. These days I use Warden and I am not looking back.

Warden is a CLI that orchestrates Docker for you. Instead of installing services on your laptop, it runs a set of shared services once (a Traefik reverse proxy, a DNS resolver, Portainer and an SSL certificate authority), and then each project gets its own isolated containers: nginx, php-fpm, database, Redis, OpenSearch/Elasticsearch, RabbitMQ, Varnish… whatever the Magento stack needs. It matches production far more closely than a native setup ever did.

Warden is macOS and Linux friendly. On macOS everything installs through Homebrew .

Install Warden and the shared services

bash
brew install wardenenv/warden/warden
warden svc up

The first warden svc up starts the shared services and installs a local certificate authority (it will ask for your password once). From that point on, every project you spin up gets trusted https://*.test URLs automatically.

Start a project

From the root of your Magento project, initialise the environment and bring it up:

bash
warden env-init my-project magento2
warden env up

env-init writes a .env file with WARDEN_ENV_NAME and WARDEN_ENV_TYPE=magento2. That file is the single source of truth for the stack, so it is safe to commit and share with the team.

Next, issue an SSL certificate for the project domain and you are ready:

bash
warden sign-certificate my-project.test

Traefik now routes https://app.my-project.test to your project’s nginx container.

Working inside the containers

This is the part I use all day. Drop into the php-fpm container:

bash
warden shell

Or run one-off commands from the host without entering the container:

bash
warden env exec php-fpm bin/magento setup:upgrade
warden env exec php-fpm composer install
Tip: Keep service-level tweaks in .warden/warden-env.yml and extra services in a docker-compose.warden.yml at the project root. Never edit Warden’s generated compose files directly, they get regenerated.

Why I switched

  • It looks like production. Same services, same versions, per project.
  • Total isolation. Two projects on different PHP versions? No problem, they never touch each other or the host.
  • Disposable. Break something? warden env down -v and start clean, without polluting my laptop.
  • Shareable. The .env and a couple of override files describe the whole stack, so onboarding a teammate is minutes, not hours.

Valet Plus served me well, but for Magento work Warden is simply a better fit today.

Hope this helps.

If you have any question or a different setup you love, feel free to share in the comments below.