Appearance
Laravel Herd
Laravel Herd is a native macOS application that bundles PHP and Nginx to serve sites locally with minimal configuration. Combined with MariaDB and Redis installed via Homebrew, it provides a full local stack for most Laravel projects.
Laravel Herd
Only the free tier of Herd is required for standard local development. The pro tier is not needed.
Installation
Download and install Herd from herd.laravel.com. Follow the setup wizard — it will configure PHP-FPM and Nginx automatically and start both at login.
Adding sites
Herd watches ~/Herd by default. Any directory placed there will automatically be served at http://{directory-name}.test.
To serve a project outside of ~/Herd, open the Herd menu bar icon, go to Sites, and click Add Site, then select the project root.
PHP versions
Herd ships with several PHP versions. The active version can be changed under PHP in the Herd interface and applies globally unless overridden per-site.
To set a PHP version for a specific site, click the site in the Sites list and choose a version from the PHP dropdown.
Local TLS
To serve a site over HTTPS locally, select it in the Sites list and click Secure. Herd will generate and trust a local certificate automatically.
Set your local app URL accordingly:
dotenv
APP_URL=https://{site-name}.testMariaDB
The free tier of Herd does not bundle a database server, so MariaDB is installed separately via Homebrew.
Installation
bash
brew install mariadb
brew services start mariadbThe service will start automatically at login from this point on.
Securing the installation
Run the security script to set a root password and remove default loose permissions:
bash
mariadb-secure-installationAt minimum, set a root password and remove anonymous users when prompted.
Environment variables
dotenv
DB_CONNECTION=mariadb
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_project
DB_USERNAME=root
DB_PASSWORD=your_root_passwordNote: Laravel versions prior to 11 do not have a dedicated
mariadbconnection driver. Usemysqlfor those projects instead.
Redis
Installation
bash
brew install redis
brew services start redisThe service will start automatically at login from this point on.
Verifying the connection
bash
redis-cli pingA PONG response confirms Redis is reachable.
Environment variables
dotenv
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379To use Redis for caching and queues:
dotenv
CACHE_STORE=redis
QUEUE_CONNECTION=redisTypesense
Typesense is not required on all projects. Where it is needed, run it locally via Docker Compose rather than installing it directly.
docker-compose.yml
Add a docker-compose.yml to the project root:
yaml
services:
typesense:
image: typesense/typesense:27.1
ports:
- '8108:8108'
volumes:
- typesense-data:/data
command: '--data-dir /data --api-key=your_api_key --enable-cors'
volumes:
typesense-data:Replace your_api_key with any string — this is a local-only key so the value does not matter.
Starting and stopping
bash
docker compose up -d
docker compose downEnvironment variables
dotenv
SCOUT_DRIVER=typesense
TYPESENSE_API_KEY=your_api_key
TYPESENSE_HOST=localhost
TYPESENSE_PORT=8108
TYPESENSE_PROTOCOL=http