Browser relay is the capability that lets OpenClaw interact with websites as if it has hands — clicking, typing, navigating, and reading content from any page. It's one of the more powerful and less commonly set up features.
What Browser Relay Enables
Without browser relay, OpenClaw's web capabilities are limited to API calls and plain HTTP requests. With it:
- Screenshots: "Take a screenshot of the current state of [URL]"
- Form filling: "Log into my router admin panel and check connected devices"
- Data extraction: "Go to [internal dashboard] and get today's sales figure"
- Navigation: "Open [URL], wait for the page to load, click [button], extract the result"
- Authenticated sessions: Maintain login sessions across tasks in the same browser context
Prerequisites
Browser relay requires Node.js and Playwright (or Puppeteer) installed on the OpenClaw host.
# Install Playwright
npm install -g playwright
playwright install chromium # Download the Chromium browser binary
On Ubuntu/Debian, you may need system dependencies:
sudo apt install -y libatk-bridge2.0-0 libcups2 libxkbcommon0 \
libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 \
libcairo2 libasound2
Configure Browser Relay in OpenClaw
# ~/.openclaw/config/integrations.yml
integrations:
browser_relay:
enabled: true
engine: "playwright" # or "puppeteer"
headless: true # false to see the browser window
default_timeout: 15000 # 15 seconds per action
screenshot_dir: "~/.openclaw/screenshots"
session_persistence: true # Keep cookies/sessions between tasks
allowed_domains: # Optional: restrict which sites can be accessed
- "*.yourcompany.com"
- "router.local"
Restart OpenClaw after editing.
Testing the Setup
Ask OpenClaw:
Take a screenshot of https://example.com and show it to me.
OpenClaw should:
- Launch a headless Chromium instance
- Navigate to example.com
- Capture a screenshot
- Return the file path or display the image
If it works, the relay is functional.
Usage Examples
Web Research and Extraction
Go to [news site URL] and give me the top 5 headlines from the homepage.
Navigate to [internal analytics URL], find the "Daily Active Users" metric, and tell me today's number.
Form Automation
Go to [your company's internal timesheet system]:
1. Log in with [username] (password is in my secure notes under "timesheet")
2. Mark today as "Remote Work"
3. Submit
Confirm when done.
Monitoring and Alerts
Check [URL] every hour. If the page shows "Status: Down", send me a WhatsApp alert.
Combined with a hook:
scheduled_tasks:
- name: "status-check"
cron: "0 * * * *"
prompt: |
Navigate to https://yourdomain.com/status
Extract the status text.
If it contains "Down" or "Error", trigger alert.status_down
Price Tracking
Check the price of [product] on [site]. If it's under [price], let me know.
Screenshot for Review
Take a screenshot of the current state of [dashboard URL] and send it to me.
I want to check how it looks without opening a browser.
Session Persistence
By default with session_persistence: true, OpenClaw maintains browser cookies and login sessions between tasks. This means:
- Log in once → subsequent tasks can access authenticated pages
- Sessions expire naturally as the site dictates
- Sessions are stored in
~/.openclaw/browser-sessions/
To log in and save a session:
Log into [site URL] with username [x] and password [y].
Save the session. I'll use it for future tasks.
To clear a session:
Clear my browser session for [site domain].
Security Considerations
Browser relay is powerful and should be handled carefully:
Restrict allowed domains. Use the allowed_domains config to prevent OpenClaw from accessing arbitrary sites through the relay.
Never pass passwords in plaintext chat. Store credentials in OpenClaw's secure vault integration and reference them by key, not inline.
Review before automating login flows. Make sure you understand what the relay will do before authorising it to log into systems on your behalf.
Headless detection. Some sites detect headless browsers and block them. This is expected behaviour — don't try to circumvent anti-bot measures on sites you don't own.
Troubleshooting
"Playwright not found":
npm install -g playwright && playwright install chromium
Browser crashes immediately on VPS: Missing system libraries. Run:
playwright install-deps chromium
Timeout errors on slow pages: Increase the timeout in config:
browser_relay:
default_timeout: 30000 # 30 seconds
"Target closed" errors:
Usually a site detecting and closing the headless session. Try with headless: false to test interactively, then identify what the site checks for.
Related reading: