Skip to main content

Install and run the standalone app

Log Lens is a local-first log dashboard and error tracker. The standalone app runs on nothing more than PHP and a self-contained SQLite database, so you can serve it straight from your machine.

Prerequisites

You need PHP 8.2 or newer with the pdo_sqlite and json extensions enabled. Check with:

php -v
php -m | grep -E 'pdo_sqlite|json'

SQLite needs no further setup — this is the default. If you'd rather point Log Lens at an existing Postgres or MySQL server instead, see Database drivers; everything else in this guide is unchanged.

Get it

Clone the engine — it is the published cliqthemes/log-lens-core package, and it carries no runtime dependencies, so there is nothing to install afterwards:

git clone https://github.com/cliqthemes/log-lens-core.git log-lens
cd log-lens

A release tarball from that repository's releases page works identically — unpack it and carry on.

That repository is a read-only mirror of a private monorepo, where the same engine lives at packages/core/. Every path below is relative to the engine root either way.

Serve the app

The download ships with a prebuilt dashboard. The entry point is public/index.php, which serves the UI at the root and the JSON API when a request carries an api query parameter. Serve the public/ directory with PHP's built-in server:

php -S 127.0.0.1:8787 -t public

Open http://127.0.0.1:8787 in your browser. On first run Log Lens creates a default application (Primary application) along with its logs/, processed/, and sources/ directories and a SQLite database, so there is nothing to migrate by hand.

Ingest your first logs

Point the importer at a log file or a whole folder:

php bin/import.php /path/to/laravel.log
php bin/import.php /path/to/storage/logs

The command prints a JSON summary of what was parsed and indexed. Refresh the dashboard to see the grouped issues appear. To load into a specific application, add --app:

php bin/import.php --app=billing /path/to/logs

By default only ERROR and WARNING events are indexed. See Choose which severities to index to widen or narrow this per application.

Optional: configuration

Two deployment secrets live in the environment or a root-level .env file (copy .env.example to start):

KeyDefaultPurpose
LOG_LENS_TOKENemptyAPI key. Empty leaves the API unauthenticated for local use; any value requires X-Log-Lens-Token or Authorization: Bearer on every request.
LOG_LENS_URL(empty)Canonical base URL. The dashboard and API derive theirs from the request, so leave it unset unless you use the command-line AI skills or sit behind a proxy.

Real environment variables always win over .env. Everything else - severities, retention, pagination - is documented in the Configuration reference.

Where to next