{"id":753,"date":"2026-03-21T23:08:58","date_gmt":"2026-03-21T15:08:58","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/install\/"},"modified":"2026-03-21T23:08:58","modified_gmt":"2026-03-21T15:08:58","slug":"install","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/install\/","title":{"rendered":"\u5b89\u88c5"},"content":{"rendered":"<h1>\u5b89\u88c5<\/h1>\n<p>\u5df2\u7ecf\u6309\u7167 <a href=\"\/start\/getting-started\">\u5165\u95e8\u6307\u5357<\/a> \u64cd\u4f5c\u8fc7\u4e86\u5417\uff1f\u90a3\u4f60\u5df2\u7ecf\u51c6\u5907\u597d\u4e86 \u2014\u2014 \u672c\u9875\u9002\u7528\u4e8e\u5176\u4ed6\u5b89\u88c5\u65b9\u6cd5\u3001\u7279\u5b9a\u5e73\u53f0\u8bf4\u660e\u4ee5\u53ca\u7ef4\u62a4\u64cd\u4f5c\u3002<\/p>\n<h2>\u7cfb\u7edf\u8981\u6c42<\/h2>\n<ul>\n<li><strong><a href=\"\/install\/node\">Node 24\uff08\u63a8\u8350\uff09<\/a><\/strong>\uff08\u51fa\u4e8e\u517c\u5bb9\u6027\u8003\u8651\uff0c\u4ecd\u652f\u6301 Node 22 LTS\uff0c\u76ee\u524d\u4e3a <code>22.16+<\/code>\uff1b\u5982\u679c\u7f3a\u5931\uff0c<a href=\"#install-methods\">\u5b89\u88c5\u811a\u672c<\/a> \u4f1a\u5b89\u88c5 Node 24\uff09<\/li>\n<li>macOS\u3001Linux \u6216 Windows<\/li>\n<li>\u4ec5\u5f53\u4f60\u4ece\u6e90\u7801\u6784\u5efa\u65f6\u9700\u8981 <code>pnpm<\/code><\/li>\n<\/ul>\n<p>\n  \u5728 Windows \u4e0a\uff0c\u6211\u4eec\u5f3a\u70c8\u5efa\u8bae\u4f60\u5728 <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/wsl\/install\">WSL2<\/a> \u4e0b\u8fd0\u884c OpenClaw\u3002\n<\/p>\n<h2>\u5b89\u88c5\u65b9\u6cd5<\/h2>\n<p>\n  <strong>\u5b89\u88c5\u811a\u672c<\/strong> \u662f\u5b89\u88c5 OpenClaw \u7684\u63a8\u8350\u65b9\u5f0f\u3002\u5b83\u4f1a\u4e00\u6b65\u5b8c\u6210 Node \u68c0\u6d4b\u3001\u5b89\u88c5\u548c\u65b0\u624b\u5f15\u5bfc\u3002\n<\/p>\n<p>\n  \u5bf9\u4e8e VPS\/\u4e91\u4e3b\u673a\uff0c\u5c3d\u91cf\u907f\u514d\u4f7f\u7528\u7b2c\u4e09\u65b9\u201c\u4e00\u952e\u5f0f\u201d\u5e02\u573a\u955c\u50cf\u3002\u4f18\u5148\u9009\u62e9\u5e72\u51c0\u7684\u57fa\u7840 OS \u955c\u50cf\uff08\u4f8b\u5982 Ubuntu LTS\uff09\uff0c\u7136\u540e\u4f7f\u7528\u5b89\u88c5\u811a\u672c\u81ea\u884c\u5b89\u88c5 OpenClaw\u3002\n<\/p>\n<p>    \u4e0b\u8f7d CLI\uff0c\u901a\u8fc7 npm \u5168\u5c40\u5b89\u88c5\uff0c\u5e76\u542f\u52a8\u8bbe\u7f6e\u5411\u5bfc\u3002<\/p>\n<pre><code>&lt;Tabs&gt;\n  &lt;Tab title=\"macOS \/ Linux \/ WSL2\"&gt;\n    ```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n    curl -fsSL https:\/\/openclaw.ai\/install.sh | bash\n    ```\n  &lt;\/Tab&gt;\n\n  &lt;Tab title=\"Windows (PowerShell)\"&gt;\n    ```powershell  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n    iwr -useb https:\/\/openclaw.ai\/install.ps1 | iex\n    ```\n  &lt;\/Tab&gt;\n&lt;\/Tabs&gt;\n\n\u5c31\u8fd9\u6837 \u2014\u2014 \u811a\u672c\u4f1a\u5904\u7406 Node \u68c0\u6d4b\u3001\u5b89\u88c5\u548c\u65b0\u624b\u5f15\u5bfc\u3002\n\n\u5982\u679c\u8981\u8df3\u8fc7\u65b0\u624b\u5f15\u5bfc\uff0c\u53ea\u5b89\u88c5\u4e8c\u8fdb\u5236\u6587\u4ef6\uff1a\n\n&lt;Tabs&gt;\n  &lt;Tab title=\"macOS \/ Linux \/ WSL2\"&gt;\n    ```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n    curl -fsSL https:\/\/openclaw.ai\/install.sh | bash -s -- --no-onboard\n    ```\n  &lt;\/Tab&gt;\n\n  &lt;Tab title=\"Windows (PowerShell)\"&gt;\n    ```powershell  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n    &amp; ([scriptblock]::Create((iwr -useb https:\/\/openclaw.ai\/install.ps1))) -NoOnboard\n    ```\n  &lt;\/Tab&gt;\n&lt;\/Tabs&gt;\n\n\u6240\u6709\u6807\u5fd7\u3001\u73af\u5883\u53d8\u91cf\u4ee5\u53ca CI\/\u81ea\u52a8\u5316\u9009\u9879\uff0c\u8bf7\u53c2\u9605 [Installer internals](\/install\/installer)\u3002\n<\/code><\/pre>\n<\/p>\n<p>\n    \u5982\u679c\u4f60\u5df2\u7ecf\u81ea\u884c\u7ba1\u7406 Node\uff0c\u6211\u4eec\u63a8\u8350\u4f7f\u7528 Node 24\u3002\u51fa\u4e8e\u517c\u5bb9\u6027\u8003\u8651\uff0cOpenClaw \u4ecd\u652f\u6301 Node 22 LTS\uff0c\u76ee\u524d\u4e3a <code>22.16+<\/code>\uff1a<\/p>\n<pre><code>&lt;Tabs&gt;\n  &lt;Tab title=\"npm\"&gt;\n    ```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n    npm install -g openclaw@latest\n    openclaw onboard --install-daemon\n    ```\n\n    &lt;Accordion title=\"sharp \u6784\u5efa\u9519\u8bef\uff1f\"&gt;\n      \u5982\u679c\u4f60\u5168\u5c40\u5b89\u88c5\u4e86 libvips\uff08\u5728 macOS \u4e0a\u901a\u8fc7 Homebrew \u5f88\u5e38\u89c1\uff09\uff0c\u5e76\u4e14 `sharp` \u5931\u8d25\uff0c\u8bf7\u5f3a\u5236\u4f7f\u7528\u9884\u6784\u5efa\u4e8c\u8fdb\u5236\u6587\u4ef6\uff1a\n\n      ```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n      SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest\n      ```\n\n      \u5982\u679c\u4f60\u770b\u5230 `sharp: Please add node-gyp to your dependencies`\uff0c\u8bf7\u5b89\u88c5\u6784\u5efa\u5de5\u5177\u94fe\uff08macOS\uff1aXcode CLT + `npm install -g node-gyp`\uff09\uff0c\u6216\u8005\u4f7f\u7528\u4e0a\u9762\u7684\u73af\u5883\u53d8\u91cf\u3002\n    &lt;\/Accordion&gt;\n  &lt;\/Tab&gt;\n\n  &lt;Tab title=\"pnpm\"&gt;\n    ```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n    pnpm add -g openclaw@latest\n    pnpm approve-builds -g        # \u6279\u51c6 openclaw\u3001node-llama-cpp\u3001sharp \u7b49\n    openclaw onboard --install-daemon\n    ```\n\n    &lt;Note&gt;\n      `pnpm` \u8981\u6c42\u5bf9\u5e26\u6709\u6784\u5efa\u811a\u672c\u7684\u5305\u8fdb\u884c\u663e\u5f0f\u6279\u51c6\u3002\u9996\u6b21\u5b89\u88c5\u51fa\u73b0 \u201cIgnored build scripts\u201d \u8b66\u544a\u540e\uff0c\u8fd0\u884c `pnpm approve-builds -g` \u5e76\u9009\u62e9\u5217\u51fa\u7684\u5305\u3002\n    &lt;\/Note&gt;\n  &lt;\/Tab&gt;\n&lt;\/Tabs&gt;\n\n\u60f3\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u5f53\u524d GitHub `main` \u5206\u652f\u6700\u65b0\u7248\u672c\uff1f\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nnpm install -g github:openclaw\/openclaw#main\n```\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\npnpm add -g github:openclaw\/openclaw#main\n```\n<\/code><\/pre>\n<\/p>\n<p>\n    \u9002\u7528\u4e8e\u8d21\u732e\u8005\u6216\u4efb\u4f55\u60f3\u4ece\u672c\u5730\u68c0\u51fa\u8fd0\u884c\u7684\u4eba\u3002<\/p>\n<pre><code>&lt;Steps&gt;\n  &lt;Step title=\"\u514b\u9686\u5e76\u6784\u5efa\"&gt;\n    \u514b\u9686 [OpenClaw \u4ed3\u5e93](https:\/\/github.com\/openclaw\/openclaw) \u5e76\u6784\u5efa\uff1a\n\n    ```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n    git clone https:\/\/github.com\/openclaw\/openclaw.git\n    cd openclaw\n    pnpm install\n    pnpm ui:build\n    pnpm build\n    ```\n  &lt;\/Step&gt;\n\n  &lt;Step title=\"\u94fe\u63a5 CLI\"&gt;\n    \u8ba9 `openclaw` \u547d\u4ee4\u5728\u5168\u5c40\u53ef\u7528\uff1a\n\n    ```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n    pnpm link --global\n    ```\n\n    \u6216\u8005\uff0c\u4f60\u4e5f\u53ef\u4ee5\u8df3\u8fc7\u94fe\u63a5\uff0c\u76f4\u63a5\u5728\u4ed3\u5e93\u5185\u901a\u8fc7 `pnpm openclaw ...` \u8fd0\u884c\u547d\u4ee4\u3002\n  &lt;\/Step&gt;\n\n  &lt;Step title=\"\u8fd0\u884c\u65b0\u624b\u5f15\u5bfc\"&gt;\n    ```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n    openclaw onboard --install-daemon\n    ```\n  &lt;\/Step&gt;\n&lt;\/Steps&gt;\n\n\u66f4\u6df1\u5165\u7684\u5f00\u53d1\u5de5\u4f5c\u6d41\u8bf7\u53c2\u9605 [Setup](\/start\/setup)\u3002\n<\/code><\/pre>\n<\/p>\n<h2>\u5176\u4ed6\u5b89\u88c5\u65b9\u6cd5<\/h2>\n<p>    \u5bb9\u5668\u5316\u6216\u65e0\u5934\u90e8\u7f72\u3002\n  <\/p>\n<p>\n    \u65e0 root \u5bb9\u5668\uff1a\u5148\u8fd0\u884c\u4e00\u6b21 <code>setup-podman.sh<\/code>\uff0c\u7136\u540e\u8fd0\u884c\u542f\u52a8\u811a\u672c\u3002\n  <\/p>\n<p>\n    \u901a\u8fc7 Nix \u8fdb\u884c\u58f0\u660e\u5f0f\u5b89\u88c5\u3002\n  <\/p>\n<p>\n    \u81ea\u52a8\u5316\u6279\u91cf\u914d\u7f6e\u3002\n  <\/p>\n<p>\n    \u901a\u8fc7 Bun \u8fd0\u884c\u65f6\u8fdb\u884c\u4ec5 CLI \u4f7f\u7528\u3002<\/p>\n<h2>\u5b89\u88c5\u540e<\/h2>\n<p>\u9a8c\u8bc1\u4e00\u5207\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\uff1a<\/p>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\nopenclaw doctor         # \u68c0\u67e5\u914d\u7f6e\u95ee\u9898<br \/>\nopenclaw status         # Gateway \u7f51\u5173\u72b6\u6001<br \/>\nopenclaw dashboard      # \u6253\u5f00\u6d4f\u89c8\u5668 UI<\/code><\/p>\n<p>\u5982\u679c\u4f60\u9700\u8981\u81ea\u5b9a\u4e49\u8fd0\u884c\u65f6\u8def\u5f84\uff0c\u8bf7\u4f7f\u7528\uff1a<\/p>\n<ul>\n<li><code>OPENCLAW_HOME<\/code> \u7528\u4e8e\u57fa\u4e8e\u4e3b\u76ee\u5f55\u7684\u5185\u90e8\u8def\u5f84<\/li>\n<li><code>OPENCLAW_STATE_DIR<\/code> \u7528\u4e8e\u53ef\u53d8\u72b6\u6001\u4f4d\u7f6e<\/li>\n<li><code>OPENCLAW_CONFIG_PATH<\/code> \u7528\u4e8e\u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e<\/li>\n<\/ul>\n<p>\u6709\u5173\u4f18\u5148\u7ea7\u548c\u5b8c\u6574\u7ec6\u8282\uff0c\u8bf7\u53c2\u9605 <a href=\"\/help\/environment\">Environment vars<\/a>\u3002<\/p>\n<h2>\u6545\u969c\u6392\u9664\uff1a\u627e\u4e0d\u5230 <code>openclaw<\/code><\/h2>\n<p>\n  \u5feb\u901f\u8bca\u65ad\uff1a<\/p>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  node -v<br \/>\n  npm -v<br \/>\n  npm prefix -g<br \/>\n  echo \"$PATH\"<\/code><\/p>\n<p>\u5982\u679c <code>$(npm prefix -g)\/bin<\/code>\uff08macOS\/Linux\uff09\u6216 <code>$(npm prefix -g)<\/code>\uff08Windows\uff09<strong>\u4e0d\u5728<\/strong>\u4f60\u7684 <code>$PATH<\/code> \u4e2d\uff0c\u90a3\u4e48\u4f60\u7684 shell \u5c31\u627e\u4e0d\u5230\u5168\u5c40 npm \u4e8c\u8fdb\u5236\u6587\u4ef6\uff08\u5305\u62ec <code>openclaw<\/code>\uff09\u3002<\/p>\n<p>\u4fee\u590d\u65b9\u6cd5 \u2014\u2014 \u5c06\u5176\u6dfb\u52a0\u5230\u4f60\u7684 shell \u542f\u52a8\u6587\u4ef6\uff08<code>~\/.zshrc<\/code> \u6216 <code>~\/.bashrc<\/code>\uff09\u4e2d\uff1a<\/p>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  export PATH=\"$(npm prefix -g)\/bin:$PATH\"<\/code><\/p>\n<p>\u5728 Windows \u4e0a\uff0c\u5c06 <code>npm prefix -g<\/code> \u7684\u8f93\u51fa\u6dfb\u52a0\u5230\u4f60\u7684 PATH \u4e2d\u3002<\/p>\n<p>\u7136\u540e\u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u7ec8\u7aef\uff08\u6216\u8005\u5728 zsh \u4e2d\u8fd0\u884c <code>rehash<\/code>\uff0c\u5728 bash \u4e2d\u8fd0\u884c <code>hash -r<\/code>\uff09\u3002\n<\/p>\n<h2>\u66f4\u65b0 \/ \u5378\u8f7d<\/h2>\n<p>    \u8ba9 OpenClaw \u4fdd\u6301\u6700\u65b0\u3002\n  <\/p>\n<p>\n    \u8fc1\u79fb\u5230\u65b0\u673a\u5668\u3002\n  <\/p>\n<p>\n    \u5b8c\u5168\u79fb\u9664 OpenClaw\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5 \u5df2\u7ecf\u6309\u7167 \u5165\u95e8\u6307\u5357 \u64cd\u4f5c\u8fc7\u4e86\u5417\uff1f\u90a3\u4f60\u5df2\u7ecf\u51c6\u5907\u597d\u4e86 \u2014\u2014 \u672c\u9875\u9002\u7528\u4e8e\u5176\u4ed6\u5b89\u88c5\u65b9\u6cd5\u3001\u7279\u5b9a\u5e73\u53f0\u8bf4\u660e\u4ee5\u53ca\u7ef4\u62a4\u64cd\u4f5c [&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-753","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/753","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=753"}],"version-history":[{"count":0,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/753\/revisions"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}