Environment Variables
Playwright options via environment
Section titled “Playwright options via environment”All Playwright browser options can be set via PRESSJS_PLAYWRIGHT_* environment variables. These are merged with options from press.toml, with environment variables taking precedence.
| Variable | Maps to | Example |
|---|---|---|
PRESSJS_PLAYWRIGHT_MODE | mode | "launch", "connect", "cdp" |
PRESSJS_PLAYWRIGHT_CHANNEL | channel | "chrome", "msedge" |
PRESSJS_PLAYWRIGHT_EXECUTABLE_PATH | executablePath | "/usr/bin/chromium" |
PRESSJS_PLAYWRIGHT_HEADLESS | headless | "true", "false" |
PRESSJS_PLAYWRIGHT_ARGS | args | Space-separated or JSON array ("--disable-gpu --no-sandbox" or '["--disable-gpu"]') |
PRESSJS_PLAYWRIGHT_TIMEOUT_MS | timeoutMs | "30000" |
PRESSJS_PLAYWRIGHT_SLOW_MO | slowMo | "100" |
PRESSJS_PLAYWRIGHT_WS_ENDPOINT | wsEndpoint | "ws://localhost:9222/..." |
PRESSJS_PLAYWRIGHT_ENDPOINT_URL | endpointURL | "http://localhost:9222" |
PRESSJS_PLAYWRIGHT_EXPOSE_NETWORK | exposeNetwork | "*" |
PRESSJS_PLAYWRIGHT_HEADERS | headers | JSON object string ('{"Authorization":"Bearer ..."}') |
Render environment
Section titled “Render environment”| Variable | Description |
|---|---|
PRESSJS_RENDER_DEBUG | When set to a truthy value ("1", "true", "yes", "on"), preserves render debug logs from Press.js Cloud that are normally suppressed. |
PRESSJS_DEVICE_SCALE_FACTOR | Override the device scale factor for the rendering viewport. Default is 2, maximum is 4. Higher values produce sharper output at the cost of larger PDF files. |
Local runtime secrets
Section titled “Local runtime secrets”Local runtime secrets are configured in press.toml by mapping the page-facing secret name to a source environment variable:
[runtime.secrets]API_TOKEN = "PRESS_API_TOKEN"For press render, the CLI reads .dev.vars from the selected entry workspace and then overlays the current process environment. Process environment variables take precedence. Secret values are exposed during rendering through pressCloud.secrets and https://p.press.internal/environment.json.
PRESS_API_TOKEN=dev-tokenpress render --remote does not forward local runtime env/secrets or .dev.vars values. Remote renders use the environment and secrets configured on the Cloud deploy.
Cloud CLI
Section titled “Cloud CLI”Cloud authentication and connection variables:
| Variable | Description |
|---|---|
PRESS_CLOUD_TOKEN | API key for automated cloud authentication (prefix pcak_). Bypasses interactive login. |
PRESS_CLOUD_API_BASE | Override the Press.js Cloud API base URL. |
Cloud CLI installation variables:
| Variable | Description |
|---|---|
PRESSJS_CLOUD_INSTALL_DIR | Directory where the Press.js Cloud CLI binary is installed. Defaults to ~/.press-js/cloud. |
PRESSJS_CLOUD_CLI_PATH | Direct path to a press-cloud-cli binary. Bypasses install directory lookup. |
PRESS_CLOUD_CLI_DOWNLOAD_URL | Custom cloud CLI archive or binary URL. Overrides the default GitHub latest release lookup. |
Automatic update settings are stored in ~/.press-js/settings.json. Use press update config --auto true|false to change the setting.
See also
Section titled “See also”- press.toml Playwright options — same options in config file form
- Runtime configuration — payload, environment, secrets, and data access revocation