> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Choose a browser mode

> Choose independent Chrome or a signed-in Chrome or Edge profile, configure selection priority, and verify Octoparse CLI browser readiness.

Octoparse CLI supports two browser modes for `run` and `detect`.

| Mode          | Browser and profile                            | Best for                                              |
| ------------- | ---------------------------------------------- | ----------------------------------------------------- |
| `independent` | Chrome for Testing with a temporary profile    | Clean, repeatable local runs and headless automation  |
| `user`        | System Chrome or Edge with an existing profile | Sites that depend on saved cookies or signed-in state |

User mode is supported on Windows and macOS. Linux uses independent Chrome.

## Browser selection priority

The CLI selects a browser in this order:

```text theme={null}
1. --browser flag
2. OCTOPARSE_BROWSER environment variable
3. Saved octoparse browser use setting
4. independent
```

## Check available profiles

```bash theme={null}
octoparse browser status --browser-id chrome --json
octoparse browser profiles --browser-id chrome --json
```

## Install the user-browser extension

The selected browser must be fully closed during installation.

```bash theme={null}
octoparse browser install \
  --browser-id chrome \
  --profile "Default" \
  --force-close \
  --json
```

Reopen the browser once, confirm the extension is enabled, and check status again:

```bash theme={null}
octoparse browser status --browser-id chrome --profile "Default" --json
```

In JSON mode, follow `data.nextActions` or `error.details.nextActions` until `readyForUserBrowserRun` is `true`.

## Save or override the browser mode

```bash theme={null}
octoparse browser use user --browser-id chrome --profile "Default" --json
octoparse browser use status
octoparse browser use independent
```

Override the saved choice for one command:

```bash theme={null}
octoparse run <taskId> --browser user --profile "Default"
octoparse detect <url> --browser independent --auto
```

User mode does not support `--headless`.

## Environment variables

```bash theme={null}
OCTOPARSE_BROWSER=user octoparse run <taskId>
OCTOPARSE_BROWSER=user OCTOPARSE_BROWSER_ID=chrome OCTOPARSE_BROWSER_PROFILE=Default octoparse run <taskId>
```

## Troubleshooting

```bash theme={null}
octoparse browser close --browser-id chrome --profile "Default" --json
octoparse browser status --browser-id chrome --profile "Default" --json
octoparse doctor --json
```

See [Troubleshooting](../reference/troubleshooting#chrome-and-browser-errors) for Chrome downloads, Linux display requirements, and user-browser setup errors.
