1

I am trying to generate my API documentation using the darkaonline/l5-swagger package in my Laravel application. The application is running on Laravel Octane using RoadRunner as the server.
When I run the php artisan swagger:generate command, it seems to execute without error. However, when I try to access the documentation URL (/api/documentation), I get a 500 server error, and the following error appears in my RoadRunner logs:

[RR] 2026-02-11T19:26:00+00:00 ERR http error error="dial unix /var/run/php/php8.3-fpm.sock: connect: no such file or directory"

It seems like the package is trying to use FPM to generate something at runtime, but my environment is solely RoadRunner/Octane and doesn’t have an FPM socket.

Environment:
Laravel Version: 11, PHP 8.3
Package: darkaonline/l5-swagger v11

Package config: Default configuration published via php artisan vendor:publish --provider="DarkaOnline\L5Swagger\L5SwaggerServiceProvider"
I’ve verified that php artisan swagger:generate creates the public/docs folder and api-docs.json file. The JSON file looks valid.
I checked the l5-swagger.php config file, specifically the storage_path and swagger_json settings, which point to the correct file.

Question:
How can I configure l5-swagger or my Octane/RoadRunner setup to correctly serve the pre-generated OpenAPI documentation without trying to connect to a non-existent FPM socket at runtime? Is there a configuration I’m missing to ensure it uses the pre-built static file?

Dewald Hugo Answered question