Running Laravel Octane on local host with FrankenPHP & Laravel Herd

Running Laravel Octane on local host with FrankenPHP & Laravel Herd

Written by Tina Hammar on Jan 27th, 2025 Views Report Post

A brief tutorial on integrating Laravel Octane with FrankenPHP and Laravel Herd, including MinIO-based S3 storage. Please not that this is a simple setup. You might want other ip or port settings...

(Laravel 11)


Install Laravel Octane (FrankenPHP)

composer require laravel/octane

When prompted, say “yes” to auto-install FrankenPHP.

php artisan octane:install --server=frankenphp

To monitor file changes, install chokidar (hot reloading):

npm install --save-dev chokidar

In your Laravel project folder, run:

herd unlink
herd proxy YOUR_APP_URL.test http://127.0.0.1:8000 --secure

(Herd will now route requests for https://YOUR_APP_URL.test to Octane on port 8000.)

Set Up File Storage (S3 / MinIO)

Install the AWS S3 Flysystem driver (required even if you’re using MinIO locally):

composer require league/flysystem-aws-s3-v3 "^3.0" --with-all-dependencies

Follow Herd’s documentation to enable MinIO locally:

• https://herd.laravel.com/docs/macos/herd-pro-services/minio

Make sure your local MinIO bucket has PUBLIC read access for development.

Update your .env with the MinIO credentials found in Herd → Services → MinIO:

FILESYSTEM_DISK=s3

AWS_BUCKET=
AWS_ACCESS_KEY_ID=herd
AWS_USE_PATH_STYLE_ENDPOINT=true
AWS_SECRET_ACCESS_KEY=secretkey
AWS_DEFAULT_REGION=
AWS_URL=
AWS_ENDPOINT=

Configure Default Storage, Filament, Livewire and Spatie Media Library

If using Filament or Spatie Media Library, point them to the s3 disk in your .env:

FILESYSTEM_DISK=s3
FILAMENT_FILESYSTEM_DISK=s3
MEDIA_DISK=s3

For Livewire’s temporary file uploads (in config/livewire.php):

'temporary_file_upload' => [
    'disk' => env('FILAMENT_FILESYSTEM_DISK', 'local'), //or simply 's3'
    // ...
],

Start Octane

You may need to restart Herd services and clear your cache before starting Octane:

php artisan octane:frankenphp --watch

If chokidar is installed, Octane will watch and hot-reload on file changes. Now visit https://YOUR_APP_URL.test and enjoy the speed!

Troubleshooting

  • If you see 404s on stored images, confirm that your bucket has public read access. The same applies if you get errors when uploading files with Filament or Livewire.
  • Memory errors? Read the Laravel documentation carefully about memory leaks and try increasing the memory limit in Herd php settings

Comments (0)