Skip to main content
Back to Blog
Eric Van Johnson ·

Meet Flock: A Free, Native Laravel Dev Environment for Mac, Windows and Linux

Setting up a local PHP environment used to eat a whole afternoon. You'd install PHP, then the right extensions, then a database. Next came editing your hosts file, fighting a self-signed certificate, and finding out two projects needed different PHP versions. Docker fixed a lot of that, but it brought its own overhead and a laptop fan that sounds like a jet engine.

Flock takes a different approach. It's a free, open source app that runs your whole Laravel stack as native processes on your machine. That means PHP, Node, databases, mail, and trusted HTTPS, with no containers and no virtual machine. Version 1.0.0 landed in early November, and it's one of the more exciting local dev releases I've seen in a while.

Here's what it is, how to get it running, and why it's worth a look.

What Flock is

Flock is a local development environment built for Laravel, though it also serves Symfony, WordPress, Drupal and plain PHP projects. It comes from Lukas Frey and the team at Guava, a software studio in the Czech Republic. It's licensed under AGPL-3.0, costs nothing, and doesn't ask you to create an account.

Under the hood, Flock is a single flock binary (written in Go) that runs as a background service the docs call the daemon. That daemon handles a few jobs for you:

  • An embedded Caddy web server listens on ports 80 and 443 and passes PHP requests to PHP-FPM (or a pool of php-cgi workers on Windows).
  • A small built-in DNS server resolves anything ending in .test, so you never touch your hosts file.
  • A local certificate authority issues HTTPS certificates. Its root is limited to .test and localhost, which is a nice safety touch.
  • Shims for php, composer, node, npm and the database clients sit on your PATH and quietly run whichever version the current project wants.

On top of that sits a native menu bar app on macOS and a tray app on Windows and Linux. Nearly everything you can click, you can also run from the terminal.

If you've used Laravel Valet or Herd, the core idea will feel familiar. Park a folder, get pretty .test URLs, and switch PHP versions per project. Flock's twist is that it bundles a lot more of the stack and works on all three major operating systems.

Why people are excited

Three things stand out.

It's free, and the extras are included. Databases, a mail catcher, a dump viewer, Xdebug and site sharing all ship in the box. According to Laravel News' comparison, Herd puts databases, its mail catcher and its dump viewer behind a paid Pro license. Herd is a great product with a long track record, so this isn't a knock on it. Flock simply gives teams on a tight budget another strong option.

It runs on Linux. Herd covers macOS and Windows. Flock covers those plus Ubuntu, Fedora and Arch. If your team is mixed, everyone can use the same tool and the same project config.

It's native. Services run as regular processes. There's no Docker Desktop to start and no VM eating memory in the background, and file access runs at full speed because nothing is mounting volumes.

One thing to know before you jump in: Flock isn't affiliated with or endorsed by Laravel. It's an independent community project.

Installing Flock

Grab the installer for your platform from the download page. Here's the short version for each OS.

macOS needs macOS 15 Sequoia or newer on Apple silicon. Intel Macs aren't supported. Open the .dmg, drag Flock into Applications, launch it, and click Set Up Flock. It asks for your password twice: once to set up the .test resolver and once to trust its certificate authority.

Windows needs Windows 10 (version 2004 or later) or Windows 11 on x64. Install the Microsoft Visual C++ Redistributable first, since PHP depends on it. Run the setup .exe (no admin rights required), then click Set up Flock and approve one administrator prompt.

Linux supports Ubuntu 24.04+, current Fedora, and Arch. Your system needs systemd-resolved for DNS, which Ubuntu and Fedora use by default.

# Ubuntu
sudo apt install ./flockphp_<version>_amd64.deb

# Fedora
sudo dnf install ./flockphp-<version>.x86_64.rpm

# Arch (AUR)
yay -S flockphp-bin

A fun Linux detail: there's already a standard file-locking tool at /usr/bin/flock, so the Linux package installs the CLI as flk. Flock's version handles its own commands and passes everything else through to the system tool, so nothing breaks. The flk alias works on every platform, which is handy if you like short commands.

Once setup finishes, open a new terminal and confirm everything is alive:

php -v
node -v
flock status

flock status reports on the daemon, web server, DNS and services, and tells you whether .test names resolve.

One heads-up: Flock needs ports 80 and 443. If Herd, Valet, Apache or IIS already holds them, stop that first. Flock is helpful here and tells you which program is in the way.

Your first site in a few minutes

Here's the whole flow, from a fresh Laravel app to a working HTTPS site with a database. Flock ships PHP and Composer, so you can start right away.

cd ~/Code
composer create-project laravel/laravel acme

Now serve it. You have two choices. park serves every folder inside a directory, and link serves one project:

# Serve every project in ~/Code as <folder>.test
cd ~/Code
flock park

# Or serve just this one
cd ~/Code/acme
flock link

Open http://acme.test and your app is there. Want HTTPS? One command:

flock secure acme

Then update your .env so Laravel builds the right URLs:

APP_URL=https://acme.test

The certificate is trusted locally, so you won't see a scary browser warning.

One PHP version per project, shared with your team

This is my favorite part. Flock installs PHP 8.1 through 8.5 side by side, and each project can pin the version it needs:

cd ~/Code/acme
flock pin php 8.5
flock pin node 22

The PHP pin goes into a small .flockrc file in your project root, and the Node pin goes into .nvmrc (or whichever Node version file your project already uses). The .flockrc format is as simple as config gets:

