Deployment
Local (development)
php -S 127.0.0.1:8787 -t public
Laravel Herd / Valet
Point the site's document root at public. With Herd:
herd link <site-name>
.test hosts resolve to 127.0.0.1, so the app is reachable only from the
machine - but that still includes unauthenticated local browsers. Set an
API key if that matters.
Standalone behind a reverse proxy
Serve public/ with nginx/Apache + PHP-FPM as you would any PHP
app. Then either:
- set
LOG_LENS_TOKENand have clients sendX-Log-Lens-Token, or - put the app behind the proxy's own auth (basic auth / SSO), and keep the port off the public network.
Do both for anything beyond a single trusted machine. The cross-origin guard protects against CSRF but is not a substitute for authentication.
PHP-FPM env
Because PHP-FPM doesn't inherit your shell environment, set secrets via the
FPM pool (env[LOG_LENS_TOKEN] = ...) or a .env file next to config.php (the
config loader reads it; a real env var still wins). See Configuration.
Laravel app
The adapter deploys with your app - no separate service. Checklist:
php artisan vendor:publish --tag=log-lens-assetsin the deploy pipeline (or commitpublic/vendor/log-lens).- Register a real
LogLens::auth()rule - the default denies in non-local, so configure who may access. See Laravel Package. - The workspace lives under
storage/log-lens/- ensurestorage/is writable and included in your backup/retention policy as appropriate. - Schedule
log-lens:syncif you use connectors.
Upgrades
The SQLite schema self-migrates on first open (gated by PRAGMA user_version,
serialized so concurrent PHP-FPM workers don't race). Moving a workspace
directory self-heals stored paths on the next request. After a Log Lens upgrade
that changes parsing, run POST /?api=reindex (or log-lens:import/rebuild) to
re-fingerprint existing sources.