🔥 Spin up BotBrowser quickly with Docker.
This guide explains how to deploy BotBrowser using Docker and Docker Compose.
repo-root/
├── docker/
│ ├── Dockerfile
│ ├── docker-compose.yml
│ └── profiles/
│ └── your-profile.enc
├── user-data-dir/ # Persisted browser data
└── ...
- Dockerfile: Builds the BotBrowser image
- docker-compose.yml: Defines services, ports, and volumes
- profiles/: Place your encrypted profiles (
.enc) here - user-data-dir/: Host folder for cookies, cache, and session data
- Docker Engine >= 20.10
- Docker Compose >= 1.27
- A BotBrowser
.encprofile file
Tip: Run
docker versionanddocker-compose versionto check your setup.
-
Profile
- Copy your
.encfile intodocker/profiles/ - Update
PROFILE_NAMEor volume mapping indocker-compose.yml
- Copy your
-
Port
- Default: 9222
- Edit the
portssection indocker-compose.ymlto change
-
Volumes
./user-data-dir/: Persists browser data./docker/profiles/: Provides profiles to the container
From the project root:
cd docker
docker-compose up --build -dTo view logs:
docker-compose logs -f botbrowser- Open Chrome or Chromium
- Go to
chrome://inspect - Click Configure... and add
localhost:9222 - Find your BotBrowser instance under Remote Target
Playwright
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.connectOverCDT('ws://localhost:9222');
const page = await browser.newPage();
// ...
})();Puppeteer
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.connect({
browserWSEndpoint: 'ws://localhost:9222'
});
const page = await browser.newPage();
// ...
})();Set in docker-compose.yml:
services:
botbrowser:
environment:
- PORT=9222
- PROFILE_NAME=your-profile.enc| Issue | Solution |
|---|---|
| Container won't start | Check profile file exists and permissions |
| Port conflict | Change port mapping in docker-compose.yml |
| Data persistence issue | Ensure user-data-dir is writable |
For other issues, see the main README or open a GitHub issue.
⚠️ DISCLAIMERThese Docker projects are provided for educational purposes and to demonstrate the capabilities of BotBrowser. They are intended solely for legal use cases that comply with all applicable laws and regulations. Any misuse—such as violating website terms of service or engaging in unlawful activities—is strictly prohibited.
| Example Directory | Description |
|---|---|
| Cloudflare | Submit Cloudflare demo booking |
| Wizzair | Scraping flight prices with Docker |