# .flockrc
php=8.5
node=22

Commit it, and everyone on the team who uses Flock gets the same versions automatically. If someone doesn't have PHP 8.5 installed yet, running php in that project offers to install it.

Need a different version just on your own machine, without changing the repo? That's what isolate is for:

flock isolate php 8.4

Flock checks for a version in this order: your machine-only isolation, then the project's pin, then your global default. Run flock isolated any time you want to see which version each site uses and where it came from.

If you maintain an older app, note the floor. Flock's PHP range starts at 8.1 on macOS and Linux (the docs mention 7.4 and 8.0 builds on Windows). Anything older needs a different tool.

Databases without Docker

Flock can install and run PostgreSQL, MySQL, MariaDB, MongoDB, Valkey, Meilisearch, RustFS and more as native services. A few are platform-specific: Redis is macOS only, and Typesense runs on macOS and Linux. Every service listens on 127.0.0.1 only, so nothing is exposed to your network.

Adding Postgres for our demo app takes two commands:

flock services install postgres
flock services create-db postgres acme

Then point Laravel at it:

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=acme
DB_USERNAME=postgres
DB_PASSWORD=

You can run several versions of a service and switch between them with flock services use. Postgres fans also get easy access to extensions like PostGIS and pgvector, which is a big win if you're building anything with maps or embeddings.

Catch every email

Nobody wants a test password reset landing in a real customer's inbox. Flock runs an SMTP catcher on port 2525. Drop this into your .env:

MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME="${APP_NAME}"
MAIL_PASSWORD=null
MAIL_SCHEME=null

The clever bit is the username. Flock uses it to pick the inbox, so setting it to your app name gives each project its own mailbox. Your side project's emails won't get mixed in with your client work. Check what was sent from the app, or from the terminal:

flock mail

Dumps and debugging

Flock has a Dumps window that collects dump() and dd() output and groups it by request, alongside the queries, logs, views and jobs from that same request. Click an entry and it opens the file in PhpStorm, VS Code, Cursor or Zed.

Here's the part I love: you don't install a package in your app to make this work. Flock gathers the data through an OpenTelemetry agent on its side, so your composer.json stays clean.

Route::get('/orders/{order}', function (Order $order) {
    dump($order->load('items'));

    return view('orders.show', ['order' => $order]);
});

Load that route and the dump, plus the queries behind it, show up in Flock grouped under that one request.

For step debugging, Xdebug is ready but off by default, because loading it slows every request. Turn it on when you need it:

# Debug web requests that ask for Xdebug
flock xdebug on

# Debug a single Artisan command
flock debug artisan migrate

Flock only loads Xdebug for the requests that ask for it, so the rest of your browsing stays fast.

A few extras that punch above their weight

Git worktrees. If you juggle branches with git worktrees, Flock can give each worktree its own URL. New worktrees get their dependencies installed and a fresh .env with a new app key, and you choose whether the database is shared with the main project, copied from it, or brand new.

flock worktree add feature/checkout --db copy

That makes reviewing a pull request next to your main branch painless.

Sharing. Need to show a client your work? flock share creates a temporary public URL through a Cloudflare tunnel. Add --allow with an email address and only that person can get in.

flock share acme --allow client@example.com

FrankenPHP and Octane. You can switch any site to FrankenPHP, with optional Laravel Octane worker mode, using a single command. There's also a command to run a Laravel Reverb server for your real-time features.

flock frankenphp on acme --octane

Built for AI coding assistants

Flock ships with an MCP server, so AI tools like Claude Code, Cursor, VS Code, Windsurf and Codex can see what's going on in your local environment. Your agent can read your sites, PHP versions, errors, dumps, logs and caught mail, which makes "why is this page throwing a 500?" a much more productive conversation.

Registering it takes one command:

flock mcp install --client claude-code

I like how carefully the team scoped this. Read-only tools run freely, and tools that change things (like installing a service or creating a database) prompt you first. No tool can delete anything at all. An agent can't drop a database, unlink a site or wipe your logs, even if it wants to.

If your project uses Laravel Boost, run flock boost in the project. It writes a small guideline file to .ai/guidelines/flock.md and refreshes Boost, so your agents know Flock is serving the app and choosing its PHP version. The guideline is safe to commit even if some teammates don't use Flock.

Is Flock right for you?

If you build Laravel apps and want a fast, native setup that costs nothing, try it. It's especially appealing if your team spans macOS, Windows and Linux, or if you'd like databases and mail catching without a paid license.

Keep these limits in mind:

  • macOS support is Apple silicon only, on macOS 15 or newer.
  • The PHP floor is 8.1 (outside of Windows), so legacy apps may need something else.
  • It needs ports 80 and 443, so it won't run alongside Herd or Valet at the same moment.
  • It's a 1.0 release. Expect fast updates and the occasional rough edge, and report anything odd on GitHub.

If it isn't for you, removing it is easy. flock uninstall takes out the daemon, PATH entries, DNS setup and certificate trust. Add --purge to delete your data as well.

Local development has been a solved problem for a while, but "solved" often meant "solved if you pay," "solved if you run Docker," or "solved if you're on a Mac." Flock covers all three platforms for free and makes the whole stack feel quick. Park a folder, open https://your-app.test, and get back to building.

References

Eric Van Johnson

November 28, 2026

Share

Our Partners

Collaborating with industry leaders to bring you the best PHP resources and expertise

Interested in partnering? Get in touch →