Product
The product
The LHCI server is the only piece that runs all the time. The CLI, the login helpers and the skill are short-lived tools you run from your machine or from another repo’s CI.
The LHCI server
apps/server runs the upstream @lhci/server. It receives Lighthouse reports uploaded from CI, stores each Build and its Runs in Postgres, and serves the dashboard for comparing scores over time.
Storage is outside the container, so the score history survives redeploys and restarts. The server has no build step and no schema of its own: @lhci/server creates its tables on first boot.
Two credentials, two jobs
Server basicAuth is one username and password pair that gates every route, including the upload endpoint. Every onboarded repo shares it.
Each Project also has a Build token, printed at registration, that tells the server which Project an upload belongs to, and an Admin token, shown once, that is needed only to rename or delete that Project.
Scores without a CI pipeline
For a Client site with no CI of its own, the server can run scheduled PageSpeed Insights audits itself (PSI collection) and store them in an already-registered Project.
Build retention
Each Run stores a full Lighthouse report. A daily job deletes Builds and their Runs older than a set number of days, so the database does not grow without limit.
The toolkit
lhci-toolkit (@houses/lighthouse-cli) registers Projects and lists them. @houses/lighthouse-login-helpers gets Lighthouse past a login before it audits a page. The lhci-onboarding skill, published on npm as @houses/skill-lhci-onboarding, walks through the whole onboarding.
Defaults at a glance
- Server
- @lhci/server 0.15.1
- Storage
- Postgres, SSL on unless LHCI_DATABASE_SSL=false
- Port
- 4000, or PORT
- Build retention
- 30 days, or LHCI_RETENTION_DAYS; runs daily at 03:00
- Builds per commit
- One per Project and commit hash
- Base branch
- main, or --base-branch at registration
- Credential login timeout
- 15 s, or timeoutMs
Keep your score history in one place you own
Deploy the server once, then onboard each repo in a few minutes.