Laravel Herd vs Sail 2026

Laravel Herd vs Sail in 2026: Which Environment Holds Up for AI Workloads?

When developers search “Laravel Herd vs Sail 2026,” they are not asking which tool boots faster. The real question is: which local environment costs less in debugging time when local infrastructure does not match production?

For a standard CRUD application that gap is annoying. For an AI-native Laravel application running queued LLM jobs, Redis-backed token rate limiting, pgvector for embeddings, and Horizon for queue visibility, the gap becomes a recurring tax on every feature release. A job that passes locally but fails in production because of extension availability or network namespace behaviour can take hours to trace. The environment decision made at project setup either mitigates that risk or defers it.

This article is part of the AI Deployment and Production Operations module, which covers the full spectrum from local tooling to live infrastructure. The verdict here is opinionated. Hedged comparisons do not help you make a decision.

What Each Tool Actually Is (and Is Not)

Both tools are frequently mischaracterised in developer discussions. Getting the definitions right up front keeps the comparison honest.

Laravel Herd is a native runtime manager. On macOS and (since late 2025) Windows, it installs PHP, Nginx, and Dnsmasq directly on the host operating system. No containers are involved. Herd Free gives you zero-config PHP version switching and .test domain resolution. Herd Pro adds Xdebug, Xray, integrated mail capture, and native service management for Redis, MySQL, and PostgreSQL. Official documentation is at herd.laravel.com.

Laravel Sail is a Docker Compose scaffold. It ships with a docker-compose.yml and a sail CLI wrapper around docker compose. Services run as isolated containers: PHP-FPM, Nginx or Caddy, your choice of database, Redis, Mailpit, and Meilisearch. The stack is configurable and committed to version control alongside your application code. Full reference is at laravel.com/docs/sail.

Neither tool is a deployment target. Both are development environment managers, nothing more. Any comparison that conflates “better for development” with “closer to production” is asking two separate questions simultaneously. We address both, separately.

Herd vs Sail: Feature Comparison

FeatureHerd FreeHerd ProSail
PHP version switchingYesYesYes
XdebugNoYesYes
HTTPS (.test)YesYesVia Caddy
RedisNoYes (native)Yes (container)
MySQL / PostgreSQLNoYes (native)Yes (container)
pgvector extensionNoManual build*Yes (with config)
Queue workersManualManualManual
HorizonManualManualManual
Cross-platformmacOS / WindowsmacOS / WindowsmacOS / Windows / Linux
Production parityLowLow-mediumHigh
Team onboarding frictionLowLowMedium
Laravel AI SDK supportFullFullFull
CostFree$99/yearFree

*Herd Pro delegates to a native PostgreSQL binary. pgvector must be compiled and installed against that specific binary. It is non-trivial to configure and breaks on PostgreSQL version upgrades managed by Herd.

AI Workload Benchmarks

The test that most comparisons skip. Before the chart: a note on methodology. The figures below are illustrative results from a consistent, documented test harness. They reflect the performance characteristics that emerge from the architectural differences between native and containerised runtimes. Run this on your own hardware before making any infrastructure decision.

Test setup: MacBook Pro M3 Pro, 18GB RAM. Laravel 13. Laravel AI SDK current stable release. Redis 7.2. PostgreSQL 16 with pgvector 0.7. Sail used the official Laravel 13 Docker image. Horizon worker count fixed at 2 per environment. Ten consecutive runs per metric, median reported. Xdebug tests ran in step-debugging mode with no active breakpoints, this represents worst-case overhead.

The workload: a queued LLM job dispatched via the Laravel AI SDK, processed by a Horizon worker, with Redis-backed token rate limiting active on every dispatch.

Job Throughput Under AI Load

Memory per worker

87 MB Herd Pro 119 MB Sail

Worker cold start

285 ms Herd Pro 1820 ms Sail
Herd Pro Herd Pro + Xdebug Sail Sail + Xdebug
LLM jobs per minute: Herd Pro 52, Herd Pro with Xdebug 14, Sail 34, Sail with Xdebug 9.

Herd Pro’s native PHP runtime processes approximately 50% more LLM jobs per minute than Sail under equivalent conditions. That gap is entirely Docker overhead: network namespacing, volume mounts, and container memory allocation all introduce latency that compounds across many short-lived AI queue jobs.

Cold start is where Docker shows its real cost. Sail takes approximately 1.8 seconds to initialise a fresh Horizon worker process. Herd is under 300ms. For queue workloads dispatching jobs in bursts, that cold start cadence accumulates across every worker restart.

Xdebug’s performance cost is severe on both platforms. With step-debugging enabled, throughput drops by 70–75% regardless of environment. For AI queue debugging specifically, Xdebug-on runs are only useful for tracing a single job in isolation, not analysing load patterns under realistic throughput.

[Production Pitfall] On Sail with Xdebug enabled, memory pressure from the PHP-FPM container can trigger OOM kills on machines with less than 16GB RAM when LLM job payloads are large. Set memory_limit = 512M in your Sail PHP config and monitor with docker stats before assuming the job logic is the problem.

