Skip to content

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.

bash
curl -fsSL https://lerd.sh/install.sh | bash
cd ~/code/myapp
lerd link

Your 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 LaradockThe same thing in Lerd
docker compose up -d nginx mysql redis before you can worklerd start once, then everything is up for every project
docker compose exec workspace bash to reach PHP toolinglerd php, lerd composer, lerd artisan, run from your own shell in the project directory
Edit laradock/.env, set PHP_VERSION, rebuild the imagelerd isolate 8.4, or let it read composer.json, no rebuild
A laradock/nginx/sites/*.conf per project, plus /etc/hosts entriesAn nginx vhost generated on lerd link, and the .test hostname registered for you
Self-signed cert wired in by hand, or plain HTTPlerd secure, a real mkcert certificate trusted by your system and browsers
Uncomment a service in docker-compose.yml and rebuildlerd service start mongodb, shared across every site
APP_CODE_PATH_HOST pointing at a sibling project directoryProjects live wherever you keep them, there is no parent folder to respect
docker compose logs -f php-fpmA log viewer in the dashboard, or lerd logs
Queue and scheduler as extra Compose serviceslerd 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 rootRootless Podman, no daemon, no root

Lerd vs Laradock

LerdLaradock
PlatformsLinux (systemd), macOS, Windows via WSL2 (beta)Linux, macOS, Windows
LicenseOpen source (MIT)Open source (MIT)
Container runtimeRootless Podman, no daemonDocker, with a root daemon or Docker Desktop
ArchitectureOne shared nginx, PHP-FPM and service layer across every siteA per-project Compose stack, one container per service
RAM with 5 projects running~200 MBSeveral GB, five full stacks
First runPulls prebuilt images, minutesBuilds images from source, often much longer
PHP versions7.4, 8.0 to 8.5, per project, no rebuildSet in laradock/.env, rebuild the image to change
.test domainsAutomatic, through a dnsmasq containerManual /etc/hosts entries plus a site conf per project
HTTPSlerd secure, trusted mkcert certificateBring your own certificate and wire it into the nginx conf
Running toolinglerd artisan, lerd composer, lerd node from your own shelldocker compose exec workspace first
Files in the repoNone required, .lerd.yaml optionallaradock/ submodule, docker-compose.yml, its own .env
Works on a client repo you cannot modifyYes, just lerd linkOnly if you can add Laradock to it
Per-project service versionsNo, services are shared and versioned globallyYes, each project pins its own
DashboardWeb UI at 127.0.0.1:7073, system tray, terminal dashboardCLI, plus whatever Docker Desktop shows
AI / MCPBuilt-in MCP server for Claude Code, Cursor, Junie and WindsurfNot 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:

bash
docker compose up -d mysql
docker compose exec mysql mysqldump -u root -proot myapp > ~/myapp.sql

For PostgreSQL:

bash
docker compose exec postgres pg_dump -U default myapp > ~/myapp.sql

Use 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.

bash
curl -fsSL https://lerd.sh/install.sh | bash
lerd start

4. Link the project.

bash
cd ~/code/myapp
lerd link

Lerd 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.

bash
lerd service start mysql
lerd env
lerd db:import ~/myapp.sql

lerd 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 composer and lerd 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 to exec into first.
  • The environment is not in the repo. Instead of a committed Compose file, you commit an optional .lerd.yaml describing 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 .htaccess rules, translate them into an nginx override.
  • One sudo at install time. Only to point the system resolver at the .test domains. 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

Released under the MIT License.