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

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

```bash
npx 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 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 enabled by default for remote sites and disabled for local sites, such as `localhost`. Set `scanner.throttle` to `true` or `false` to override it.
::

## Sitemap

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