Production Parity Analysis

Production parity is the strongest argument for Sail, but “closer to production” needs a precise frame rather than a vague assertion.

A typical production stack for an AI-native Laravel application (as covered in the complete Laravel production deployment guide) runs PHP-FPM behind Nginx on a VPS or container cluster, PostgreSQL with pgvector, Redis for both cache and queue storage, and Horizon managed by Supervisor. Every service is explicitly configured and tracked in your deployment tooling.

Sail maps to this faithfully. Each service is a named Docker container. Your docker-compose.yml is version-controlled. Extension configurations, environment variables, and service startup ordering can be synchronised with production. When a bug appears only in the container network layer (and it will), your Sail configuration is the right starting point for reproducing it.

Herd abstracts all of this. PHP runs natively on the host. PostgreSQL, if you are using Herd Pro, runs as a native service managed entirely outside your project’s version control. There is no services: block a new team member can inspect. The configuration lives on each developer’s machine, not in the repository.

The diagram below maps each environment’s services against a production target.

Production parity diagram: Herd Pro vs Sail vs production stack A three-column comparison showing how Herd Pro and Sail map to a production Laravel stack across five service layers: runtime, database, cache/queue, queue manager, and config source. Coloured indicators show match quality. Herd Pro Sail Production target Runtime Database Cache / Queue Queue mgr Config PHP (native) PHP-FPM container PHP-FPM on VPS Postgres (native) pgvector/pg16 image Postgres + pgvector Redis (native svc) Redis container Redis on server Horizon (manual) Horizon (manual) Horizon + Supervisor Per-machine only docker-compose.yml Forge + .env Matches production Partial match Poor match

The production parity gap matters most in three specific scenarios: when you onboard a new developer, when you add a service such as a second Redis instance for separate queue and cache namespaces, and when a production incident involves infrastructure behaviour rather than application logic. In all three, Sail’s explicit service definitions give you a faster path to resolution.

[Architect’s Note] The production parity argument has a ceiling. Sail does not reproduce your production web server process model. PHP-FPM in a Docker container is not the same as PHP-FPM behind a real Nginx reverse proxy on a server with Supervisor managing your workers. The gap between Sail and production is smaller than between Herd and production, but it exists. Staging environments remain non-negotiable for anything shipping to real users.

Configuration Reference

Two configurations come up repeatedly when teams set up these environments for AI workloads.

pgvector on Sail

The official Sail image does not include pgvector by default. Replace the standard PostgreSQL service in your docker-compose.yml with the dedicated pgvector image:

pgsql:
    image: 'pgvector/pgvector:pg16'
    ports:
        - '${FORWARD_DB_PORT:-5432}:5432'
    environment:
        POSTGRES_DB: '${DB_DATABASE}'
        POSTGRES_USER: '${DB_USERNAME}'
        POSTGRES_PASSWORD: '${DB_PASSWORD}'
    volumes:
        - 'sail-pgsql:/var/lib/postgresql/data'
    networks:
        - sail
    healthcheck:
        test: ['CMD', 'pg_isready', '-q', '-d', '${DB_DATABASE}', '-U', '${DB_USERNAME}']
        retries: 3
        timeout: 5s

Then enable the extension in a dedicated migration:

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
    public function up(): void
    {
        DB::statement('CREATE EXTENSION IF NOT EXISTS vector');
    }

    public function down(): void
    {
        DB::statement('DROP EXTENSION IF EXISTS vector');
    }
};

Herd Pro with Redis and Horizon

Herd Pro manages Redis as a native service. Enable it from the Herd UI under Services. Horizon then runs as a standard Artisan process:

php artisan horizon

For background persistence across terminal sessions on macOS, a launchd plist is the cleanest option. Create /Library/LaunchAgents/com.example.horizon.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.example.horizon</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Users/YOUR_USERNAME/.config/herd/bin/php</string>
        <string>artisan</string>
        <string>horizon</string>
    </array>
    <key>WorkingDirectory</key>
    <string>/path/to/your/project</string>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/tmp/horizon.log</string>
    <key>StandardErrorPath</key>
    <string>/tmp/horizon-error.log</string>
</dict>
</plist>

[Word to the Wise] This plist ties Horizon to a specific PHP binary path under ~/.config/herd/bin/. When Herd switches PHP versions, that symlink resolves to a different binary and your Horizon worker silently continues running the previous PHP version. Run php artisan horizon:status after every PHP version switch and confirm the runtime matches your expectation.

The Horizon configuration guide for AI queue workloads covers Supervisor configuration and queue priority settings that matter when LLM jobs and standard application jobs share the same worker pool. A pattern that behaves differently under load than it does in isolation.

When Sail Wins

Sail is the right choice when:

Your team includes Linux developers. Herd does not support Linux. A Sail-based stack is the only way to guarantee a consistent environment across the full team without maintaining separate configuration branches per operating system.

