Bind the Browser CDP Port to the Local Network
By default, the browser hosted by OpenClaw is forcibly bound to the loopback interface, requiring no additional specification. This item is for verification purposes only. If browser-related configurations exist, verify them by performing the following operations. OpenClaw actively rejects non-local bindings to prevent the CDP service from being exposed to the network.
Procedure
- Configure the openclaw.json file.
- Open the configuration file.
vim ~/.openclaw/openclaw.json
- Press i to enter the insert mode and modify the following content. If it does not exist, manually add it.
{ "browser": { "enabled": true, "defaultProfile": "local-browser", "profiles": { "local-browser": { "cdpUrl": "http://127.0.0.1:9222", // Select a port number based on the actual situation. "color": "#00AA00" } } } } - Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Restart the OpenClaw gateway.
openclaw gateway restart
- Open the configuration file.
Parent topic: Manual Configuration Items