For AI agents: a documentation index is available at /llms.txt
Skip to main content

Configuration

config

Manage CLI settings. The configuration is stored in ~/.browserless/config.json (mode 0600, created on first use).

Command: browserless config <subcommand>

Subcommands

  • get <key> Read a config value. Sensitive keys are redacted by default; pass --show-sensitive to print verbatim.
  • set <key> <value> Write a user-managed config value.
  • unset <key> Remove a user-managed config value.

Configurable keys

KeyDescription
serverTarget server URL (mutually exclusive with region).
regionProduction region shorthand: sfo, lon, or ams.
terms_ttl_daysDays between liability disclaimer re-prompts (default 7).
telemetrytrue or false (default on).
excluded_domainsManaged via profile exclude add/rm/list.

Examples

Set a region

browserless config set region sfo

Point to a self-hosted server

browserless config set server https://my-browserless.example.com

Disable telemetry

browserless config set telemetry false

Read a config value

browserless config get region

Global flags

Every command that hits the Browserless API accepts these flags.

Command: browserless {command} [global flags]

Flags

  • --token <token> Override token resolution (flag > env > keychain > config file).
  • --server <url> Override the configured server URL.
  • --region <code> sfo / lon / ams shorthand for --server. Passing both --server and --region is an error.
  • --json Emit the server response as JSON (script-friendly).

Environment variables

VariableEffect
BROWSERLESS_TOKENUse this token without a stored credential (overrides keychain + file).
BROWSERLESS_ACCEPT_TERMS1 to pre-accept the liability disclaimer.
BROWSERLESS_CONFIG_DIROverride ~/.browserless/ location (useful for CI or multi-tenant setups).
BROWSERLESS_DISABLE_KEYCHAIN1 to force plaintext config-file storage even if the keychain works.
BROWSERLESS_CDP_WAIT_MSOverride the 15 s CDP-readiness timeout (raise on slow CI runners).
BROWSERLESS_TELEMETRY_DISABLED1 to disable usage analytics for the run.
DO_NOT_TRACK1 also disables usage analytics (cross-tool standard).
CIWhen set, the disclaimer refuses to prompt interactively. Use --accept-terms instead.

Exit codes

CodeMeaning
0Success
1Internal bug (prints a stack trace)
2Bad arguments (UsageError)
3Precondition failed: no token, disclaimer declined, profile busy, corrupt config (PreconditionError)
4Local capture pipeline failed: copy / browser launch / CDP (CaptureError)
5Server returned a non-2xx response (ApiError)

Usage analytics

The CLI reports lightweight, pseudonymous usage data so the team knows which commands to invest in. It's on by default and easy to turn off.

What is sent (once per command, only when authenticated against a Browserless cloud region):

  • The command that ran (e.g. profile upload) and the names of flags you passed (never their values).
  • Outcome: ok / error, exit code, and error class on failure.
  • Duration, CLI version, OS/architecture/Node major, whether it's running under CI.
  • The production region (sfo / lon / ams). Never a raw server URL.
  • A random per-install device ID stored in the Browserless config directory (default: ~/.browserless/telemetry-device-id).

Never sent: your API token, profile names, captured URLs or domains, cookies, or any captured auth state. Commands targeting self-hosted servers aren't tracked at all.

Opt out:

browserless config set telemetry false

Or per-run via environment variable:

BROWSERLESS_TELEMETRY_DISABLED=1 browserless profile upload ...
DO_NOT_TRACK=1 browserless profile upload ...