Laradock alternative
Laradock solved a real problem: every service a PHP project might want, prebuilt, behind one docker-compose.yml. The cost is the shape it leaves behind. A laradock/ submodule inside the repo, a Compose file and an .env to keep in sync, a workspace container you have to shell into before you can run artisan or composer, images that build from source the first time, and one full stack per project when you have four projects open.
Lerd keeps the useful half and drops the rest. One shared nginx, one PHP-FPM per version and one instance of each service, all as rootless Podman containers under your own user. Every project gets a .test domain and a trusted certificate automatically. Nothing is committed to the repo, nothing is built from source, and composer and artisan run from your own shell.
curl -fsSL https://lerd.sh/install.sh | bash
cd ~/code/myapp
lerd linkYour project is live at https://myapp.test. No Compose file, no workspace container, no port to remember.
Every Laradock habit, and the Lerd equivalent
| What you did in Laradock | The same thing in Lerd |
|---|---|
docker compose up -d nginx mysql redis before you can work | lerd start once, then everything is up for every project |
docker compose exec workspace bash to reach PHP tooling | lerd php, lerd composer, lerd artisan, run from your own shell in the project directory |
Edit laradock/.env, set PHP_VERSION, rebuild the image | lerd isolate 8.4, or let it read composer.json, no rebuild |
A laradock/nginx/sites/*.conf per project, plus /etc/hosts entries | An nginx vhost generated on lerd link, and the .test hostname registered for you |
| Self-signed cert wired in by hand, or plain HTTP | lerd secure, a real mkcert certificate trusted by your system and browsers |
Uncomment a service in docker-compose.yml and rebuild | lerd service start mongodb, shared across every site |
APP_CODE_PATH_HOST pointing at a sibling project directory | Projects live wherever you keep them, there is no parent folder to respect |
docker compose logs -f php-fpm | A log viewer in the dashboard, or lerd logs |
| Queue and scheduler as extra Compose services | lerd worker start queue / schedule, as systemd user services with self-healing |
laradock/ submodule committed to the repo | .lerd.yaml, optional, a handful of lines |
| Docker Desktop, or Docker Engine plus a daemon running as root | Rootless Podman, no daemon, no root |
Lerd vs Laradock
| Lerd | Laradock | |
|---|---|---|
| Platforms | Linux (systemd), macOS, Windows via WSL2 (beta) | Linux, macOS, Windows |
| License | Open source (MIT) | Open source (MIT) |
| Container runtime | Rootless Podman, no daemon | Docker, with a root daemon or Docker Desktop |
| Architecture | One shared nginx, PHP-FPM and service layer across every site | A per-project Compose stack, one container per service |
| RAM with 5 projects running | ~200 MB | Several GB, five full stacks |
| First run | Pulls prebuilt images, minutes | Builds images from source, often much longer |
| PHP versions | 7.4, 8.0 to 8.5, per project, no rebuild | Set in laradock/.env, rebuild the image to change |
.test domains | Automatic, through a dnsmasq container | Manual /etc/hosts entries plus a site conf per project |
| HTTPS | lerd secure, trusted mkcert certificate | Bring your own certificate and wire it into the nginx conf |
| Running tooling | lerd artisan, lerd composer, lerd node from your own shell | docker compose exec workspace first |
| Files in the repo | None required, .lerd.yaml optional | laradock/ submodule, docker-compose.yml, its own .env |
| Works on a client repo you cannot modify | Yes, just lerd link | Only if you can add Laradock to it |
| Per-project service versions | No, services are shared and versioned globally | Yes, each project pins its own |
| Dashboard | Web UI at 127.0.0.1:7073, system tray, terminal dashboard | CLI, plus whatever Docker Desktop shows |
| AI / MCP | Built-in MCP server for Claude Code, Cursor, Junie and Windsurf | Not built in |
Choose Laradock when: two projects genuinely need different major versions of the same database at the same time, your team already standardised on it, or you want the environment fully described inside the repo.
Choose Lerd when: you work across several projects at once and do not want a stack per repo, you are tired of rebuilding images to change a PHP version, you want .test URLs and HTTPS without wiring them, or you want to work on repos you cannot add files to.
Moving a Laradock project to Lerd
There is no automated importer for Laradock the way there is for Laravel Sail, because Laradock stacks vary too much to migrate blind. The manual path is five commands.
1. Dump the database while Laradock is still up. From the laradock/ directory:
docker compose up -d mysql
docker compose exec mysql mysqldump -u root -proot myapp > ~/myapp.sqlFor PostgreSQL:
docker compose exec postgres pg_dump -U default myapp > ~/myapp.sqlUse whatever credentials your laradock/.env actually sets, they are commonly root / root for MySQL and default / secret for PostgreSQL.
2. Move the project out of the Laradock layout. Laradock expects the project to sit beside the laradock/ checkout, pointed at by APP_CODE_PATH_HOST. Lerd has no such requirement, so the project directory can go anywhere, for example ~/code/myapp.
3. Install Lerd and start it.
curl -fsSL https://lerd.sh/install.sh | bash
lerd start4. Link the project.
cd ~/code/myapp
lerd linkLerd detects the framework, picks the PHP version from composer.json, writes the nginx vhost, registers myapp.test and provisions the certificate. Use lerd init instead if you want to choose the PHP version, HTTPS and services through a wizard and save the answers to .lerd.yaml.
5. Start the services and restore the dump.
lerd service start mysql
lerd env
lerd db:import ~/myapp.sqllerd env rewrites the DB_*, REDIS_* and MAIL_* entries in .env to match the services Lerd is running, so the connection values line up without you editing them. The original file is saved as .env.before_lerd the first time, and lerd env:restore puts it back if you want to return to Laradock.
6. Delete the Laradock leftovers. The laradock/ submodule, the Compose file and its .env no longer do anything. Laradock's persistent data lives outside the repo in ~/.laradock/data, so remove that too once you have confirmed the import.
Full detail lives in the quick start and the site management guide.
What is genuinely different
These are the places where the mental model changes, worth knowing before you commit to the move:
- Services are shared, not per project. One MySQL, one Redis, one Mailpit across every site. That is where the memory saving comes from, and it is also the one thing Laradock does that Lerd does not: pinning a different MySQL major version per project.
- No workspace container. PHP tooling runs through
lerd php,lerd composerandlerd artisan, which execute in the project's PHP container but from your own shell, in your own directory, with your own files. There is nothing toexecinto first. - The environment is not in the repo. Instead of a committed Compose file, you commit an optional
.lerd.yamldescribing the PHP version, Node version, services and workers. A teammate with Lerd installed gets the same environment from it; a teammate without Lerd is unaffected, since nothing else in the project changed. - Nginx, not Apache. If a project leaned on Laradock's Apache container and
.htaccessrules, translate them into an nginx override. - One
sudoat install time. Only to point the system resolver at the.testdomains. Everything after that runs as your own user.
Frequently asked questions
Why is Laradock so slow to start? It builds its images from source on first run, and each project brings a full stack. Lerd pulls prebuilt images once and shares one nginx, one PHP-FPM per version and one copy of each service across every site.
Can I keep Docker installed? Yes. Lerd uses rootless Podman with no daemon, so the two do not conflict. Keep Laradock running on the projects you have not moved yet.
Do I need to change my project's code? No. Lerd reads projects where they are. The only file it touches is .env, and only when you run lerd env, which backs up the original first.
What about Xdebug and profiling? Both are built in. See the profiler, the dump viewer and the query viewer.
Is Lerd free for commercial work? Yes. MIT licensed, with no paid tier and no licence popup.
Next steps
- Requirements and installation
- Quick start, a project served in two commands
- Full comparison against Laravel Herd, Sail, DDEV and Lando
- Importing from Laravel Sail, if you also have Sail projects