Giving OpenClaw Eyes: A Practical Guide to Headless Browsers on ARM64 Servers
Many users choose to deploy OpenClaw on servers as a personal AI assistant, but by default OpenClaw cannot access the web. This is undoubtedly the biggest limitation for an AI assistant that needs to "surf the internet."
The good news is that by configuring a headless browser, we can give OpenClaw the ability to access web pages, take screenshots, and automate operations. This article will walk you through the complete configuration process on ARM64 architecture servers.
Why You Need a Browser
OpenClaw itself is an AI assistant framework. To make it truly "smart" enough to help you, browser capabilities are essential:
- Real-time information retrieval: Weather, news, stocks, etc.
- Web automation: Auto-filling forms, clicking operations, scheduled check-ins
- Content screenshots: Take screenshots of web pages to share with you
- Scraping capabilities: Fetch content from specific websites
The ARM64 Dilemma
The Chrome browser is only available for amd64 architecture, while many users use Apple Silicon Macs or ARM servers (like Tencent Cloud Lighthouse). This makes the常规 Chrome installation methods unusable.
There are two solutions:
- Use Snap Chromium: Built into Ubuntu, but tricky to configure
- Use Playwright Chromium: Cross-platform, ARM64 compatible
This article chooses solution 2 because it's more controllable.
Tech Stack
| Component | Purpose | Notes |
|---|---|---|
| Playwright | Browser automation framework | Provides Chromium binary |
| Chromium | Headless browser | ARM64 compatible version |
| CDP (Chrome DevTools Protocol) | Browser debugging protocol | OpenClaw controls the browser through this |
Complete Configuration Steps
1. Install Playwright Chromium
npx playwright install chromium
Playwright will automatically download the Chromium version that matches your current architecture.
2. Install Chinese Fonts
Chinese fonts need to be installed separately for headless browser screenshots:
sudo apt-get install -y fonts-wqy-microhei fonts-wqy-zenhei
fc-cache -fv
3. Start the Browser
We need to start Chromium in CDP mode:
nohup ~/.cache/ms-playwright/chromium-1208/chrome-linux/chrome \
--headless=new \
--no-sandbox \
--disable-gpu \
--remote-debugging-port=18800 \
--disable-dev-shm-usage \
--disable-software-rasterizer > /tmp/chrome.log 2>&1 &
# Verify startup success
curl -s http://127.0.0.1:18800/json/version
4. Configure OpenClaw
Edit ~/.openclaw/openclaw.json and add/modify the browser section:
{
"browser": {
"enabled": true,
"attachOnly": false,
"headless": true,
"noSandbox": true,
"profiles": {
"openclaw": {
"cdpPort": 18800,
"color": "0000FF"
}
}
}
}
5. Verify Configuration
openclaw browser status
openclaw browser screenshot
Advanced Usage
Auto-Start Script
To ensure the browser starts automatically after server restarts, it's recommended to add a systemd service:
[Unit]
Description=OpenClaw Headless Browser
After=network.target
[Service]
Type=simple
User=liuyaowen
ExecStart=/home/liuyaowen/.cache/ms-playwright/chromium-1208/chrome-linux/chrome --headless=new --no-sandbox --disable-gpu --remote-debugging-port=18800 --disable-dev-shm-usage
Restart=on-failure
[Install]
WantedBy=multi-user.target
Browser Profile Persistence
If you need to maintain login states, you can specify a user data directory:
--user-data-dir=/path/to/profile
This way the browser will remember cookies and sessions—log in once and you're set.
Troubleshooting
Fonts Still Gibberish
Check if fonts are loaded correctly:
fc-list :lang=zh
If empty, you may need to manually download fonts to a directory accessible by Chrome.
CDP Connection Failed
- Check if the port is in use:
lsof -i:18800 - Check browser logs:
cat /tmp/chrome.log - Try restarting the browser
Screenshot Blank
The page may not have finished loading yet—increase the wait time:
await page.waitForLoadState("networkidle");
Demo
Once configured, you can:
- Let AI check the weather for you: Take a screenshot of current weather and send it to you
- Auto check-in: Open the webpage daily at scheduled times and click the check-in button
- Content monitoring: Monitor a webpage for changes and notify you
- Generate reports: Automatically open the admin dashboard and screenshot to create daily reports
Summary
This article detailed the complete process of configuring a headless browser for OpenClaw on ARM64 servers. While it's more complex than simply installing Chrome, through the Playwright + CDP combination, we ultimately achieved:
- ✅ ARM64 compatibility
- ✅ Chinese font support
- ✅ OpenClaw integration
- ✅ Automation capabilities
If you also have a need to run an AI assistant on a server, give this solution a try.