The problem
Chromium’s sandbox needs user namespaces, which docker’s default seccomp profile blocks, so people add --no-sandbox everywhere. devsandbox makes the browser sandbox work where it can, checks each new container, and tells the tools which case they are in.
Try it
No config needed. run and devsandbox inspect web print what the check found:
browser sandbox: onPlaywright turns Chromium’s sandbox off by default, so launch it like this:
const browser = await chromium.launch({
chromiumSandbox: !!process.env.DEVSANDBOX_BROWSER_SANDBOX,
executablePath: process.env.DEVSANDBOX_CHROME,
});How it works
- Docker sandboxes get docker’s default seccomp profile plus user namespaces. Podman’s default already allows them.
- Where the check passes, every
execgetsDEVSANDBOX_BROWSER_SANDBOX=1. Where it fails, the tools’ own sandbox-off variables are set instead. - Where execs run as root,
DEVSANDBOX_CHROMEpoints at a wrapper that starts the browser as a non-root user. userns = falsekeeps docker’s default profile, with the browser sandbox off.
Agent instructions
Paste it into Claude Code, Codex or any agent with a shell. It finds your repo and config itself and asks only what it can't tell. Agent skills (opens in a new tab)
Source: site/src/content/examples/browsers.mdxEdit this page on GitHub(opens in a new tab)