Many students 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 provide a detailed walkthrough of 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" and help you get things done, browser capabilities are essential:
- Real-time information retrieval: Weather, news, stocks, etc.
- Web automation: Auto-filling forms, click operations, scheduled check-ins
- Content screenshots: Taking screenshots of web pages to send to you
- Scraping capabilities: Grabbing content from specific websites
The ARM64 Dilemma
The Chrome browser available on the market only comes in amd64 architecture versions, while many students use Apple Silicon Macs or ARM servers (like Tencent Cloud Lighthouse). This makes the常规的 Chrome installation methods impossible.
There are two solutions:
- Use Snap Chromium: Built into Ubuntu, but configuration is cumbersome
- 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 in headless browser screenshots need to be installed separately:
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, 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 reboot, 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 state, 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.
Common Issues
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 occupied:
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
After configuration, 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 backend and take screenshots to generate daily reports
Summary
This article provided a detailed walkthrough of the complete process to configure a headless browser for OpenClaw on ARM64 servers. Although the process is more complex than directly installing Chrome, through the Playwright + CDP combination, we finally achieved:
- ✅ ARM64 compatible
- ✅ 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.