{"id":67,"date":"2026-03-21T22:47:15","date_gmt":"2026-03-21T14:47:15","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/cli-node\/"},"modified":"2026-03-21T23:08:55","modified_gmt":"2026-03-21T15:08:55","slug":"cli-node","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/cli-node\/","title":{"rendered":"node"},"content":{"rendered":"<h1>node<\/h1>\n<h1><code>openclaw node<\/code><\/h1>\n<p>\u8fd0\u884c\u4e00\u4e2a<strong>\u65e0\u5934\u8282\u70b9\u4e3b\u673a<\/strong>\uff0c\u8fde\u63a5\u5230 Gateway \u7f51\u5173 WebSocket \u5e76\u5728\u6b64\u673a\u5668\u4e0a\u66b4\u9732<br \/>\n<code>system.run<\/code> \/ <code>system.which<\/code>\u3002<\/p>\n<h2>\u4e3a\u4ec0\u4e48\u4f7f\u7528\u8282\u70b9\u4e3b\u673a\uff1f<\/h2>\n<p>\u5f53\u4f60\u5e0c\u671b\u667a\u80fd\u4f53<strong>\u5728\u7f51\u7edc\u4e2d\u7684\u5176\u4ed6\u673a\u5668\u4e0a\u8fd0\u884c\u547d\u4ee4<\/strong>\uff0c\u800c\u65e0\u9700\u5728\u90a3\u91cc\u5b89\u88c5\u5b8c\u6574\u7684 macOS \u914d\u5957\u5e94\u7528\u65f6\uff0c\u8bf7\u4f7f\u7528\u8282\u70b9\u4e3b\u673a\u3002<\/p>\n<p>\u5e38\u89c1\u7528\u4f8b\uff1a<\/p>\n<ul>\n<li>\u5728\u8fdc\u7a0b Linux\/Windows \u673a\u5668\u4e0a\u8fd0\u884c\u547d\u4ee4\uff08\u6784\u5efa\u670d\u52a1\u5668\u3001\u5b9e\u9a8c\u5ba4\u673a\u5668\u3001NAS\uff09\u3002<\/li>\n<li>\u5728 Gateway \u7f51\u5173\u4e0a\u4fdd\u6301\u6267\u884c\u7684<strong>\u6c99\u7bb1\u9694\u79bb<\/strong>\uff0c\u4f46\u5c06\u6279\u51c6\u7684\u8fd0\u884c\u59d4\u6258\u7ed9\u5176\u4ed6\u4e3b\u673a\u3002<\/li>\n<li>\u4e3a\u81ea\u52a8\u5316\u6216 CI \u8282\u70b9\u63d0\u4f9b\u8f7b\u91cf\u7ea7\u3001\u65e0\u5934\u7684\u6267\u884c\u76ee\u6807\u3002<\/li>\n<\/ul>\n<p>\u6267\u884c\u4ecd\u7136\u53d7<strong>\u6267\u884c\u6279\u51c6<\/strong>\u548c\u8282\u70b9\u4e3b\u673a\u4e0a\u7684\u6bcf\u667a\u80fd\u4f53\u5141\u8bb8\u5217\u8868\u4fdd\u62a4\uff0c\u56e0\u6b64\u4f60\u53ef\u4ee5\u4fdd\u6301\u547d\u4ee4\u8bbf\u95ee\u7684\u8303\u56f4\u660e\u786e\u3002<\/p>\n<h2>\u6d4f\u89c8\u5668\u4ee3\u7406\uff08\u96f6\u914d\u7f6e\uff09<\/h2>\n<p>\u5982\u679c\u8282\u70b9\u4e0a\u7684 <code>browser.enabled<\/code> \u672a\u88ab\u7981\u7528\uff0c\u8282\u70b9\u4e3b\u673a\u4f1a\u81ea\u52a8\u5e7f\u64ad\u6d4f\u89c8\u5668\u4ee3\u7406\u3002\u8fd9\u8ba9\u667a\u80fd\u4f53\u65e0\u9700\u989d\u5916\u914d\u7f6e\u5373\u53ef\u5728\u8be5\u8282\u70b9\u4e0a\u4f7f\u7528\u6d4f\u89c8\u5668\u81ea\u52a8\u5316\u3002<\/p>\n<p>\u5982\u9700\u5728\u8282\u70b9\u4e0a\u7981\u7528\uff1a<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  nodeHost: {<br \/>\n    browserProxy: {<br \/>\n      enabled: false,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n## \u8fd0\u884c\uff08\u524d\u53f0\uff09\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw node run --host &lt;gateway-host&gt; --port 18789\n<\/code><\/pre>\n<p>\u9009\u9879\uff1a<\/p>\n<ul>\n<li><code>--host &lt;host&gt;<\/code>\uff1aGateway \u7f51\u5173 WebSocket \u4e3b\u673a\uff08\u9ed8\u8ba4\uff1a<code>127.0.0.1<\/code>\uff09<\/li>\n<li><code>--port &lt;port&gt;<\/code>\uff1aGateway \u7f51\u5173 WebSocket \u7aef\u53e3\uff08\u9ed8\u8ba4\uff1a<code>18789<\/code>\uff09<\/li>\n<li><code>--tls<\/code>\uff1a\u4e3a Gateway \u7f51\u5173\u8fde\u63a5\u4f7f\u7528 TLS<\/li>\n<li><code>--tls-fingerprint &lt;sha256&gt;<\/code>\uff1a\u9884\u671f\u7684 TLS \u8bc1\u4e66\u6307\u7eb9\uff08sha256\uff09<\/li>\n<li><code>--node-id &lt;id&gt;<\/code>\uff1a\u8986\u76d6\u8282\u70b9 id\uff08\u6e05\u9664\u914d\u5bf9 token\uff09<\/li>\n<li><code>--display-name &lt;name&gt;<\/code>\uff1a\u8986\u76d6\u8282\u70b9\u663e\u793a\u540d\u79f0<\/li>\n<\/ul>\n<h2>\u670d\u52a1\uff08\u540e\u53f0\uff09<\/h2>\n<p>\u5c06\u65e0\u5934\u8282\u70b9\u4e3b\u673a\u5b89\u88c5\u4e3a\u7528\u6237\u670d\u52a1\u3002<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw node install &#8211;host  &#8211;port 18789<\/p>\n<pre><code>\n\u9009\u9879\uff1a\n\n* `--host &lt;host&gt;`\uff1aGateway \u7f51\u5173 WebSocket \u4e3b\u673a\uff08\u9ed8\u8ba4\uff1a`127.0.0.1`\uff09\n* `--port &lt;port&gt;`\uff1aGateway \u7f51\u5173 WebSocket \u7aef\u53e3\uff08\u9ed8\u8ba4\uff1a`18789`\uff09\n* `--tls`\uff1a\u4e3a Gateway \u7f51\u5173\u8fde\u63a5\u4f7f\u7528 TLS\n* `--tls-fingerprint &lt;sha256&gt;`\uff1a\u9884\u671f\u7684 TLS \u8bc1\u4e66\u6307\u7eb9\uff08sha256\uff09\n* `--node-id &lt;id&gt;`\uff1a\u8986\u76d6\u8282\u70b9 id\uff08\u6e05\u9664\u914d\u5bf9 token\uff09\n* `--display-name &lt;name&gt;`\uff1a\u8986\u76d6\u8282\u70b9\u663e\u793a\u540d\u79f0\n* `--runtime &lt;runtime&gt;`\uff1a\u670d\u52a1\u8fd0\u884c\u65f6\uff08`node` \u6216 `bun`\uff09\n* `--force`\uff1a\u5982\u679c\u5df2\u5b89\u88c5\u5219\u91cd\u65b0\u5b89\u88c5\/\u8986\u76d6\n\n\u7ba1\u7406\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 node status\nopenclaw node stop\nopenclaw node restart\nopenclaw node uninstall\n<\/code><\/pre>\n<p>\u4f7f\u7528 <code>openclaw node run<\/code> \u8fd0\u884c\u524d\u53f0\u8282\u70b9\u4e3b\u673a\uff08\u65e0\u670d\u52a1\uff09\u3002<\/p>\n<p>\u670d\u52a1\u547d\u4ee4\u63a5\u53d7 <code>--json<\/code> \u4ee5\u83b7\u53d6\u673a\u5668\u53ef\u8bfb\u8f93\u51fa\u3002<\/p>\n<h2>\u914d\u5bf9<\/h2>\n<p>\u9996\u6b21\u8fde\u63a5\u4f1a\u5728 Gateway \u7f51\u5173\u4e0a\u521b\u5efa\u5f85\u5904\u7406\u7684\u8282\u70b9\u914d\u5bf9\u8bf7\u6c42\u3002<br \/>\n\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u6279\u51c6\uff1a<\/p>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\nopenclaw nodes pending<br \/>\nopenclaw nodes approve &lt;requestId&gt;<\/code><\/p>\n<p>\u8282\u70b9\u4e3b\u673a\u5c06\u5176\u8282\u70b9 id\u3001token\u3001\u663e\u793a\u540d\u79f0\u548c Gateway \u7f51\u5173\u8fde\u63a5\u4fe1\u606f\u5b58\u50a8\u5728<br \/>\n<code>~\/.openclaw\/node.json<\/code> \u4e2d\u3002<\/p>\n<h2>\u6267\u884c\u6279\u51c6<\/h2>\n<p><code>system.run<\/code> \u53d7\u672c\u5730\u6267\u884c\u6279\u51c6\u9650\u5236\uff1a<\/p>\n<ul>\n<li><code>~\/.openclaw\/exec-approvals.json<\/code><\/li>\n<li><a href=\"\/tools\/exec-approvals\">\u6267\u884c\u6279\u51c6<\/a><\/li>\n<li><code>openclaw approvals --node &lt;id|name|ip&gt;<\/code>\uff08\u4ece Gateway \u7f51\u5173\u7f16\u8f91\uff09<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>node openclaw node \u8fd0\u884c\u4e00\u4e2a\u65e0\u5934\u8282\u70b9\u4e3b\u673a\uff0c\u8fde\u63a5\u5230 Gateway \u7f51\u5173 WebSocket  [&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-67","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/67","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=67"}],"version-history":[{"count":1,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":362,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions\/362"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}