Documentation / Lighthouse
Lighthouse
You can find the plugin at https://github.com/sitespeedio/plugin-lighthouse and it will work with sitespeed.io 27 and later.
We also made it easy to use Lighthouse and the Google PageSpeed Insights plugin by releasing the +1 Docker container.
You can run it with:
docker run --shm-size=1g --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:41.0.1-plus1 https://www.sitespeed.io/ That will automatically run Lighthouse and GPSI. We release a new version of the container per release by adding -plus1 to the tag. If you use Graphite/InfluxDB, the scores from Lighthouse and GPSI will be automatically stored. If you want to add functionality, please send PRs to https://github.com/sitespeedio/plugin-lighthouse and https://github.com/sitespeedio/plugin-gpsi.
The Lighthouse tests will run after Browsertime has finished, and run Chrome headless.
Note: if you want to run more plugins with --plugins.add, that will override the default settings, so you will need to add the Lighthouse plugin again like this:
docker run --shm-size=1g --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:41.0.1-plus1 https://www.sitespeed.io/ --plugins.add analysisstorer --plugins.add @sitespeed.io/plugin-lighthouse The Lighthouse result is iframed into sitespeed.io: 
Configuration
By default the plugin runs the tests with desktop settings. If you run sitespeed.io with --mobile, --android or --ios the plugin switches to Lighthouse's mobile preset.
If you want, you can run the tests with your own configuration. You do that by adding your own JavaScript configuration file --lighthouse.config config.js.
And a configuration file like this:
module.exports = {
extends: 'lighthouse:default',
settings: {
onlyAudits: ['first-meaningful-paint', 'speed-index', 'interactive']
}
}; You can also add Lighthouse flags via a JSON file --lighthouse.flags flag.json. If you pass command line flags that contain hyphens, they are removed and converted internally in Lighthouse. So, for example, to get the command line flag --extra-headers to work, the JSON should be like this:
{
"extraHeaders": { "key": "value"}
} Read all about configuring Lighthouse at https://github.com/GoogleChrome/lighthouse/blob/main/docs/configuration.md.
Disable GPSI
If you only want to run Lighthouse and not GPSI, you can disable it with --plugins.remove @sitespeed.io/plugin-gpsi.
You can read more about sitespeed.io plugins here.