Docker container for Camoufox — a stealthy, anti-detect browser built on Firefox that evades bot detection. Exposes a Playwright WebSocket server for remote browser automation.
Add to your docker-compose.yaml:
camoufox:
build: ./camoufox
container_name: camoufox
restart: always
ports:
- "9222:9222"
environment:
CAMOUFOX_PORT: 9222docker compose build camoufox
docker compose up -d camoufoxdocker build -t camoufox .
docker run -d --name camoufox -p 9222:9222 -e CAMOUFOX_PORT=9222 --restart always camoufoxEach time the container starts, it generates a random token for the WebSocket endpoint.
Option 1: Query the API (recommended for programmatic access)
curl -s http://localhost:9222/json
# {"wsEndpointPath":"/9fdb26279ee5d7d04595337a5acec1c7"}Option 2: Check the logs
docker logs camoufox
# Websocket endpoint: ws://localhost:9222/9fdb26279ee5d7d04595337a5acec1c7Option 3: Set a fixed token (no need to discover)
Set the CAMOUFOX_WS_PATH environment variable to use a predictable token that persists across restarts:
environment:
CAMOUFOX_PORT: 9222
CAMOUFOX_WS_PATH: my-secret-token
# Endpoint will always be: ws://localhost:9222/my-secret-token| Environment Variable | Default | Description |
|---|---|---|
CAMOUFOX_PORT |
9222 |
Port for the Playwright WebSocket server |
CAMOUFOX_WS_PATH |
(random) | Fixed WebSocket path/token. If unset, a random token is generated on each start. |
This container pairs with the n8n-nodes-camoufox community node. Configure the credential with:
- WebSocket Endpoint:
ws://camoufox:9222(the node auto-discovers the token via the/jsonAPI), orws://camoufox:9222/<token>with the full token
MIT