{"id":131,"date":"2026-03-21T22:47:18","date_gmt":"2026-03-21T14:47:18","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/gateway-multiple-gateways\/"},"modified":"2026-03-21T23:29:08","modified_gmt":"2026-03-21T15:29:08","slug":"gateway-multiple-gateways","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/gateway-multiple-gateways\/","title":{"rendered":"\u591a\u4e2a \u7f51\u5173 \u7f51\u5173"},"content":{"rendered":"<h1>\u591a\u4e2a Gateway \u7f51\u5173 \u7f51\u5173<\/h1>\n<h1>\u591a\u4e2a Gateway \u7f51\u5173 \u7f51\u5173\uff08\u540c\u4e00\u4e3b\u673a\uff09<\/h1>\n<p>\u5927\u591a\u6570\u8bbe\u7f6e\u5e94\u4f7f\u7528\u4e00\u4e2a Gateway \u7f51\u5173 \u7f51\u5173\uff0c\u56e0\u4e3a\u5355\u4e2a Gateway \u7f51\u5173 \u7f51\u5173\u53ef\u4ee5\u5904\u7406\u591a\u4e2a\u6d88\u606f\u8fde\u63a5\u548c\u667a\u80fd\u4f53\u3002\u5982\u679c\u4f60\u9700\u8981\u66f4\u5f3a\u7684\u9694\u79bb\u6216\u5197\u4f59\uff08\u4f8b\u5982\u6551\u63f4\u673a\u5668\u4eba\uff09\uff0c\u8bf7\u8fd0\u884c\u4f7f\u7528\u9694\u79bb\u914d\u7f6e\u6863\u6848\/\u7aef\u53e3\u7684\u72ec\u7acb Gateway \u7f51\u5173 \u7f51\u5173\u3002<\/p>\n<h2>\u9694\u79bb\u68c0\u67e5\u6e05\u5355\uff08\u5fc5\u9700\uff09<\/h2>\n<ul>\n<li><code>OPENCLAW_CONFIG_PATH<\/code> \u2014 \u6bcf\u4e2a\u5b9e\u4f8b\u5355\u72ec\u7684\u914d\u7f6e\u6587\u4ef6<\/li>\n<li><code>OPENCLAW_STATE_DIR<\/code> \u2014 \u6bcf\u4e2a\u5b9e\u4f8b\u5355\u72ec\u7684\u4f1a\u8bdd\u3001\u51ed\u8bc1\u3001\u7f13\u5b58<\/li>\n<li><code>agents.defaults.workspace<\/code> \u2014 \u6bcf\u4e2a\u5b9e\u4f8b\u5355\u72ec\u7684\u5de5\u4f5c\u533a\u6839\u76ee\u5f55<\/li>\n<li><code>gateway.port<\/code>\uff08\u6216 <code>--port<\/code>\uff09\u2014 \u6bcf\u4e2a\u5b9e\u4f8b\u552f\u4e00<\/li>\n<li>\u6d3e\u751f\u7aef\u53e3\uff08browser\/canvas\uff09\u4e0d\u5f97\u91cd\u53e0<\/li>\n<\/ul>\n<p>\u5982\u679c\u8fd9\u4e9b\u88ab\u5171\u4eab\uff0c\u4f60\u4f1a\u9047\u5230\u914d\u7f6e\u7ade\u4e89\u548c\u7aef\u53e3\u51b2\u7a81\u3002<\/p>\n<h2>\u63a8\u8350\uff1a\u914d\u7f6e\u6863\u6848\uff08<code>--profile<\/code>\uff09<\/h2>\n<p>\u914d\u7f6e\u6863\u6848\u4f1a\u81ea\u52a8\u9650\u5b9a <code>OPENCLAW_STATE_DIR<\/code> + <code>OPENCLAW_CONFIG_PATH<\/code>\uff0c\u5e76\u4e3a\u670d\u52a1\u540d\u79f0\u6dfb\u52a0\u540e\u7f00\u3002<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<\/p>\n<h1>main<\/h1>\n<p>openclaw &#8211;profile main setup<br \/>\nopenclaw &#8211;profile main \u7f51\u5173 &#8211;port 18789<\/p>\n<h1>rescue<\/h1>\n<p>openclaw &#8211;profile rescue setup<br \/>\nopenclaw &#8211;profile rescue \u7f51\u5173 &#8211;port 19001<\/p>\n<pre><code>\n\u6bcf\u4e2a\u914d\u7f6e\u6863\u6848\u7684\u670d\u52a1\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw --profile main gateway install\nopenclaw --profile rescue gateway install\n<\/code><\/pre>\n<h2>\u6551\u63f4\u673a\u5668\u4eba\u6307\u5357<\/h2>\n<p>\u5728\u540c\u4e00\u4e3b\u673a\u4e0a\u8fd0\u884c\u7b2c\u4e8c\u4e2a Gateway \u7f51\u5173 \u7f51\u5173\uff0c\u5e76\u4e3a\u5b83\u5355\u72ec\u8bbe\u7f6e\uff1a<\/p>\n<ul>\n<li>\u914d\u7f6e\u6863\u6848\/\u914d\u7f6e<\/li>\n<li>\u72b6\u6001\u76ee\u5f55<\/li>\n<li>\u5de5\u4f5c\u533a<\/li>\n<li>\u57fa\u7840\u7aef\u53e3\uff08\u4ee5\u53ca\u6d3e\u751f\u7aef\u53e3\uff09<\/li>\n<\/ul>\n<p>\u8fd9\u6837\u53ef\u4ee5\u5c06\u6551\u63f4\u673a\u5668\u4eba\u4e0e\u4e3b\u673a\u5668\u4eba\u9694\u79bb\uff0c\u56e0\u6b64\u5f53\u4e3b\u673a\u5668\u4eba\u5b95\u673a\u65f6\uff0c\u5b83\u4ecd\u53ef\u7528\u4e8e\u8c03\u8bd5\u6216\u5e94\u7528\u914d\u7f6e\u66f4\u6539\u3002<\/p>\n<p>\u7aef\u53e3\u95f4\u8ddd\uff1a\u57fa\u7840\u7aef\u53e3\u4e4b\u95f4\u81f3\u5c11\u4fdd\u7559 20 \u4e2a\u7aef\u53e3\uff0c\u4ee5\u8bf7\u786e\u4fdd\u6d3e\u751f\u7684 browser\/canvas\/CDP \u7aef\u53e3\u6c38\u4e0d\u51b2\u7a81\u3002<\/p>\n<h3>\u5982\u4f55\u5b89\u88c5\uff08\u6551\u63f4\u673a\u5668\u4eba\uff09<\/h3>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<\/p>\n<h1>Main bot\uff08\u73b0\u6709\u6216\u5168\u65b0\uff0c\u4e0d\u5e26 &#8211;profile \u53c2\u6570\uff09<\/h1>\n<h1>\u8fd0\u884c\u5728\u7aef\u53e3 18789 + Chrome CDC\/Canvas\/&#8230; \u7aef\u53e3<\/h1>\n<p>openclaw onboard<br \/>\nopenclaw \u7f51\u5173 install<\/p>\n<h1>Rescue bot\uff08\u9694\u79bb\u7684\u914d\u7f6e\u6863\u6848 + \u7aef\u53e3\uff09<\/h1>\n<p>openclaw &#8211;profile rescue onboard<\/p>\n<h1>\u8bf4\u660e\uff1a<\/h1>\n<h1>&#8211; \u5de5\u4f5c\u533a\u540d\u79f0\u9ed8\u8ba4\u4f1a\u8ffd\u52a0 -rescue \u540e\u7f00<\/h1>\n<h1>&#8211; \u7aef\u53e3\u81f3\u5c11\u5e94\u4e3a 18789 + 20 \u4e2a\u7aef\u53e3\uff0c<\/h1>\n<h1>\u6700\u597d\u9009\u62e9\u5b8c\u5168\u4e0d\u540c\u7684\u57fa\u7840\u7aef\u53e3\uff0c\u4f8b\u5982 19789\uff0c<\/h1>\n<h1>&#8211; \u5176\u4f59\u65b0\u624b\u5f15\u5bfc\u4e0e\u6b63\u5e38\u60c5\u51b5\u76f8\u540c<\/h1>\n<h1>\u5b89\u88c5\u670d\u52a1\uff08\u5982\u679c\u8bbe\u7f6e\u671f\u95f4\u672a\u81ea\u52a8\u5b8c\u6210\uff09<\/h1>\n<p>openclaw &#8211;profile rescue \u7f51\u5173 install<\/p>\n<pre><code>\n## \u7aef\u53e3\u6620\u5c04\uff08\u6d3e\u751f\uff09\n\n\u57fa\u7840\u7aef\u53e3 = `gateway.port`\uff08\u6216 `OPENCLAW_GATEWAY_PORT` \/ `--port`\uff09\u3002\n\n* browser \u63a7\u5236\u670d\u52a1\u7aef\u53e3 = \u57fa\u7840\u7aef\u53e3 + 2\uff08\u4ec5 loopback\uff09\n* canvas host \u7531 Gateway \u7f51\u5173 HTTP \u670d\u52a1\u5668\u63d0\u4f9b\uff08\u4e0e `gateway.port` \u4f7f\u7528\u76f8\u540c\u7aef\u53e3\uff09\n* Browser profile CDP \u7aef\u53e3\u4f1a\u4ece `browser.controlPort + 9 .. + 108` \u81ea\u52a8\u5206\u914d\n\n\u5982\u679c\u4f60\u5728\u914d\u7f6e\u6216\u73af\u5883\u53d8\u91cf\u4e2d\u8986\u76d6\u4e86\u5176\u4e2d\u4efb\u4f55\u4e00\u4e2a\uff0c\u5fc5\u987b\u786e\u4fdd\u5b83\u4eec\u5728\u6bcf\u4e2a\u5b9e\u4f8b\u4e4b\u95f4\u4fdd\u6301\u552f\u4e00\u3002\n\n## Browser\/CDP \u8bf4\u660e\uff08\u5e38\u89c1\u9677\u9631\uff09\n\n* **\u4e0d\u8981**\u5728\u591a\u4e2a\u5b9e\u4f8b\u4e0a\u5c06 `browser.cdpUrl` \u56fa\u5b9a\u4e3a\u76f8\u540c\u503c\u3002\n* \u6bcf\u4e2a\u5b9e\u4f8b\u90fd\u9700\u8981\u81ea\u5df1\u7684 browser \u63a7\u5236\u7aef\u53e3\u548c CDP \u8303\u56f4\uff08\u4ece\u5176 Gateway \u7f51\u5173\u7aef\u53e3\u6d3e\u751f\uff09\u3002\n* \u5982\u679c\u4f60\u9700\u8981\u663e\u5f0f CDP \u7aef\u53e3\uff0c\u8bf7\u4e3a\u6bcf\u4e2a\u5b9e\u4f8b\u8bbe\u7f6e `browser.profiles.&lt;name&gt;.cdpPort`\u3002\n* \u8fdc\u7a0b Chrome\uff1a\u4f7f\u7528 `browser.profiles.&lt;name&gt;.cdpUrl`\uff08\u6309\u914d\u7f6e\u6863\u6848\u3001\u6309\u5b9e\u4f8b\u8bbe\u7f6e\uff09\u3002\n\n## \u624b\u52a8\u73af\u5883\u53d8\u91cf\u793a\u4f8b\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nOPENCLAW_CONFIG_PATH=~\/.openclaw\/main.json \nOPENCLAW_STATE_DIR=~\/.openclaw-main \nopenclaw gateway --port 18789\n\nOPENCLAW_CONFIG_PATH=~\/.openclaw\/rescue.json \nOPENCLAW_STATE_DIR=~\/.openclaw-rescue \nopenclaw gateway --port 19001\n<\/code><\/pre>\n<h2>\u5feb\u901f\u68c0\u67e5<\/h2>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\nopenclaw --profile main status<br \/>\nopenclaw --profile rescue status<br \/>\nopenclaw --profile rescue browser status<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u591a\u4e2a Gateway \u7f51\u5173 \u7f51\u5173 \u591a\u4e2a Gateway \u7f51\u5173 \u7f51\u5173\uff08\u540c\u4e00\u4e3b\u673a\uff09 \u5927\u591a\u6570\u8bbe\u7f6e\u5e94\u4f7f\u7528\u4e00\u4e2a Gate [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-131","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"predecessor-version":[{"id":844,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/131\/revisions\/844"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}