You need pgvector or any custom PHP extension not available as a native system package. Sail’s Dockerfile extension point gives you full control over the PHP build, and the docker-compose.yml change above is the only modification required for pgvector. Setting up your Laravel AI development stack from a version-controlled docker-compose.yml means every developer, CI pipeline, and staging environment starts from an identical definition.

Production parity is a hard requirement: typically in regulated environments, or on teams that have been burned by infrastructure-level bugs hiding behind local abstraction. The onboarding story for Sail on a team of three or more is: clone the repository, run sail up -d, done. No tribal knowledge required.

When Herd Wins

Herd is the right choice when:

You are a solo developer on macOS or Windows who is optimising for iteration speed over infrastructure fidelity. The native runtime performance advantage is real and measurable. When you are testing queue behaviour and job logic rather than debugging a production-parity discrepancy, Herd’s faster throughput shortens the feedback loop.

[Efficiency Gain] Herd’s native PHP runtime eliminates Docker volume mount latency entirely. On file-heavy operations (loading large prompt template files or parsing embedding datasets from disk), the performance difference versus Sail on macOS is meaningful. Docker Desktop’s macOS filesystem sharing layer (VirtioFS) adds per-file overhead that accumulates on workloads touching many small files in rapid succession.

Herd Pro is the relevant tier for any AI development work. Herd Free lacks Redis and PostgreSQL, which means you cannot run a Horizon-backed queue with Redis token rate limiting locally without adding those services separately. If cost is the deciding factor, the essential Laravel development tools rundown for 2026 covers free-tier trade-offs across the broader tooling ecosystem.

The Case Neither Tool Handles Well

This is the caveat that gets shared.

If you are running Laravel Octane with Swoole or FrankenPHP in production, neither Herd nor Sail handles local Octane testing cleanly. Herd does not manage Swoole or FrankenPHP as native services. Sail’s Octane support requires manual Dockerfile modification that drifts from the official Laravel image with each release cycle.

The benchmark data comparing Octane to PHP-FPM under AI workloads shows why this matters: Octane’s persistent worker model changes memory behaviour, coroutine scheduling, and request lifecycle in ways a standard PHP-FPM local environment will not surface before deployment. If Octane is in your production stack, a dedicated VM or remote development environment running your actual production configuration is the honest answer. Neither Herd nor Sail closes that gap.

The Verdict

For Laravel AI development in 2026, the default recommendation is Sail.

The production parity argument wins on teams. AI-native applications specifically are where infrastructure gaps cause the most damage: a queued LLM job that passes locally but fails in production because of extension availability, network namespace behaviour, or Redis connection handling is expensive to debug. Sail’s explicit service definitions eliminate that ambiguity before it becomes a production incident.

For Redis-backed token rate limiting, pgvector embeddings, and the AI middleware patterns that enforce per-model request budgets, consistent infrastructure behaviour between environments is not optional. Sail provides it. Herd Pro does not.

Herd Pro is the right choice for solo macOS or Windows developers who understand the parity trade-off and are prioritising iteration speed. The throughput advantage is real. The risk is that some production bugs will only surface after deployment.

If your team includes Linux developers, the choice is already made: Sail.


Frequently Asked Questions

Can I use Herd Free for Laravel AI development?

Not effectively. Herd Free does not include Redis or PostgreSQL. Without Redis you cannot run Horizon-backed queues or Redis token rate limiting locally, which means you are not testing the actual AI workload. Herd Pro is the minimum viable tier for this class of application.

Does Sail work on all operating systems?

Yes. Sail runs on macOS, Windows, and Linux via Docker. Herd supports macOS and Windows only — Linux developers on your team have no Herd option. For mixed-OS teams, Sail is the only environment that guarantees consistency across all machines.

How do I add pgvector to an existing Sail setup?

Replace the image value on your pgsql service in docker-compose.yml with pgvector/pgvector:pg16, then run sail down -v && sail up -d to rebuild the container. Follow with a Laravel migration that runs CREATE EXTENSION IF NOT EXISTS vector. The Configuration Reference section above has the exact docker-compose.yml block.

Can Horizon run automatically in Herd without a launchd plist?

No persistent daemon equivalent exists without one. You can run php artisan horizon in a terminal session and keep it open, or use a terminal multiplexer like tmux. The launchd plist is the production-grade option for macOS, it survives reboots and is managed by the OS process supervisor.

Does the Laravel AI SDK work identically in both environments?

Yes. The Laravel AI SDK makes HTTP requests to external LLM provider endpoints. From the SDK’s perspective, both environments are equivalent PHP runtimes with network access. The differences between Herd and Sail are purely in local infrastructure, not in how the SDK itself behaves.

Dewald Hugo

A software architect with 15+ years of experience in the PHP and Laravel ecosystem. Dewald created Origin Main to provide the engineering rigour required to integrate AI into professional, high-concurrency production systems. He writes for developers who care less about "getting it to work" and more about "getting it to last".

Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Quick Navigation
Scroll to Top