What Is Lerd?
Lerd is a free, MIT-licensed local development environment for Linux and macOS that aims to deliver the full Laravel Herd Pro experience — dump viewer, mail capture, database services, profiler — without a paywall or a telemetry opt-out. Run lerd link inside any project and it is immediately available at project.test with trusted HTTPS, its own PHP version, and all required services running.
cd ~/code/my-app
lerd link
# → detecting framework… Laravel
# → php 8.4 · node 22 · nginx vhost written
# → https://my-app.test
How It Works Under the Hood
Lerd runs everything as rootless Podman containers wired into systemd user services on Linux and launchd on macOS. There is no daemon running as root. Each project gets:
- Its own PHP version, from 8.5 down to a frozen 7.4 legacy tier
- Per-project Node via bundled fnm or an existing nvm, plus Bun as a first-class JS runtime
- Optional FrankenPHP per site as an alternative to PHP-FPM, with Laravel Octane worker mode
Framework detection covers Laravel, Symfony, WordPress, Magento, and over a dozen others, each with the correct nginx rules and env handling pulled from a versioned community store that updates independently of releases. Non-PHP projects — Node, Python, Go — can sit behind their own .test domain as a host-proxy site.
Debugging Without Installing Anything Extra
Lerd intercepts every dump() and dd() call and streams it to the dashboard alongside:
- SQL queries with N+1 and slow-query detection
- Outgoing mail captured by a built-in Mailpit instance
- Rendered views, events, queued jobs, and outgoing HTTP — all grouped per request
The built-in SPX profiler converts any request into a flame graph with one click, no FPM restart required. A per-site timing view fed from the nginx access log surfaces the slowest routes by recent p95, and a Tinker tab provides an in-browser PHP REPL with project-aware autocomplete.
Git Worktrees With Isolated Databases
Each git worktree gets its own subdomain and its own database. Run migrations on a feature branch without touching main's data, then switch back and find everything exactly as you left it. Each worktree can pin its own PHP and Node version, runs its own Vite worker, and serves assets under the site's .test hostname rather than localhost:5173. The lerd worktree wait command lets a script or AI coding agent block until a fresh checkout is fully provisioned.
Services, Sharing, and the Dashboard
MySQL, PostgreSQL, Redis, Mailpit, and other services install with one click from an independently updated store. Databases can be created, dropped, exported, imported, or snapshotted from the dashboard. JetBrains IDEs are wired automatically — a linked project receives a data source pointed at its own Lerd database.
Sharing options include LAN share with a QR code, public tunnels via Cloudflare, ngrok, or Pinggy, and stable URLs on a domain you control.
The web UI ships in fourteen languages, installs as a PWA, and covers live logs, a global command palette, and in-browser editing of nginx configs, php.ini, and .env files with validation and timestamped backups. Prefer the terminal? lerd tui opens a btop-style dashboard suited to tmux and SSH workflows.
MCP Server for AI-Assisted Workflows
Lerd ships an MCP server so assistants like Claude Code, Cursor, or Copilot can scaffold projects, run migrations, switch PHP versions, and read logs directly. The route_timing and optimize_route tools hand the assistant a slow route together with its N+1 queries and CPU hotspots.
macOS Trade-Off Worth Knowing
On macOS, Lerd runs its containers inside a lightweight Podman VM, so it will not be as lightweight as Herd's native processes. If you are already paying for Herd Pro and happy with it, there is no urgent reason to switch. If you have been holding off on the Pro subscription, Lerd covers everything behind that paywall at no cost.
Key Takeaways
- Fully free and open source under MIT — no Pro tier, no telemetry, no account required
- Linux support is a first-class citizen, not an afterthought
- Per-branch database isolation for git worktrees is a feature Herd does not offer
- Rootless Podman means no daemon running as root on either platform
- MCP server enables AI coding agents to manage the local environment directly
- Install with a single command:
curl -fsSL https://lerd.sh/install.sh | bash
Ubuntu and Debian users can install via the PPA with apt; NixOS has a dedicated flake; Windows is supported through WSL2 (currently in beta).
Source: Lerd: A Free, Open Source Herd Alternative for Linux and macOS — Laravel News