{"id":20080,"date":"2026-04-17T10:56:03","date_gmt":"2026-04-17T02:56:03","guid":{"rendered":"https:\/\/blog.ywdevops.cn\/?p=20080"},"modified":"2026-04-17T14:51:09","modified_gmt":"2026-04-17T06:51:09","slug":"openclaw-4","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2026\/04\/17\/openclaw-4\/","title":{"rendered":"Openclaw\u8282\u70b9"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u9664\u4e86Openclaw gateway\u5916\uff0copenclaw\u8fd8\u6709\u8282\u70b9\uff0c\u7f51\u5173\u548c\u8282\u70b9\u7684\u533a\u522b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">openclaw gateway(\u7f51\u5173)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u662f<strong>\u4e3b\u670d\u52a1<\/strong>\uff0c\u8fd0\u884c\u5728\u4f60\u7684\u673a\u5668\u4e0a<\/li>\n\n\n\n<li>\u7ba1\u7406\uff1a\u5de5\u5177\u8c03\u7528\u3001\u6743\u9650\u63a7\u5236\u3001cron\u5b9a\u65f6\u4efb\u52a1\u3001\u5185\u5b58\u8bb0\u5fc6\u3001\u4f1a\u8bdd\u8def\u7531<\/li>\n\n\n\n<li><code>openclaw gateway start\/stop<\/code>&nbsp;\u5c31\u662f\u63a7\u5236\u5b83<\/li>\n\n\n\n<li>\u5b83\u662f<strong>\u552f\u4e00\u80fd\u8c03\u7528 exec\u3001cron\u3001memory\u3001sessions<\/strong>&nbsp;\u7b49\u6838\u5fc3\u5de5\u5177\u7684\u201c\u5927\u8111\u201d<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">openclaw node \uff08\u8282\u70b9\uff09<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53ef\u4ee5\u662f<strong>\u672c\u5730\u5b50\u8fdb\u7a0b<\/strong>\uff08\u6bd4\u5982\u4f60 spawn \u7684\u4e00\u4e2a subagent\uff09<\/li>\n\n\n\n<li>\u4e5f\u53ef\u4ee5\u662f<strong>\u8fdc\u7a0b\u8282\u70b9<\/strong>\uff08\u672a\u6765\u652f\u6301\u5206\u5e03\u5f0f\u65f6\uff0c\u6bd4\u5982\u53e6\u4e00\u53f0\u673a\u5668\uff09<\/li>\n\n\n\n<li>\u5b83<strong>\u4e0d\u80fd\u72ec\u7acb\u8fd0\u884c<\/strong>\uff0c\u5fc5\u987b\u7531 Gateway \u6307\u6325<\/li>\n\n\n\n<li>\u6bd4\u5982\u4f60\u7528&nbsp;<code>sessions_spawn<\/code>&nbsp;\u521b\u5efa\u7684 ACP \u7f16\u7801\u4f1a\u8bdd\uff0c\u5c31\u662f\u4e00\u4e2a\u201c\u8282\u70b9\u201d<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u603b\u7ed3\uff1a\u7f51\u5173\u4e0b\u53d1\u547d\u4ee4\uff0c\u8282\u70b9\u5e72\u6d3b<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u8fdc\u7a0b\u8282\u70b9<\/mark><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">opencalw\u8282\u70b9\u4f7f\u7528\u7684\u4e5f\u662f\u8ddf\u7f51\u5173\u540c\u6837\u7684\u4e00\u4e2a\u5b89\u88c5\u5305\uff0c\u53ea\u662f\u542f\u52a8\u7684\u65f6\u5019\u662f\u901a\u8fc7\u8282\u70b9\u6a21\u5f0f\u6765\u542f\u52a8\u7684\u800c\u5df2\uff0c\u8fd9\u91cc\u6f14\u793a\u901a\u8fc7docker\u5bb9\u5668\u65b9\u5f0f\u6765\u542f\u52a8\u8282\u70b9\uff0c\u5e76\u8fde\u63a5\u5230gateway<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u9996\u5148\u521b\u5efa\u672c\u5730\u6620\u5c04\u76ee\u5f55\uff0c\u628a\u5bb9\u5668\u5185\u90e8\u7684\u76ee\u5f55\u6620\u5c04\u51fa\u6765\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/data\/openclaw &amp;&amp; chown 1000:1000 openclaw<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u7f16\u8f91docker.sh\u7684\u811a\u672c\uff0c\u8fd9\u91cc\u7684openclaw\u4e3aopenclaw:4.14\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\r\nGATEWAY_HOME=\"192.168.49.244\"\r\nGATEWAY_TOKEN=\"ba6de6aa02328ed45dba2579d20f1621bda212fe75ef37a5\"\r\ndocker run -d \\\r\n  --name openclaw-node \\\r\n  --restart unless-stopped \\\r\n  -v \/data\/openclaw:\/home\/node\/.openclaw \\\r\n  -e OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 \\\r\n  -e OPENCLAW_GATEWAY_TOKEN=\"$GATEWAY_TOKEN\" \\\r\n  ghcr.io\/openclaw\/openclaw:latest \\\r\n  openclaw node run \\\r\n  --host ${GATEWAY_HOME} \\\r\n  --port 18789 \\\r\n  --display-name \"gateway-node-02\"<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>GATEWAY_HOME: openclaw gateway\u7684IP\u5730\u5740(\u4e3b\u670d\u52a1\u5730\u5740\uff0c\u6709\u57df\u540d\u5c31\u7528\u57df\u540d)<\/li>\n\n\n\n<li>GATEWAY_TOKEN: \u8fde\u63a5gateway\u9700\u8981\u7684TOKEN\uff0cgateway\u914d\u7f6eopenclaw.json\u4e2dauth.token\u7684\u503c<\/li>\n\n\n\n<li>OPENCLAW_ALLOW_INSECURE_PRIVATE_WS\uff1a\u5141\u8bb8\u5728<strong>\u79c1\u6709\u5185\u7f51\uff08\u975e\u516c\u7f51\uff09<strong>\u4e2d\u4f7f\u7528<\/strong>\u660e\u6587 WebSocket (<code>ws:\/\/<\/code>)<\/strong> \u8fde\u63a5\uff0c\u7ed5\u8fc7\u7cfb\u7edf\u9ed8\u8ba4\u7684\u5b89\u5168\u68c0\u67e5<\/li>\n\n\n\n<li>display-name\uff1a\u81ea\u5b9a\u4e49\u8282\u70b9\u540d\u5b57<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd0\u884c\u8d77\u6765\u540e\uff0c\u67e5\u770bopenclaw-node\u65e5\u5fd7\uff0c\u53ef\u4ee5\u770b\u5230\u51fa\u73b0\u6279\u51c6\u8bf7\u6c42\uff0c\u4e5f\u5c31\u662f\u9700\u8981gateway\u6279\u51c6\u52a0\u5165\u624d\u884c<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"91\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/4-2.png\" alt=\"\" class=\"wp-image-20090\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/4-2.png 683w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/4-2-300x40.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/4-2-600x80.png 600w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001\u5728openclaw gateway\u7aef\u67e5\u770b\u6279\u51c6\u8bf7\u6c42\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openclaw devices list<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"656\" height=\"169\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/5-2.png\" alt=\"\" class=\"wp-image-20092\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/5-2.png 656w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/5-2-300x77.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/5-2-600x155.png 600w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u67e5\u770b\u5df2\u6279\u51c6\u540e\u7684\u8282\u70b9\u72b6\u6001\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openclaw nodes status<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"653\" height=\"303\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/6-2.png\" alt=\"\" class=\"wp-image-20094\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/6-2.png 653w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/6-2-300x139.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/6-2-600x278.png 600w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001\u6d4b\u8bd5\u4e0bgateway\u7f51\u5173\u53d1\u9001\u547d\u4ee4\u7ed9\u8282\u70b9\u53bb\u6267\u884c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8981\u8ba9 OpenClaw Gateway \u7ed9\u8282\u70b9\uff08Node\uff09\u4e0b\u53d1\u547d\u4ee4\uff0c\u6838\u5fc3\u662f\u901a\u8fc7 <code>openclaw nodes run<\/code>\u6216 <code>openclaw nodes invoke<\/code>\u547d\u4ee4\uff0c\u901a\u8fc7 Gateway \u7684 WebSocket RPC \u8c03\u7528\u8282\u70b9\u7684 <code>system.run<\/code>\u80fd\u529b\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\u548c\u5173\u952e\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8282\u70b9\u7c7b\u578b<\/strong>\uff1a\u76ee\u6807\u8282\u70b9\u5fc5\u987b\u662f macOS \u4f34\u4fa3\u5e94\u7528\uff08Companion App\uff09\u6216\u65e0\u5934\u8282\u70b9\u4e3b\u673a\uff08Headless Node Host\uff09<\/li>\n\n\n\n<li><strong>\u80fd\u529b\u652f\u6301<\/strong>\uff1a\u8282\u70b9\u9700\u5bf9\u5916\u63d0\u4f9b <code>system.run<\/code>\u80fd\u529b<\/li>\n\n\n\n<li><strong>\u914d\u5bf9\u72b6\u6001<\/strong>\uff1a\u8282\u70b9\u5df2\u8fde\u63a5\u5230 Gateway \u5e76\u5b8c\u6210\u914d\u5bf9\u5ba1\u6279\uff08\u4f7f\u7528 <code>openclaw nodes approve<\/code>\uff09<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c\u547d\u4ee4\u83b7\u53d6\u4e0bgateway-node-02\u8282\u70b9\u7684\u78c1\u76d8\u4fe1\u606f\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openclaw nodes run --node gateway-node-02 \"df -h\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u62a5\u9519\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nodes run failed: GatewayClientRequestError: INVALID_REQUEST: SYSTEM_RUN_DENIED: approval requires a stable executable path<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u9519\u8bef\u8868\u660e OpenClaw \u7684\u5b89\u5168\u7b56\u7565\u6b63\u5728\u53d1\u6325\u4f5c\u7528\uff0c\u4f7f\u7528\u7684\u547d\u4ee4\u91cc\u5305\u542b\u4e86\u4e00\u4e2a\u65e0\u6cd5\u88ab\u89e3\u6790\u4e3a\u771f\u5b9e\u7edd\u5bf9\u8def\u5f84\u7684\u7a0b\u5e8f\u540d\uff08\u4f8b\u5982\uff0c\u4e00\u4e2a\u53ea\u5728 <code>PATH<\/code>\u73af\u5883\u53d8\u91cf\u91cc\u7684\u540d\u5b57\uff0c\u5982 <code>ls<\/code>\u6216 <code>python<\/code>\uff09\uff0c\u8fd9\u5728\u65b0\u7b56\u7565\u4e0b\u662f\u4e0d\u88ab\u5141\u8bb8\u7684\uff0c\u63a8\u8350\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openclaw nodes run --node gateway-node-02 \"\/usr\/bin\/df -h\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd8\u662f<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u62a5\u4e0a\u9762\u7684\u9519\u8bef<\/mark><\/strong>\uff0c\u8fd9\u901a\u5e38\u662f\u56e0\u4e3a<strong>\u8282\u70b9\u7684\u6267\u884c\u5ba1\u6279\uff08Exec Approvals\uff09\u7b56\u7565\u5c1a\u672a\u5bf9\u8be5\u8def\u5f84\u653e\u884c<\/strong>\u3002\u81ea 2026.3.x \u7248\u672c\u8d77\uff0cOpenClaw \u5f3a\u5236\u8981\u6c42\u8def\u5f84\u5339\u914d\u548c\u5ba1\u6279\uff0c\u4ec5\u63d0\u4f9b\u8def\u5f84\u4e0d\u8db3\u4ee5\u7ed5\u8fc7\u5b89\u5168\u68c0\u67e5\uff0c\u8282\u70b9\u4e3b\u673a\u7684 <code>exec-approvals.json<\/code>\u7b56\u7565\u76ee\u524d\u5f88\u53ef\u80fd\u5904\u4e8e\u9ed8\u8ba4\u7684 <code>allowlist<\/code>\uff08\u767d\u540d\u5355\uff09\u6a21\u5f0f\u3002\u7531\u4e8e <code>\/usr\/bin\/df<\/code>\u4e0d\u5728\u767d\u540d\u5355\u4e2d\uff0c\u4e14\u4f60\u6ca1\u6709\u8bbe\u7f6e\u81ea\u52a8\u653e\u884c\uff0c\u7cfb\u7edf\u56e0\u627e\u4e0d\u5230\u5339\u914d\u7684\u5ba1\u6279\u89c4\u5219\u800c\u62d2\u7edd\u6267\u884c\uff0c\u67e5\u770b\u5f53\u524d\u5ba1\u6279\u72b6\u6001\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openclaw approvals get --node gateway-node-02<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"654\" height=\"341\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/7-3.png\" alt=\"\" class=\"wp-image-20099\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/7-3.png 654w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/7-3-300x156.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/04\/7-3-600x313.png 600w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u9664\u4e86Openclaw gateway\u5916\uff0copenclaw\u8fd8\u6709\u8282\u70b9\uff0c\u7f51\u5173\u548c\u8282\u70b9\u7684\u533a\u522b\u5982\u4e0b\uff1a openclaw g [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":20081,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-20080","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/20080","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=20080"}],"version-history":[{"count":12,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/20080\/revisions"}],"predecessor-version":[{"id":20100,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/20080\/revisions\/20100"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/20081"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=20080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=20080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=20080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}