---
title: "Unlighthouse --desktop Flag & Device Configuration"
description: "Run Unlighthouse in desktop mode with the --desktop flag: pnpm exec unlighthouse --site <url> --desktop. Configure mobile, desktop, or custom viewports with throttling."
canonical_url: "https://unlighthouse.dev/v1/guide/guides/device"
last_updated: "2026-10-03T08:07:16.319Z"
---

Run Unlighthouse in desktop mode with the `--desktop` flag:

```bash
pnpm exec unlighthouse --site https://example.com --desktop
```

This overrides the default mobile emulation and scans every page using a desktop viewport. Prefer a config file? Set `scanner.device: 'desktop'` instead.

## When to use `--desktop`

Mobile is the default because Google uses mobile-first indexing. But desktop scans still matter for:

- B2B SaaS dashboards (95%+ desktop traffic)
- Admin panels and internal tools
- Documentation sites
- Benchmarking against PageSpeed Insights desktop scores

The `--desktop` flag is equivalent to the `--device desktop` long form and takes precedence over any config file setting.

## Device matrix

Use `--device mobile,desktop` to audit both device profiles.
Each route has one report per device.

```sh
pnpm exec unlighthouse-ci --site https://example.com --device mobile,desktop --reporter json
```

## Device Types

### Desktop Scanning

```ts
import { defineUnlighthouseConfig } from 'unlighthouse/config'

export default defineUnlighthouseConfig({
  scanner: {
    device: 'desktop',
  },
})
```

### Mobile Scanning (Default)

```ts
export default defineUnlighthouseConfig({
  scanner: {
    device: 'mobile',
  },
})
```

## Custom Dimensions

Test specific viewport sizes for responsive breakpoints:

```ts
export default defineUnlighthouseConfig({
  lighthouseOptions: {
    screenEmulation: {
      width: 1800,
      height: 1000,
    },
  },
})
```

## Network Throttling

Throttling simulates slower network and CPU conditions for more realistic performance testing:

```ts
export default defineUnlighthouseConfig({
  scanner: {
    throttle: true,
  },
})
```

::note
Throttling is automatically enabled for production sites and disabled for localhost by default.
::

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
