Skip to content
Back to skills

Local Environment

ASecurity

Local development environment: Lerd for PHP projects such as Laravel in place of Laravel Herd, Lerd before Docker on Windows, a project that offers both Lerd and Docker Compose, installing Lerd, setting a project up step by step without lerd setup --all, the committed .lerd.yaml, Lerd's services and the values it writes into .env, RustFS as the local stand-in for AWS S3 under both Lerd and Docker, Lerd's MCP server, and Git worktrees under Lerd. Load when setting up or changing a project's lo...

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
developmentrustphpbashsqlnodedockerawsgitdatabasedocumentation

Works with

  • terminal
  • cli
  • mcp

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add the-up/ai --skill local-environment --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Local Environment?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Local Environment
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/the-up-local-environment/badge)](https://www.skillsdirectory.com/skills/the-up-local-environment)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: local-environment
description: "Local development environment: Lerd for PHP projects such as Laravel in place of Laravel Herd, Lerd before Docker on Windows, a project that offers both Lerd and Docker Compose, installing Lerd, setting a project up step by step without lerd setup --all, the committed .lerd.yaml, Lerd's services and the values it writes into .env, RustFS as the local stand-in for AWS S3 under both Lerd and Docker, Lerd's MCP server, and Git worktrees under Lerd. Load when setting up or changing a project's local environment, its local services, or its setup instructions."
---

# Local Environment

- For the local environment of a PHP project, such as Laravel, Symfony, or WordPress, recommend [Lerd](https://lerd.sh). It serves each project at `https://<site>.test` with its own PHP and Node.js versions, and runs the databases and services the project needs as rootless Podman containers, on Linux, on macOS, and on Windows through WSL2. Don't recommend Laravel Herd; where a project's instructions set up Herd, propose replacing them with Lerd as separate work.
- On Windows, recommend Lerd before Docker for a PHP project. Its installer sets up WSL2, an Ubuntu distro, Podman, and the Windows integration, so that the sites open in Windows browsers with a trusted certificate and `lerd`, `php`, and `composer` work from any Windows terminal. Lerd's documentation says that file access under `C:\` is many times slower than on the Linux disk, so tell the user when a project sits under `C:\`. In a trial on Windows, pages that took 7 to 18 seconds from a Docker bind mount took under half a second under Lerd.
- Lerd keeps the PHP version inside the range its definition of the framework allows, whatever `.lerd.yaml` pins: in a trial it served a Laravel 8 application on PHP 8.1 although the project pinned 8.3. Check the version with `lerd which` after linking, and when it differs from prod, say so in the project's README and name Docker as the way that matches prod.
- A project may offer both ways: Lerd first, and Docker Compose second, as the [Docker](../docker/SKILL.md) rules describe. Keep the two in step when you change one: the same PHP, Node.js, database, and service versions as prod, and the same environment variable names.
- When Lerd isn't installed, install it with the user's approval as its installation page describes for the operating system. Lerd's nginx binds ports 80 and 443, so it can't start while Laravel Herd or another local stack listens on them: tell the user which process holds the ports, and propose removing Herd.
- Set a project up with Lerd's own commands, each run in the project's folder. A person can use the wizards: `lerd link` registers the site, `lerd init` asks for the PHP and Node.js versions, the database, the services, and the workers and saves the answers to `.lerd.yaml`, and `lerd setup` offers the steps to run. An agent can't answer a wizard, so it writes `.lerd.yaml` and runs the steps one by one:

  ```bash
  lerd link
  ```

  ```bash
  lerd composer install
  ```

  ```bash
  lerd env
  ```

  ```bash
  lerd php artisan migrate
  ```

  ```bash
  lerd npm ci
  ```

  ```bash
  lerd npm run build
  ```

- Don't run `lerd setup --all`: besides these steps it runs `lerd mcp:inject`, which writes assistant files into the repository, and a database seed, which a project may not have.
- Commit `.lerd.yaml`, so that `lerd link` restores the same setup on every computer. List the site's address in it under `domains`, so that `lerd link` doesn't rewrite the file, and name a preset service by the name Lerd gives it once it's installed, such as `mariadb-10-11`. Put the command that installs the preset into the project's README, such as `lerd service preset mariadb --version 10.11`, because `lerd link` doesn't always install it from the file.
- `lerd env` creates `.env` from `.env.example`, generates the application key, and rewrites the address of the site and the connection values of the services it detects. It also changes values a project may want to keep, such as the default disk, which becomes `s3` when the project has S3 settings. Write a value that must differ into the personal override, then run `lerd env` again:

  ```bash
  lerd env:override FILESYSTEM_DISK=public
  ```

- Leave `.env`, the backup `.env.before_lerd`, and the personal `.env.lerd_override` out of Git. Lerd adds the last two to `.gitignore` on every computer, so commit those two lines once.
- Use Lerd's own services instead of installing a database or a cache on the computer: MySQL, PostgreSQL, Redis, Meilisearch, RustFS, and Mailpit are built in, and presets add others, such as MariaDB. Choose the versions that prod runs. `lerd env` writes each service's host, port, and credentials into `.env`, so don't write them by hand.
- Use RustFS as the local stand-in for AWS S3, under Lerd and under Docker alike. Under Lerd, it's the `rustfs` service, which creates a bucket for each site. Give that service an address that the application and the browser both reach, with `lerd service domain rustfs rustfs`, which serves it at `https://rustfs.test`: a signed link to a private file then opens in the browser. Lerd makes a site's bucket public, so locally a private file is readable without a signature. Under Docker, it's a `rustfs` service built from the pinned `rustfs/rustfs` image, as the Docker rules describe. Don't recommend SeaweedFS, MinIO, or LocalStack for it; where a project runs one of them, replace it with RustFS in a task opened for that.
- Lerd ships an MCP server that runs framework commands, starts services and workers, and reads logs. Use it before the CLI, as the [Service Access](../service-access/SKILL.md) rules say. Register it once for the user's assistants:

  ```bash
  lerd mcp:enable-global
  ```

  Don't run `lerd mcp:inject` in a repository unless the user asks: it writes configuration and instruction files for every assistant it supports into the repository and merges its own text into `AGENTS.md`.

- Lerd serves each Git worktree of a linked site at its own subdomain, `https://<branch>.<site>.test`, so a task's worktree, created as the [Worktrees and Branches](../worktrees-and-branches/SKILL.md) rules describe, needs no second setup of the site.

Sources: [Installation](https://lerd.sh/getting-started/installation), [Lerd for Windows](https://lerd.sh/getting-started/windows), [Services](https://lerd.sh/usage/services), [AI Integration (MCP)](https://lerd.sh/features/mcp), and [Git Worktrees](https://lerd.sh/features/git-worktrees), Lerd; [Install and configure RustFS with Docker](https://docs.rustfs.com/installation/docker/), RustFS.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.