CLI tool
lerd-env/lerd avatar
lerd-env/lerd

Lerd: A Rootless, Podman-Native PHP Development Environment for Linux

Project brief: Open-source, Herd-like local PHP development environment for Linux and macOS. Automatic .test domains, per-project PHP/Node isolation, one-command TLS. Podman-native, rootless.

1,288 stars78 forksGoMIT

At a glance

What is it?
Lerd is an open-source, Herd-like local PHP environment that runs Nginx and PHP-FPM in rootless Podman containers, offering automatic .test domains and per-project PHP versions. It targets Linux and macOS developers who want a Docker-free, sudo-free setup.
Who is it for?
Adopt Lerd if you are a PHP developer on Linux or macOS who wants a Docker-free, rootless environment with automatic .test domains and per-project PHP versions, and you are comfortable with Podman. Skip it if you rely on Docker-specific workflows or Windows without WSL2, as Windows support is only beta.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What Lerd Solves for PHP Developers

Lerd addresses the friction of setting up a local PHP development environment on Linux and macOS. Traditional setups often require installing Nginx, PHP-FPM, and a database manually, or using Docker with a sudo daemon. Lerd instead runs these services as rootless Podman containers, eliminating the need for sudo and system-wide package pollution. The project is designed for PHP developers working with Laravel, Symfony, WordPress, Drupal, Magento, CakePHP, Statamic, or custom frameworks. With a single `lerd link` command, a project becomes reachable at `project.test` with HTTPS. This is a concrete alternative to Laravel Herd, which is macOS-only and Docker-based, whereas Lerd is Linux-first and Podman-native.

How Lerd Works: Rootless Podman and Automatic DNS

Lerd's architecture centers on rootless Podman containers. The README states it runs Nginx, PHP-FPM, and services as rootless containers, with no Docker and no sudo. The DNS and TLS handling is automatic: a project gets a `.test` domain and a certificate that reissues before expiry, without requiring dnsmasq or system resolver changes. The DNS can be toggled with `dns:enable`, `dns:disable`, or `dns:repair`, and you can opt out of lerd-managed DNS for `*.localhost`. This design avoids system-level changes, which is a key differentiator from tools that modify `/etc/hosts` or run a privileged DNS proxy. The Web UI provides a dashboard for managing sites and services, and the TUI (`lerd tui`) offers a btop-style terminal interface.

Getting Started: Commands and Configuration

The README gives a clear starting point: `lerd link` makes a project live at `project.test` with HTTPS. The project also includes `lerd worktree wait`, which blocks until a git worktree is provisioned, and `lerd profile run` for profiling a one-shot artisan or CLI command. The `lerd man` command reads the same documentation that ships inside the binary, which is useful offline. Configuration is per-project: you can set PHP versions from 8.1 to 8.5, plus a legacy tier for 7.4 and 8.0. Custom extensions and Alpine packages are declared once and applied to every image Lerd builds. Node.js isolation is available via fnm or nvm, with Node 22 or 24, or bun as an alternative runtime. The Web UI allows installing and removing PHP and Node versions, and the `+` button in Sites scaffolds a project from the framework store.

Per-Project Isolation and Framework Awareness

Lerd's core value is per-project isolation. Each project can have its own PHP version, Node version, and database. The README mentions that workers, env values, and the nginx vhost are configured when you link a project. The env file is written in place, meaning it adapts to what your framework reads: `.env` for Laravel, `wp-config.php` for WordPress, `env.php` for Magento, or `settings.php` for Drupal. This is a real convenience, but it also means Lerd must know about each framework. The framework store includes definitions for Laravel, Symfony, WordPress, Drupal, Magento, CakePHP, CodeIgniter, Statamic, and Tempest, with versioned auto-detection back to PHP 7.4. The store updates independently of Lerd releases, so a new framework definition can be published without waiting for a new Lerd version. However, if you use an obscure or custom framework, you may need to write your own definition, which the documentation does not fully detail.

Site Groups, Worktrees, and Host Proxies

Lerd supports grouping related sites so a main site owns a base domain and secondary sites occupy subdomains, with shared or separate databases per secondary. This is useful for multi-site projects. Git worktrees are a first-class feature: auto-detected branch domains, per-worktree PHP and Node versions, optional database isolation, and wildcard cert SANs. A bare `git worktree add` is provisioned automatically, and `lerd worktree wait` blocks until the tree is ready. This is a strong feature for teams that use worktrees for parallel development. Host-proxy sites let you run a Node, Python, Go, or any non-PHP dev server on the host and have Nginx serve it at a `.test` domain with HTTPS. This covers frontend dev servers, and the README mentions that a wedged dev server can be bounced from the site header without using a terminal.

Debugging, Profiling, and Observability

Lerd includes a debug window that intercepts every `dump()` and `dd()` and streams it to the dashboard, TUI, MCP, and `lerd dump tail`. It captures SQL with N+1 and slow-query detection, plus mail, views, events, queued jobs, and outgoing HTTP, on Laravel and Symfony. The SPX profiler can be toggled with one click, and every PHP-FPM request becomes a flame graph in the dashboard, with no FPM restart. Request timing analytics provide a durable per-site view of typical and p95 response times, throughput, error rate, and slowest routes. This is a substantial debugging toolkit, but it is tied to Laravel and Symfony. If you use a different framework, these features may not work, and the README does not promise support beyond those two.

Services, Databases, and Host Tooling

Lerd offers one-click services such as MySQL, PostgreSQL, Redis, Meilisearch, RustFS, Mailpit, Reverb, and OpenSearch. The default stack is built in, and add-ons come from a store that updates without a Lerd release. You can create, drop, snapshot, export, and import databases from the service page. A notable feature is host tools that reach the container: `psql`, `mysql`, and `pg_dump` run on your host against Lerd's engines, with no client installed and no port to remember. This is practical because you can use your IDE's phpstan or php-cs-fixer with shims that run in the project's PHP container. The IDE database wiring for JetBrains creates a data source pointed at the project's database on the host port it actually answers on. This reduces setup friction, but it only works with JetBrains IDEs, not VS Code or other editors.

Limitations and Alternatives

Lerd's main limitation is its dependency on Podman. If you are already invested in Docker, migrating to Podman may be a hurdle. Windows support is beta and only through WSL2, so Windows-native developers will find it incomplete. The debug window and request timing features are only for Laravel and Symfony, so other frameworks miss out on those. The framework store is a strength, but it also means you rely on community definitions; a niche framework may not be covered. A real alternative is Laravel Herd, which is macOS-only and Docker-based. Herd offers a polished GUI and is tightly integrated with Laravel, but it does not run on Linux. Another alternative is Valet, which is also macOS-focused and uses Nginx directly on the host, not containers. Lerd's approach of rootless Podman containers is distinct because it provides isolation without sudo, which is a genuine trade-off: you get container isolation, but you must learn Podman's quirks.

Editorial conclusion

Adopt Lerd if you are a PHP developer on Linux or macOS who wants a Docker-free, rootless environment with automatic .test domains and per-project PHP versions, and you are comfortable with Podman. Skip it if you rely on Docker-specific workflows or Windows without WSL2, as Windows support is only beta. Before adopting, verify that your frameworks are covered by the framework store, test the git worktree provisioning with your workflow, and confirm that the Web UI's remote-access credentials meet your security needs.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes