Skip to main content

Prerequisites

Node.js 18+

Required for standalone and plugin installation

~500MB disk space

For Camoufox browser engine (downloads on first run)

Linux/macOS/Windows

Runs on all major operating systems

2GB RAM minimum

Recommended 4GB+ for multiple concurrent sessions

Installation options

Install from npm

npm install @askjo/camofox-browser

Start the server

npx camofox-browser
# Or if installed globally:
npm install -g @askjo/camofox-browser
camofox-browser
On first run, Camoufox will automatically download the browser engine (~300MB). This is cached locally at ~/.config/camoufox/.

Verify installation

curl http://localhost:9377/health
You should see:
{"ok": true, "engine": "camoufox", "browserConnected": false, "activeTabs": 0}

Environment variables

Configure the server with environment variables:
VariableDescriptionDefault
CAMOFOX_PORTServer port9377
NODE_ENVEnvironment modedevelopment
MAX_SESSIONSMax concurrent browser sessions50
MAX_TABS_PER_SESSIONMax tabs per user session10
SESSION_TIMEOUT_MSSession inactivity timeout1800000 (30min)
BROWSER_IDLE_TIMEOUT_MSKill browser when idle300000 (5min)
VariableDescriptionDefault
HANDLER_TIMEOUT_MSMax time for any handler30000 (30s)
MAX_CONCURRENT_PER_USERConcurrent request cap per user3
MAX_OLD_SPACE_SIZENode.js V8 heap limit (MB)128
NAVIGATE_TIMEOUT_MSNavigation timeout25000 (25s)
BUILDREFS_TIMEOUT_MSElement ref building timeout12000 (12s)
VariableDescriptionDefault
CAMOFOX_API_KEYEnable cookie import endpoint-
CAMOFOX_ADMIN_KEYRequired for POST /stop-
CAMOFOX_COOKIES_DIRDirectory for cookie files~/.camofox/cookies
Cookie import is disabled unless CAMOFOX_API_KEY is set. See Cookie Import for setup.
VariableDescriptionDefault
PROXY_HOSTProxy hostname or IP-
PROXY_PORTProxy port-
PROXY_USERNAMEProxy auth username-
PROXY_PASSWORDProxy auth password-
When a proxy is configured:
  • All traffic routes through the proxy
  • Camoufox’s GeoIP automatically sets locale, timezone, and geolocation to match the proxy’s exit IP
  • Browser fingerprint is consistent with proxy location
Example:
export PROXY_HOST=166.88.179.132
export PROXY_PORT=46040
export PROXY_USERNAME=myuser
export PROXY_PASSWORD=mypass
npm start

Resource requirements

Minimum:
  • CPU: 1 core
  • RAM: 2GB
  • Disk: 1GB (500MB for Camoufox + dependencies)
Recommended:
  • CPU: 2 cores
  • RAM: 4GB
  • Disk: 2GB

Optional dependencies

yt-dlp (YouTube transcripts)

For fast YouTube transcript extraction:
pip install yt-dlp
Without yt-dlp, the /youtube/transcript endpoint falls back to a slower browser-based method.
The Docker image includes yt-dlp by default.

Verify installation

Run these checks to ensure everything works:
1

Health check

curl http://localhost:9377/health
Should return: {"ok": true, "engine": "camoufox"}
2

Create a test tab

curl -X POST http://localhost:9377/tabs \
  -H 'Content-Type: application/json' \
  -d '{"userId": "test", "sessionKey": "verify", "url": "https://example.com"}'
Should return a tabId.
3

Get snapshot

curl "http://localhost:9377/tabs/TAB_ID/snapshot?userId=test"
Should return accessibility tree with “Example Domain” heading.
If step 2 hangs for ~30 seconds, this is normal on first run - Camoufox is launching the browser for the first time.

Troubleshooting

Error: Error: Cannot find module 'camoufox-js'Solution:
npm install
Error: Error: EADDRINUSE: address already in useSolution: Port 9377 is in use. Change port:
CAMOFOX_PORT=8080 npm start
Error: Error: Browser download failedSolution:
  1. Check internet connection
  2. Retry: npx camoufox-js fetch
  3. If behind a proxy, set HTTP_PROXY environment variable
Manual download:
npx camoufox-js fetch --force
Error: JavaScript heap out of memorySolution: Increase Node.js heap size:
node --max-old-space-size=512 server.js
Or set environment variable:
export MAX_OLD_SPACE_SIZE=512
npm start
Error: Plugin @askjo/camofox-browser failed to loadSolution:
  1. Check plugin is installed: openclaw plugins list
  2. Reinstall: openclaw plugins install @askjo/camofox-browser
  3. Check logs: openclaw logs

Next steps

Quickstart

Try your first browser automation workflow

API reference

Explore all endpoints and parameters

Cookie import

Set up authenticated browsing for LinkedIn, Amazon, etc.

Search macros

Use built-in shortcuts for Google, YouTube, Reddit, and more

Build docs developers (and LLMs) love