{"id":269,"date":"2026-03-21T22:47:25","date_gmt":"2026-03-21T14:47:25","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/start-setup\/"},"modified":"2026-03-21T23:23:48","modified_gmt":"2026-03-21T15:23:48","slug":"start-setup","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/start-setup\/","title":{"rendered":"\u8bbe\u7f6e"},"content":{"rendered":"<h1>&#35774;&#32622;<\/h1>\n<p>&#26368;&#21518;&#26356;&#26032;&#65306;2026-01-01<\/p>\n<h2>&#22826;&#38271;&#19981;&#30475;<\/h2>\n<ul>\n<li><strong>&#20010;&#24615;&#21270;&#35774;&#32622;&#23384;&#25918;&#22312;&#20179;&#24211;&#20043;&#22806;&#65306;<\/strong> <code>~\/.openclaw\/workspace<\/code>&#65288;&#24037;&#20316;&#21306;&#65289;+ <code>~\/.openclaw\/openclaw.json<\/code>&#65288;&#37197;&#32622;&#65289;&#12290;<\/li>\n<li><strong>&#31283;&#23450;&#24037;&#20316;&#27969;&#65306;<\/strong> &#23433;&#35013; macOS &#24212;&#29992;&#65307;&#35753;&#23427;&#36816;&#34892;&#20869;&#32622;&#30340; Gateway &#32593;&#20851;&#12290;<\/li>\n<li><strong>&#21069;&#27839;&#24037;&#20316;&#27969;&#65306;<\/strong> &#36890;&#36807; <code>pnpm gateway:watch<\/code> &#33258;&#24049;&#36816;&#34892; Gateway &#32593;&#20851;&#65292;&#28982;&#21518;&#35753; macOS &#24212;&#29992;&#20197;&#26412;&#22320;&#27169;&#24335;&#36830;&#25509;&#12290;<\/li>\n<\/ul>\n<h2>&#20808;&#20915;&#26465;&#20214;&#65288;&#20174;&#28304;&#30721;&#65289;<\/h2>\n<ul>\n<li>Node <code>&gt;=22<\/code><\/li>\n<li><code>pnpm<\/code><\/li>\n<li>Docker&#65288;&#21487;&#36873;&#65307;&#20165;&#29992;&#20110;&#23481;&#22120;&#21270;&#35774;&#32622;\/e2e &mdash; &#21442;&#38405; <a href=\"\/install\/docker\">Docker<\/a>&#65289;<\/li>\n<\/ul>\n<h2>&#20010;&#24615;&#21270;&#31574;&#30053;&#65288;&#35753;&#26356;&#26032;&#19981;&#20250;&#36896;&#25104;&#38382;&#39064;&#65289;<\/h2>\n<p>&#22914;&#26524;&#20320;&#24819;&#35201;&#8221;100% &#20026;&#25105;&#23450;&#21046;&#8221;<em>&#24182;&#19988;<\/em>&#26131;&#20110;&#26356;&#26032;&#65292;&#23558;&#20320;&#30340;&#33258;&#23450;&#20041;&#20869;&#23481;&#20445;&#23384;&#22312;&#65306;<\/p>\n<ul>\n<li><strong>&#37197;&#32622;&#65306;<\/strong> <code>~\/.openclaw\/openclaw.json<\/code>&#65288;JSON\/JSON5 &#26684;&#24335;&#65289;<\/li>\n<li><strong>&#24037;&#20316;&#21306;&#65306;<\/strong> <code>~\/.openclaw\/workspace<\/code>&#65288;Skills&#12289;&#25552;&#31034;&#12289;&#35760;&#24518;&#65307;&#23558;&#20854;&#35774;&#20026;&#31169;&#26377; git &#20179;&#24211;&#65289;<\/li>\n<\/ul>\n<p>&#24341;&#23548;&#19968;&#27425;&#65306;<\/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 setup<\/p>\n<pre><code>\n&#22312;&#27492;&#20179;&#24211;&#20869;&#37096;&#65292;&#20351;&#29992;&#26412;&#22320; CLI &#20837;&#21475;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nopenclaw setup\n<\/code><\/pre>\n<p>&#22914;&#26524;&#20320;&#36824;&#27809;&#26377;&#20840;&#23616;&#23433;&#35013;&#65292;&#36890;&#36807; <code>pnpm openclaw setup<\/code> &#36816;&#34892;&#23427;&#12290;<\/p>\n<h2>&#31283;&#23450;&#24037;&#20316;&#27969;&#65288;macOS &#24212;&#29992;&#20248;&#20808;&#65289;<\/h2>\n<ol>\n<li>&#23433;&#35013;&#24182;&#21551;&#21160; <strong>OpenClaw.app<\/strong>&#65288;&#33756;&#21333;&#26639;&#65289;&#12290;<\/li>\n<li>&#23436;&#25104;&#26032;&#25163;&#24341;&#23548;\/&#26435;&#38480;&#26816;&#26597;&#28165;&#21333;&#65288;TCC &#25552;&#31034;&#65289;&#12290;<\/li>\n<li>&#35831;&#30830;&#20445; Gateway &#32593;&#20851;&#26159;<strong>&#26412;&#22320;<\/strong>&#24182;&#27491;&#22312;&#36816;&#34892;&#65288;&#24212;&#29992;&#31649;&#29702;&#23427;&#65289;&#12290;<\/li>\n<li>&#38142;&#25509;&#34920;&#38754;&#65288;&#31034;&#20363;&#65306;WhatsApp&#65289;&#65306;<\/li>\n<\/ol>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw channels login<\/p>\n<pre><code>\n5. &#23436;&#25972;&#24615;&#26816;&#26597;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nopenclaw health\n<\/code><\/pre>\n<p>&#22914;&#26524;&#20320;&#30340;&#26500;&#24314;&#29256;&#26412;&#20013;&#27809;&#26377;&#26032;&#25163;&#24341;&#23548;&#65306;<\/p>\n<ul>\n<li>&#36816;&#34892; <code>openclaw setup<\/code>&#65292;&#28982;&#21518; <code>openclaw channels login<\/code>&#65292;&#28982;&#21518;&#25163;&#21160;&#21551;&#21160; Gateway &#32593;&#20851;&#65288;<code>openclaw gateway<\/code>&#65289;&#12290;<\/li>\n<\/ul>\n<h2>&#21069;&#27839;&#24037;&#20316;&#27969;&#65288;&#22312;&#32456;&#31471;&#20013;&#36816;&#34892; Gateway &#32593;&#20851;&#65289;<\/h2>\n<p>&#30446;&#26631;&#65306;&#24320;&#21457; TypeScript Gateway &#32593;&#20851;&#65292;&#33719;&#24471;&#28909;&#37325;&#36733;&#65292;&#20445;&#25345; macOS &#24212;&#29992; UI &#36830;&#25509;&#12290;<\/p>\n<h3>0)&#65288;&#21487;&#36873;&#65289;&#20063;&#20174;&#28304;&#30721;&#36816;&#34892; macOS &#24212;&#29992;<\/h3>\n<p>&#22914;&#26524;&#20320;&#20063;&#24819;&#35753; macOS &#24212;&#29992;&#20445;&#25345;&#21069;&#27839;&#65306;<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n.\/scripts\/restart-mac.sh<\/p>\n<pre><code>\n### 1) &#21551;&#21160;&#24320;&#21457; Gateway &#32593;&#20851;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\npnpm install\npnpm gateway:watch\n<\/code><\/pre>\n<p><code>gateway:watch<\/code> &#20197;&#30417;&#35270;&#27169;&#24335;&#36816;&#34892; Gateway &#32593;&#20851;&#65292;&#24182;&#22312; TypeScript &#26356;&#25913;&#26102;&#37325;&#26032;&#21152;&#36733;&#12290;<\/p>\n<h3>2) &#23558; macOS &#24212;&#29992;&#25351;&#21521;&#20320;&#27491;&#22312;&#36816;&#34892;&#30340; Gateway &#32593;&#20851;<\/h3>\n<p>&#22312; <strong>OpenClaw.app<\/strong> &#20013;&#65306;<\/p>\n<ul>\n<li>&#36830;&#25509;&#27169;&#24335;&#65306;<strong>&#26412;&#22320;<\/strong><br \/>\n  &#24212;&#29992;&#23558;&#36830;&#25509;&#21040;&#22312;&#37197;&#32622;&#31471;&#21475;&#19978;&#36816;&#34892;&#30340; Gateway &#32593;&#20851;&#12290;<\/li>\n<\/ul>\n<h3>3) &#39564;&#35777;<\/h3>\n<ul>\n<li>&#24212;&#29992;&#20869; Gateway &#32593;&#20851;&#29366;&#24577;&#24212;&#26174;&#31034; <strong>&#8220;Using existing gateway &hellip;&#8221;<\/strong><\/li>\n<li>&#25110;&#36890;&#36807; CLI&#65306;<\/li>\n<\/ul>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw health<\/p>\n<pre><code>\n### &#24120;&#35265;&#38519;&#38449;\n\n* **&#31471;&#21475;&#38169;&#35823;&#65306;** Gateway &#32593;&#20851; WS &#40664;&#35748;&#20026; `ws:\/\/127.0.0.1:18789`&#65307;&#20445;&#25345;&#24212;&#29992; + CLI &#22312;&#21516;&#19968;&#31471;&#21475;&#19978;&#12290;\n* **&#29366;&#24577;&#23384;&#20648;&#20301;&#32622;&#65306;**\n  * &#20973;&#35777;&#65306;`~\/.openclaw\/credentials\/`\n  * &#20250;&#35805;&#65306;`~\/.openclaw\/agents\/&lt;agentId&gt;\/sessions\/`\n  * &#26085;&#24535;&#65306;`\/tmp\/openclaw\/`\n\n## &#20973;&#35777;&#23384;&#20648;&#26144;&#23556;\n\n&#22312;&#35843;&#35797;&#35748;&#35777;&#25110;&#20915;&#23450;&#22791;&#20221;&#20160;&#20040;&#26102;&#20351;&#29992;&#27492;&#26144;&#23556;&#65306;\n\n* **WhatsApp**&#65306;`~\/.openclaw\/credentials\/whatsapp\/&lt;accountId&gt;\/creds.json`\n* **Telegram bot token**&#65306;&#37197;&#32622;\/&#29615;&#22659;&#21464;&#37327;&#25110; `channels.telegram.tokenFile`\n* **Discord bot token**&#65306;&#37197;&#32622;\/&#29615;&#22659;&#21464;&#37327;&#65288;&#23578;&#19981;&#25903;&#25345;&#20196;&#29260;&#25991;&#20214;&#65289;\n* **Slack tokens**&#65306;&#37197;&#32622;\/&#29615;&#22659;&#21464;&#37327;&#65288;`channels.slack.*`&#65289;\n* **&#37197;&#23545;&#20801;&#35768;&#21015;&#34920;**&#65306;`~\/.openclaw\/credentials\/&lt;channel&gt;-allowFrom.json`\n* **&#27169;&#22411;&#35748;&#35777;&#37197;&#32622;&#25991;&#20214;**&#65306;`~\/.openclaw\/agents\/&lt;agentId&gt;\/agent\/auth-profiles.json`\n* **&#26087;&#29256; OAuth &#23548;&#20837;**&#65306;`~\/.openclaw\/credentials\/oauth.json`\n  &#26356;&#22810;&#35814;&#24773;&#65306;[&#23433;&#20840;](\/gateway\/security#credential-storage-map)&#12290;\n\n## &#26356;&#26032;&#65288;&#19981;&#30772;&#22351;&#20320;&#30340;&#35774;&#32622;&#65289;\n\n* &#23558; `~\/.openclaw\/workspace` &#21644; `~\/.openclaw\/` &#20445;&#25345;&#20026;\"&#20320;&#30340;&#19996;&#35199;\"&#65307;&#19981;&#35201;&#23558;&#20010;&#20154;&#25552;&#31034;\/&#37197;&#32622;&#25918;&#20837; `openclaw` &#20179;&#24211;&#12290;\n* &#26356;&#26032;&#28304;&#30721;&#65306;`git pull` + `pnpm install`&#65288;&#24403;&#38145;&#25991;&#20214;&#26356;&#25913;&#26102;&#65289;+ &#32487;&#32493;&#20351;&#29992; `pnpm gateway:watch`&#12290;\n\n## Linux&#65288;systemd &#29992;&#25143;&#26381;&#21153;&#65289;\n\nLinux &#23433;&#35013;&#20351;&#29992; systemd **&#29992;&#25143;**&#26381;&#21153;&#12290;&#40664;&#35748;&#24773;&#20917;&#19979;&#65292;systemd &#22312;&#27880;&#38144;\/&#31354;&#38386;&#26102;&#20572;&#27490;&#29992;&#25143;&#26381;&#21153;&#65292;&#36825;&#20250;&#32456;&#27490; Gateway &#32593;&#20851;&#12290;&#26032;&#25163;&#24341;&#23548;&#20250;&#23581;&#35797;&#20026;&#20320;&#21551;&#29992; lingering&#65288;&#21487;&#33021;&#25552;&#31034; sudo&#65289;&#12290;&#22914;&#26524;&#20173;&#28982;&#20851;&#38381;&#65292;&#36816;&#34892;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nsudo loginctl enable-linger $USER\n<\/code><\/pre>\n<p>&#23545;&#20110;&#24120;&#39547;&#25110;&#22810;&#29992;&#25143;&#26381;&#21153;&#22120;&#65292;&#32771;&#34385;&#20351;&#29992;<strong>&#31995;&#32479;<\/strong>&#26381;&#21153;&#32780;&#19981;&#26159;&#29992;&#25143;&#26381;&#21153;&#65288;&#19981;&#38656;&#35201; lingering&#65289;&#12290;&#21442;&#38405; <a href=\"\/gateway\">Gateway &#32593;&#20851;&#36816;&#34892;&#25163;&#20876;<\/a> &#20102;&#35299; systemd &#35828;&#26126;&#12290;<\/p>\n<h2>&#30456;&#20851;&#25991;&#26723;<\/h2>\n<ul>\n<li><a href=\"\/gateway\">Gateway &#32593;&#20851;&#36816;&#34892;&#25163;&#20876;<\/a>&#65288;&#26631;&#24535;&#12289;&#30417;&#30563;&#12289;&#31471;&#21475;&#65289;<\/li>\n<li><a href=\"\/gateway\/configuration\">Gateway &#32593;&#20851;&#37197;&#32622;<\/a>&#65288;&#37197;&#32622;&#27169;&#24335; + &#31034;&#20363;&#65289;<\/li>\n<li><a href=\"\/channels\/discord\">Discord<\/a> &#21644; <a href=\"\/channels\/telegram\">Telegram<\/a>&#65288;&#22238;&#22797;&#26631;&#31614; + replyToMode &#35774;&#32622;&#65289;<\/li>\n<li><a href=\"\/start\/openclaw\">OpenClaw &#21161;&#25163;&#35774;&#32622;<\/a><\/li>\n<li><a href=\"\/platforms\/macos\">macOS &#24212;&#29992;<\/a>&#65288;Gateway &#32593;&#20851;&#29983;&#21629;&#21608;&#26399;&#65289;<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>&#35774;&#32622; &#26368;&#21518;&#26356;&#26032;&#038;#6530 [&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-269","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/269","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=269"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/269\/revisions"}],"predecessor-version":[{"id":782,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/269\/revisions\/782"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}