Step by step documentation¶
Step 1 Install¶
We're ust going to follow https://docs.openclaw.ai/install.
I skipped everything
Configure gateway¶
We're running this in a VM and want to open up to the lan.
You're gateway should look something like
"gateway": {
"port": 18789,
"mode": "local",
"bind": "lan",
"auth": {
"mode": "token",
"token": "[redacted]"
},
"trustedProxies": ["192.168.5.8"],
"controlUi": {
"allowedOrigins": ["https://claw.domain.com"]
},
"tailscale": {
"mode": "off",
"resetOnExit": false
},
"nodes": {
"denyCommands": [
"camera.snap",
"camera.clip",
"screen.record",
"contacts.add",
"calendar.add",
"reminders.add",
"sms.send"
]
}
},
Go ahead and navigate to your website, paste in your token.
Then run openclaw devices list. Find the device id for approval and run openclaw devices approve <id>.
Browser¶
Let's go ahead and get the browser working.
I installed playwright with
Then you need a browser engine
then configure the browser block
"browser": {
"enabled": true,
"ssrfPolicy": {
"dangerouslyAllowPrivateNetwork": true
},
"remoteCdpTimeoutMs": 1500,
"remoteCdpHandshakeTimeoutMs": 3000,
"defaultProfile": "openclaw",
"color": "#FF4500",
"headless": true,
"noSandbox": true,
"attachOnly": false,
"executablePath": "/home/thomas/.cache/ms-playwright/chromium-1208/chrome-linux64/chrome",
"profiles": {
"openclaw": { "cdpPort": 18800, "color": "#FF4500" },
"work": { "cdpPort": 18801, "color": "#0066CC" },
"user": {
"driver": "existing-session",
"attachOnly": true,
"color": "#00AA00"
},
"remote": { "cdpUrl": "http://10.0.0.42:9222", "color": "#00AA00" }
}
},
Test out everything works
openclaw browser --browser-profile openclaw start
openclaw browser --browser-profile openclaw open https://example.com
openclaw browser --browser-profile openclaw screenshot --full-page
Models¶
Give it some models
Sandbox¶
Built openclaw-sandbox-common:bookworm-slim.
To use it, set agents.defaults.sandbox.docker.image to "openclaw-sandbox-common:bookworm-slim" and restart.
If you want a clean re-create, remove old sandbox containers:
docker rm -f $(docker ps -aq --filter label=openclaw.sandbox=1)
If you run into an error rebuilding:
Browser¶
I had trouble getting the browser to work inside of a sandbox. But I should look at this more closely (https://docs.openclaw.ai/gateway/sandboxing#what-gets-sandboxed). Sounds like I could also just use the hosts browser.
Instead I simply baked it into the Dockerfile.sandbox-common
# Install Playwright with Chromium and all system dependencies baked in
ENV PLAYWRIGHT_BROWSERS_PATH=/opt/ms-playwright
ENV NODE_PATH=/usr/local/lib/node_modules
RUN npm install -g playwright \
&& playwright install chromium --with-deps \
&& chmod -R o+rx /opt/ms-playwright
And then updated his TOOLS.md
Web Browser¶
- Use: Playwright via
exec— Chromium and Playwright are installed in your sandbox container - When: Whenever asked to screenshot a website, navigate through it, or interact with web UIs
- How: Write a Node.js script and run it with
exec. Always use--no-sandboxand--disable-dev-shm-usagelaunch args (required in containers). - Example — take a screenshot:
```
const { chromium } = require('playwright'); (async () => { const browser = await chromium.launch({ headless: true, args: ['--no-sandbox', '--disable-dev-shm-usage'] }); const page = await browser.newPage(); await page.goto('https://example.com'); await page.screenshot({ path: '/workspace/screenshot.png', fullPage: true }); await browser.close(); console.log('done'); })();
Heatbeat¶
Read https://docs.openclaw.ai/gateway/heartbeat
Make sure it's enabled
To manually trigger a heartbeat
mcporter¶
Install mcporter
After installing you can see example files in ~/.npm-global/lib/node_modules/mcporter/config/mcporter.json
For global config you can add a config file in /home/<user>/.mcporter/mcporter.json or navigate to an agents workspace and create a ./config/mcporter
From the workspace if you run the following, it will show you the active configs mcporter will use when running from this directory.
This will show you the project config and system config.
To list mcp servers
To see available tools for a server
name a tool to see its api docs
Execute a tool
Copilot CLI¶
Refer to https://github.com/github/copilot-cli for installation and basic usage
Info on custom agents: https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli
Interesting looking repo for remote control: https://github.com/devartifex/copilot-unleashed?tab=readme-ov-file