Commit f1a4612
authored
feat(kiloclaw): add headless Chromium browser support (#951)
## Summary
- Install chromium in the Docker image so OpenClaw's built-in browser
tool works out of the
box
- Configure browser.headless, browser.noSandbox, and browser.enabled in
the openclaw.json
config patch for containerized operation
- Sync the same browser config to config-writer.ts so config restores
don't lose browser
support
<!-- What changed and why? Keep this brief and outcome-focused. -->
<!-- Include any architectural changes and enough context for a reviewer
unfamiliar with this code area. -->
## Verification
<!-- List the checks you ran and what passed. Add command output notes
when useful. -->
- Deploy a fresh kiloclaw instance (destroy + recreate to trigger fresh
install path)
- Verify which chromium returns /usr/bin/chromium on the Fly machine
- Verify cat /root/.openclaw/openclaw.json | grep -A4 browser shows
enabled: true, headless:
true, noSandbox: true
- Verify Chromium processes are running (ps -ef | grep chromium)
- Ask the agent to use the browser tool (e.g. "use the browser tool to
open
https://example.com and take a screenshot") — confirms end-to-end CDP
functionality
- All 505 kiloclaw tests pass
## Visual Changes
None — this is backend/infrastructure only.
<!-- If UI/visual behavior changed, add before/after screenshots in the
table below. -->
<!-- If there are no visual changes, replace the table with: N/A -->
| Before | After |
| ------ | ----- |
| | |
## Reviewer Notes
- OpenClaw auto-detects /usr/bin/chromium on Linux and auto-adds
--disable-dev-shm-usage, so
no executablePath config is needed
- noSandbox: true is required in containers — Chromium's setuid sandbox
needs kernel
namespacing that's unavailable in Docker/Fly
- The chromium apt package installs to /usr/bin/ which is outside the
Fly Volume mount at
/root, so it survives volume mounts and restarts
- Image size increases ~200-250 MB due to Chromium and its dependencies
- Existing instances need tools.profile: "full" to see the browser tool
— the "messaging"
profile (onboard default) doesn't include it. Fresh installs already get
"full" via the
startup script
<!-- Optional: reviewer focus areas, edge cases, or context that helps
review quickly. -->5 files changed
Lines changed: 29 additions & 1 deletion
File tree
- kiloclaw
- controller/src
- src/app/(app)/claw/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
175 | 183 | | |
176 | 184 | | |
177 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
271 | 279 | | |
272 | 280 | | |
273 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
0 commit comments