{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "lightpanda-io-browser--run-puppeteer-scripts-on-lightpanda-over-cdp",
 "repo": "lightpanda-io/browser",
 "repo_url": "https://github.com/lightpanda-io/browser",
 "repo_slug": "lightpanda-io-browser",
 "title": "Run existing Puppeteer scripts on a lighter Browser",
 "page_title": "How to run existing Puppeteer scripts on a lighter Browser with Browser",
 "summary": "Start the Lightpanda CDP server and point puppeteer.connect at it, keeping the rest of your script the same.",
 "who": "A team paying for memory hungry headless Chrome fleets.",
 "problem": "Headless Chrome uses gigabytes of memory per batch of pages.",
 "outcome": "Your Puppeteer script running against Lightpanda on port 9222.",
 "steps": [
  "Install Lightpanda, or run it in Docker with `docker run -d --name lightpanda -p 127.0.0.1:9222:9222 lightpanda/browser:latest`",
  "Start the server with `./lightpanda serve --obey-robots --log-format pretty  --log-level info --host 127.0.0.1 --port 9222`",
  "In your script, call puppeteer.connect with browserWSEndpoint ws://127.0.0.1:9222 instead of launching Chrome",
  "Use `--protocol webdriver` if your client needs WebDriver BiDi"
 ],
 "agent_prompt": "With lightpanda-io/browser, start the CDP server on 127.0.0.1:9222 and change <my Puppeteer script> to connect with browserWSEndpoint, then compare its run time against Chrome.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "Lightpanda implements a growing subset of web APIs, so test pages that rely on unusual Browser features.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "",
 "requirements": [
  "Linux or macOS (x86_64 or aarch64); Windows only through WSL2; Linux binaries need glibc",
  "Install with `brew install lightpanda-io/browser/lightpanda`, a nightly binary, Nix or `docker run -d --name lightpanda -p 127.0.0.1:9222:9222 lightpanda/browser:latest`",
  "puppeteer-core or Playwright if you connect your own scripts over CDP"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "security",
   "notice": "Bind the CDP port to 127.0.0.1 as the README does; an exposed CDP port lets anyone drive the Browser."
  }
 ],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/lightpanda-io-browser/run-puppeteer-scripts-on-lightpanda-over-cdp/",
 "md": "https://dedupedai.com/use-cases/lightpanda-io-browser/run-puppeteer-scripts-on-lightpanda-over-cdp/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/lightpanda-io-browser--run-puppeteer-scripts-on-lightpanda-over-cdp.json",
 "api_version": "v1"
}
