{"id":158,"date":"2026-03-21T22:47:20","date_gmt":"2026-03-21T14:47:20","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/install-fly\/"},"modified":"2026-03-21T23:23:49","modified_gmt":"2026-03-21T15:23:49","slug":"install-fly","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/install-fly\/","title":{"rendered":"Fly.io"},"content":{"rendered":"<blockquote>\n<p>Deploy OpenClaw on Fly.io<\/p>\n<\/blockquote>\n<h1>Fly.io<\/h1>\n<h1>Fly.io &#37096;&#32626;<\/h1>\n<p><strong>&#30446;&#26631;&#65306;<\/strong> OpenClaw Gateway &#32593;&#20851;&#36816;&#34892;&#22312; <a href=\"https:\/\/fly.io\">Fly.io<\/a> &#26426;&#22120;&#19978;&#65292;&#20855;&#26377;&#25345;&#20037;&#23384;&#20648;&#12289;&#33258;&#21160; HTTPS &#21644; Discord\/&#28192;&#36947;&#35775;&#38382;&#12290;<\/p>\n<h2>&#20320;&#38656;&#35201;&#20160;&#20040;<\/h2>\n<ul>\n<li>&#24050;&#23433;&#35013; <a href=\"https:\/\/fly.io\/docs\/hands-on\/install-flyctl\/\">flyctl CLI<\/a><\/li>\n<li>Fly.io &#36134;&#25143;&#65288;&#20813;&#36153;&#22871;&#39184;&#21487;&#29992;&#65289;<\/li>\n<li>&#27169;&#22411;&#35748;&#35777;&#65306;Anthropic API &#23494;&#38053;&#65288;&#25110;&#20854;&#20182;&#25552;&#20379;&#21830;&#23494;&#38053;&#65289;<\/li>\n<li>&#28192;&#36947;&#20973;&#35777;&#65306;Discord bot token&#12289;Telegram token &#31561;<\/li>\n<\/ul>\n<h2>&#21021;&#23398;&#32773;&#24555;&#36895;&#36335;&#24452;<\/h2>\n<ol>\n<li>&#20811;&#38534;&#20179;&#24211; &rarr; &#33258;&#23450;&#20041; <code>fly.toml<\/code><\/li>\n<li>&#21019;&#24314;&#24212;&#29992; + &#21367; &rarr; &#35774;&#32622;&#23494;&#38053;<\/li>\n<li>&#20351;&#29992; <code>fly deploy<\/code> &#37096;&#32626;<\/li>\n<li>SSH &#36827;&#20837;&#21019;&#24314;&#37197;&#32622;&#25110;&#20351;&#29992; Control UI<\/li>\n<\/ol>\n<h2>1&#65289;&#21019;&#24314; Fly &#24212;&#29992;<\/h2>\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>Clone the repo<\/h1>\n<p>git clone https:\/\/github.com\/openclaw\/openclaw.git<br \/>\ncd openclaw<\/p>\n<h1>Create a new Fly app (pick your own name)<\/h1>\n<p>fly apps create my-openclaw<\/p>\n<h1>Create a persistent volume (1GB is usually enough)<\/h1>\n<p>fly volumes create openclaw_data &#8211;size 1 &#8211;region iad<\/p>\n<pre><code>\n**&#25552;&#31034;&#65306;** &#36873;&#25321;&#31163;&#20320;&#36817;&#30340;&#21306;&#22495;&#12290;&#24120;&#35265;&#36873;&#39033;&#65306;`lhr`&#65288;&#20262;&#25958;&#65289;&#12289;`iad`&#65288;&#24343;&#21513;&#23612;&#20122;&#65289;&#12289;`sjc`&#65288;&#22307;&#20309;&#22622;&#65289;&#12290;\n\n## 2&#65289;&#37197;&#32622; fly.toml\n\n&#32534;&#36753; `fly.toml` &#20197;&#21305;&#37197;&#20320;&#30340;&#24212;&#29992;&#21517;&#31216;&#21644;&#38656;&#27714;&#12290;\n\n**&#23433;&#20840;&#27880;&#24847;&#20107;&#39033;&#65306;** &#40664;&#35748;&#37197;&#32622;&#26292;&#38706;&#20844;&#20849; URL&#12290;&#23545;&#20110;&#27809;&#26377;&#20844;&#20849; IP &#30340;&#21152;&#22266;&#37096;&#32626;&#65292;&#21442;&#35265;[&#31169;&#26377;&#37096;&#32626;](#&#31169;&#26377;&#37096;&#32626;&#21152;&#22266;)&#25110;&#20351;&#29992; `fly.private.toml`&#12290;\n\n```toml  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\napp = \"my-openclaw\"  # Your app name\nprimary_region = \"iad\"\n\n[build]\n  dockerfile = \"Dockerfile\"\n\n[env]\n  NODE_ENV = \"production\"\n  OPENCLAW_PREFER_PNPM = \"1\"\n  OPENCLAW_STATE_DIR = \"\/data\"\n  NODE_OPTIONS = \"--max-old-space-size=1536\"\n\n[processes]\n  app = \"node dist\/index.js gateway --allow-unconfigured --port 3000 --bind lan\"\n\n[http_service]\n  internal_port = 3000\n  force_https = true\n  auto_stop_machines = false\n  auto_start_machines = true\n  min_machines_running = 1\n  processes = [\"app\"]\n\n[[vm]]\n  size = \"shared-cpu-2x\"\n  memory = \"2048mb\"\n\n[mounts]\n  source = \"openclaw_data\"\n  destination = \"\/data\"\n<\/code><\/pre>\n<p><strong>&#20851;&#38190;&#35774;&#32622;&#65306;<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>&#35774;&#32622;<\/th>\n<th>&#21407;&#22240;<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--bind lan<\/code><\/td>\n<td>&#32465;&#23450;&#21040; <code>0.0.0.0<\/code> &#20197;&#20415; Fly &#30340;&#20195;&#29702;&#21487;&#20197;&#35775;&#38382; Gateway &#32593;&#20851;<\/td>\n<\/tr>\n<tr>\n<td><code>--allow-unconfigured<\/code><\/td>\n<td>&#26080;&#38656;&#37197;&#32622;&#25991;&#20214;&#21551;&#21160;&#65288;&#20320;&#31245;&#21518;&#20250;&#21019;&#24314;&#19968;&#20010;&#65289;<\/td>\n<\/tr>\n<tr>\n<td><code>internal_port = 3000<\/code><\/td>\n<td>&#24517;&#39035;&#19982; <code>--port 3000<\/code>&#65288;&#25110; <code>OPENCLAW_GATEWAY_PORT<\/code>&#65289;&#21305;&#37197;&#20197;&#36827;&#34892; Fly &#20581;&#24247;&#26816;&#26597;<\/td>\n<\/tr>\n<tr>\n<td><code>memory = \"2048mb\"<\/code><\/td>\n<td>512MB &#22826;&#23567;&#65307;&#25512;&#33616; 2GB<\/td>\n<\/tr>\n<tr>\n<td><code>OPENCLAW_STATE_DIR = \"\/data\"<\/code><\/td>\n<td>&#22312;&#21367;&#19978;&#25345;&#20037;&#21270;&#29366;&#24577;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>3&#65289;&#35774;&#32622;&#23494;&#38053;<\/h2>\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>Required: Gateway token (for non-loopback binding)<\/h1>\n<p>fly secrets set OPENCLAW_GATEWAY_TOKEN=$(openssl rand -hex 32)<\/p>\n<h1>Model provider API keys<\/h1>\n<p>fly secrets set ANTHROPIC_API_KEY=sk-ant-&#8230;<\/p>\n<h1>&#21487;&#36873;&#39033;: Other providers<\/h1>\n<p>fly secrets set OPENAI_API_KEY=sk-&#8230;<br \/>\nfly secrets set GOOGLE_API_KEY=&#8230;<\/p>\n<h1>Channel tokens<\/h1>\n<p>fly secrets set DISCORD_BOT_TOKEN=MTQ&#8230;<\/p>\n<pre><code>\n**&#27880;&#24847;&#20107;&#39033;&#65306;**\n\n* &#38750; loopback &#32465;&#23450;&#65288;`--bind lan`&#65289;&#20986;&#20110;&#23433;&#20840;&#38656;&#35201; `OPENCLAW_GATEWAY_TOKEN`&#12290;\n* &#20687;&#23545;&#24453;&#23494;&#30721;&#19968;&#26679;&#23545;&#24453;&#36825;&#20123; token&#12290;\n* **&#20248;&#20808;&#20351;&#29992;&#29615;&#22659;&#21464;&#37327;&#32780;&#19981;&#26159;&#37197;&#32622;&#25991;&#20214;**&#26469;&#23384;&#20648;&#25152;&#26377; API &#23494;&#38053;&#21644; token&#12290;&#36825;&#21487;&#20197;&#36991;&#20813;&#23494;&#38053;&#20986;&#29616;&#22312; `openclaw.json` &#20013;&#65292;&#38450;&#27490;&#24847;&#22806;&#26292;&#38706;&#25110;&#35760;&#24405;&#12290;\n\n## 4&#65289;&#37096;&#32626;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nfly deploy\n<\/code><\/pre>\n<p>&#39318;&#27425;&#37096;&#32626;&#26500;&#24314; Docker &#38236;&#20687;&#65288;&#32422; 2-3 &#20998;&#38047;&#65289;&#12290;&#21518;&#32493;&#37096;&#32626;&#26356;&#24555;&#12290;<\/p>\n<p>&#37096;&#32626;&#21518;&#39564;&#35777;&#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 \/>\nfly status<br \/>\nfly logs<\/p>\n<pre><code>\n&#20320;&#24212;&#35813;&#30475;&#21040;&#65306;\n\n<\/code><\/pre>\n<p>[gateway] listening on ws:\/\/0.0.0.0:3000 (PID xxx)<br \/>\n[discord] logged in to discord as xxx<\/p>\n<pre><code>\n## 5&#65289;&#21019;&#24314;&#37197;&#32622;&#25991;&#20214;\n\nSSH &#36827;&#20837;&#26426;&#22120;&#21019;&#24314;&#27491;&#30830;&#30340;&#37197;&#32622;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nfly ssh console\n<\/code><\/pre>\n<p>&#21019;&#24314;&#37197;&#32622;&#30446;&#24405;&#21644;&#25991;&#20214;&#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 \/>\nmkdir -p \/data<br \/>\ncat &gt; \/data\/openclaw.json &lt;&lt; &#8216;EOF&#8217;<br \/>\n{<br \/>\n  &#8220;agents&#8221;: {<br \/>\n    &#8220;defaults&#8221;: {<br \/>\n      &#8220;model&#8221;: {<br \/>\n        &#8220;primary&#8221;: &#8220;anthropic\/claude-opus-4-5&#8221;,<br \/>\n        &#8220;fallbacks&#8221;: [&#8220;anthropic\/claude-sonnet-4-5&#8221;, &#8220;openai\/gpt-4o&#8221;]<br \/>\n      },<br \/>\n      &#8220;maxConcurrent&#8221;: 4<br \/>\n    },<br \/>\n    &#8220;list&#8221;: [<br \/>\n      {<br \/>\n        &#8220;id&#8221;: &#8220;main&#8221;,<br \/>\n        &#8220;default&#8221;: true<br \/>\n      }<br \/>\n    ]<br \/>\n  },<br \/>\n  &#8220;auth&#8221;: {<br \/>\n    &#8220;profiles&#8221;: {<br \/>\n      &#8220;anthropic:default&#8221;: { &#8220;mode&#8221;: &#8220;token&#8221;, &#8220;provider&#8221;: &#8220;anthropic&#8221; },<br \/>\n      &#8220;openai:default&#8221;: { &#8220;mode&#8221;: &#8220;token&#8221;, &#8220;provider&#8221;: &#8220;openai&#8221; }<br \/>\n    }<br \/>\n  },<br \/>\n  &#8220;bindings&#8221;: [<br \/>\n    {<br \/>\n      &#8220;agentId&#8221;: &#8220;main&#8221;,<br \/>\n      &#8220;match&#8221;: { &#8220;channel&#8221;: &#8220;discord&#8221; }<br \/>\n    }<br \/>\n  ],<br \/>\n  &#8220;channels&#8221;: {<br \/>\n    &#8220;discord&#8221;: {<br \/>\n      &#8220;enabled&#8221;: true,<br \/>\n      &#8220;groupPolicy&#8221;: &#8220;allowlist&#8221;,<br \/>\n      &#8220;guilds&#8221;: {<br \/>\n        &#8220;YOUR_GUILD_ID&#8221;: {<br \/>\n          &#8220;channels&#8221;: { &#8220;general&#8221;: { &#8220;allow&#8221;: true } },<br \/>\n          &#8220;requireMention&#8221;: false<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n  },<br \/>\n  &#8220;gateway&#8221;: {<br \/>\n    &#8220;mode&#8221;: &#8220;local&#8221;,<br \/>\n    &#8220;bind&#8221;: &#8220;auto&#8221;<br \/>\n  },<br \/>\n  &#8220;meta&#8221;: {<br \/>\n    &#8220;lastTouchedVersion&#8221;: &#8220;2026.1.29&#8221;<br \/>\n  }<br \/>\n}<br \/>\nEOF<\/p>\n<pre><code>\n**&#27880;&#24847;&#65306;** &#20351;&#29992; `OPENCLAW_STATE_DIR=\/data` &#26102;&#65292;&#37197;&#32622;&#36335;&#24452;&#26159; `\/data\/openclaw.json`&#12290;\n\n**&#27880;&#24847;&#65306;** Discord token &#21487;&#20197;&#26469;&#33258;&#65306;\n\n* &#29615;&#22659;&#21464;&#37327;&#65306;`DISCORD_BOT_TOKEN`&#65288;&#25512;&#33616;&#29992;&#20110;&#23494;&#38053;&#65289;\n* &#37197;&#32622;&#25991;&#20214;&#65306;`channels.discord.token`\n\n&#22914;&#26524;&#20351;&#29992;&#29615;&#22659;&#21464;&#37327;&#65292;&#26080;&#38656;&#23558; token &#28155;&#21152;&#21040;&#37197;&#32622;&#20013;&#12290;Gateway &#32593;&#20851;&#20250;&#33258;&#21160;&#35835;&#21462; `DISCORD_BOT_TOKEN`&#12290;\n\n&#37325;&#21551;&#20197;&#24212;&#29992;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nexit\nfly machine restart &lt;machine-id&gt;\n<\/code><\/pre>\n<h2>6&#65289;&#35775;&#38382; Gateway &#32593;&#20851;<\/h2>\n<h3>Control UI<\/h3>\n<p>&#22312;&#27983;&#35272;&#22120;&#20013;&#25171;&#24320;&#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 \/>\nfly open<\/p>\n<pre><code>\n&#25110;&#35775;&#38382; `https:\/\/my-openclaw.fly.dev\/`\n\n&#31896;&#36148;&#20320;&#30340; Gateway &#32593;&#20851; token&#65288;&#26469;&#33258; `OPENCLAW_GATEWAY_TOKEN` &#30340;&#37027;&#20010;&#65289;&#36827;&#34892;&#35748;&#35777;&#12290;\n\n### &#26085;&#24535;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nfly logs              # Live logs\nfly logs --no-tail    # Recent logs\n<\/code><\/pre>\n<h3>SSH &#25511;&#21046;&#21488;<\/h3>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nfly ssh console<\/p>\n<pre><code>\n## &#25925;&#38556;&#25490;&#38500;\n\n### \"App is not listening on expected address\"\n\nGateway &#32593;&#20851;&#32465;&#23450;&#21040; `127.0.0.1` &#32780;&#19981;&#26159; `0.0.0.0`&#12290;\n\n**&#20462;&#22797;&#65306;** &#22312; `fly.toml` &#20013;&#30340;&#36827;&#31243;&#21629;&#20196;&#28155;&#21152; `--bind lan`&#12290;\n\n### &#20581;&#24247;&#26816;&#26597;&#22833;&#36133; \/ &#36830;&#25509;&#34987;&#25298;&#32477;\n\nFly &#26080;&#27861;&#22312;&#37197;&#32622;&#30340;&#31471;&#21475;&#19978;&#35775;&#38382; Gateway &#32593;&#20851;&#12290;\n\n**&#20462;&#22797;&#65306;** &#30830;&#20445; `internal_port` &#19982; Gateway &#32593;&#20851;&#31471;&#21475;&#21305;&#37197;&#65288;&#35774;&#32622; `--port 3000` &#25110; `OPENCLAW_GATEWAY_PORT=3000`&#65289;&#12290;\n\n### OOM \/ &#20869;&#23384;&#38382;&#39064;\n\n&#23481;&#22120;&#25345;&#32493;&#37325;&#21551;&#25110;&#34987;&#32456;&#27490;&#12290;&#36857;&#35937;&#65306;`SIGABRT`&#12289;`v8::internal::Runtime_AllocateInYoungGeneration` &#25110;&#38745;&#40664;&#37325;&#21551;&#12290;\n\n**&#20462;&#22797;&#65306;** &#22312; `fly.toml` &#20013;&#22686;&#21152;&#20869;&#23384;&#65306;\n\n```toml  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n[[vm]]\n  memory = \"2048mb\"\n<\/code><\/pre>\n<p>&#25110;&#26356;&#26032;&#29616;&#26377;&#26426;&#22120;&#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 \/>\nfly machine update  &#8211;vm-memory 2048 -y<\/p>\n<pre><code>\n**&#27880;&#24847;&#65306;** 512MB &#22826;&#23567;&#12290;1GB &#21487;&#33021;&#21487;&#20197;&#24037;&#20316;&#20294;&#22312;&#36127;&#36733;&#25110;&#35814;&#32454;&#26085;&#24535;&#35760;&#24405;&#19979;&#21487;&#33021; OOM&#12290;**&#25512;&#33616; 2GB&#12290;**\n\n### Gateway &#32593;&#20851;&#38145;&#38382;&#39064;\n\nGateway &#32593;&#20851;&#25298;&#32477;&#21551;&#21160;&#24182;&#26174;&#31034;\"already running\"&#38169;&#35823;&#12290;\n\n&#36825;&#21457;&#29983;&#22312;&#23481;&#22120;&#37325;&#21551;&#20294; PID &#38145;&#25991;&#20214;&#22312;&#21367;&#19978;&#25345;&#20037;&#23384;&#22312;&#26102;&#12290;\n\n**&#20462;&#22797;&#65306;** &#21024;&#38500;&#38145;&#25991;&#20214;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nfly ssh console --command \"rm -f \/data\/gateway.*.lock\"\nfly machine restart &lt;machine-id&gt;\n<\/code><\/pre>\n<p>&#38145;&#25991;&#20214;&#22312; <code>\/data\/gateway.*.lock<\/code>&#65288;&#19981;&#22312;&#23376;&#30446;&#24405;&#20013;&#65289;&#12290;<\/p>\n<h3>&#37197;&#32622;&#26410;&#34987;&#35835;&#21462;<\/h3>\n<p>&#22914;&#26524;&#20351;&#29992; <code>--allow-unconfigured<\/code>&#65292;Gateway &#32593;&#20851;&#20250;&#21019;&#24314;&#26368;&#23567;&#37197;&#32622;&#12290;&#20320;&#22312; <code>\/data\/openclaw.json<\/code> &#30340;&#33258;&#23450;&#20041;&#37197;&#32622;&#24212;&#35813;&#22312;&#37325;&#21551;&#26102;&#34987;&#35835;&#21462;&#12290;<\/p>\n<p>&#39564;&#35777;&#37197;&#32622;&#26159;&#21542;&#23384;&#22312;&#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 \/>\nfly ssh console &#8211;command &#8220;cat \/data\/openclaw.json&#8221;<\/p>\n<pre><code>\n### &#36890;&#36807; SSH &#20889;&#20837;&#37197;&#32622;\n\n`fly ssh console -C` &#21629;&#20196;&#19981;&#25903;&#25345; shell &#37325;&#23450;&#21521;&#12290;&#35201;&#20889;&#20837;&#37197;&#32622;&#25991;&#20214;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n# Use echo + tee (pipe from local to remote)\necho '{\"your\":\"config\"}' | fly ssh console -C \"tee \/data\/openclaw.json\"\n\n# Or use sftp\nfly sftp shell\n&gt; put \/local\/path\/config.json \/data\/openclaw.json\n<\/code><\/pre>\n<p><strong>&#27880;&#24847;&#65306;<\/strong> &#22914;&#26524;&#25991;&#20214;&#24050;&#23384;&#22312;&#65292;<code>fly sftp<\/code> &#21487;&#33021;&#20250;&#22833;&#36133;&#12290;&#20808;&#21024;&#38500;&#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 \/>\nfly ssh console &#8211;command &#8220;rm \/data\/openclaw.json&#8221;<\/p>\n<pre><code>\n### &#29366;&#24577;&#26410;&#25345;&#20037;&#21270;\n\n&#22914;&#26524;&#37325;&#21551;&#21518;&#20002;&#22833;&#20973;&#35777;&#25110;&#20250;&#35805;&#65292;&#29366;&#24577;&#30446;&#24405;&#27491;&#22312;&#20889;&#20837;&#23481;&#22120;&#25991;&#20214;&#31995;&#32479;&#12290;\n\n**&#20462;&#22797;&#65306;** &#30830;&#20445; `fly.toml` &#20013;&#35774;&#32622;&#20102; `OPENCLAW_STATE_DIR=\/data` &#24182;&#37325;&#26032;&#37096;&#32626;&#12290;\n\n## &#26356;&#26032;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n# Pull latest changes\ngit pull\n\n# Redeploy\nfly deploy\n\n# Check health\nfly status\nfly logs\n<\/code><\/pre>\n<h3>&#26356;&#26032;&#26426;&#22120;&#21629;&#20196;<\/h3>\n<p>&#22914;&#26524;&#20320;&#38656;&#35201;&#26356;&#25913;&#21551;&#21160;&#21629;&#20196;&#32780;&#26080;&#38656;&#23436;&#20840;&#37325;&#26032;&#37096;&#32626;&#65306;<\/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>Get machine ID<\/h1>\n<p>fly machines list<\/p>\n<h1>Update command<\/h1>\n<p>fly machine update  &#8211;command &#8220;node dist\/index.js gateway &#8211;port 3000 &#8211;bind lan&#8221; -y<\/p>\n<h1>Or with memory increase<\/h1>\n<p>fly machine update  &#8211;vm-memory 2048 &#8211;command &#8220;node dist\/index.js gateway &#8211;port 3000 &#8211;bind lan&#8221; -y<\/p>\n<pre><code>\n**&#27880;&#24847;&#65306;** `fly deploy` &#21518;&#65292;&#26426;&#22120;&#21629;&#20196;&#21487;&#33021;&#20250;&#37325;&#32622;&#20026; `fly.toml` &#20013;&#30340;&#20869;&#23481;&#12290;&#22914;&#26524;&#20320;&#36827;&#34892;&#20102;&#25163;&#21160;&#26356;&#25913;&#65292;&#35831;&#22312;&#37096;&#32626;&#21518;&#37325;&#26032;&#24212;&#29992;&#23427;&#20204;&#12290;\n\n## &#31169;&#26377;&#37096;&#32626;&#65288;&#21152;&#22266;&#65289;\n\n&#40664;&#35748;&#24773;&#20917;&#19979;&#65292;Fly &#20998;&#37197;&#20844;&#20849; IP&#65292;&#20351;&#20320;&#30340; Gateway &#32593;&#20851;&#21487;&#36890;&#36807; `https:\/\/your-app.fly.dev` &#35775;&#38382;&#12290;&#36825;&#24456;&#26041;&#20415;&#65292;&#20294;&#24847;&#21619;&#30528;&#20320;&#30340;&#37096;&#32626;&#21487;&#34987;&#20114;&#32852;&#32593;&#25195;&#25551;&#22120;&#65288;Shodan&#12289;Censys &#31561;&#65289;&#21457;&#29616;&#12290;\n\n&#23545;&#20110;**&#26080;&#20844;&#20849;&#26292;&#38706;**&#30340;&#21152;&#22266;&#37096;&#32626;&#65292;&#20351;&#29992;&#31169;&#26377;&#27169;&#26495;&#12290;\n\n### &#20309;&#26102;&#20351;&#29992;&#31169;&#26377;&#37096;&#32626;\n\n* &#20320;&#21482;&#36827;&#34892;**&#20986;&#31449;**&#35843;&#29992;\/&#28040;&#24687;&#65288;&#26080;&#20837;&#31449; webhooks&#65289;\n* &#20320;&#20351;&#29992; **ngrok &#25110; Tailscale** &#38567;&#36947;&#22788;&#29702;&#20219;&#20309; webhook &#22238;&#35843;\n* &#20320;&#36890;&#36807; **SSH&#12289;&#20195;&#29702;&#25110; WireGuard** &#32780;&#19981;&#26159;&#27983;&#35272;&#22120;&#35775;&#38382; Gateway &#32593;&#20851;\n* &#20320;&#24076;&#26395;&#37096;&#32626;**&#23545;&#20114;&#32852;&#32593;&#25195;&#25551;&#22120;&#38544;&#34255;**\n\n### &#35774;&#32622;\n\n&#20351;&#29992; `fly.private.toml` &#26367;&#20195;&#26631;&#20934;&#37197;&#32622;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n# Deploy with private config\nfly deploy -c fly.private.toml\n<\/code><\/pre>\n<p>&#25110;&#36716;&#25442;&#29616;&#26377;&#37096;&#32626;&#65306;<\/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>List current IPs<\/h1>\n<p>fly ips list -a my-openclaw<\/p>\n<h1>Release public IPs<\/h1>\n<p>fly ips release  -a my-openclaw<br \/>\nfly ips release  -a my-openclaw<\/p>\n<h1>Switch to private config so future deploys don&#8217;t re-allocate public IPs<\/h1>\n<h1>(remove [http_service] or deploy with the private template)<\/h1>\n<p>fly deploy -c fly.private.toml<\/p>\n<h1>Allocate private-only IPv6<\/h1>\n<p>fly ips allocate-v6 &#8211;private -a my-openclaw<\/p>\n<pre><code>\n&#27492;&#21518;&#65292;`fly ips list` &#24212;&#35813;&#21482;&#26174;&#31034; `private` &#31867;&#22411;&#30340; IP&#65306;\n\n<\/code><\/pre>\n<p>VERSION  IP                   TYPE             REGION<br \/>\nv6       fdaa:x:x:x:x::x      private          global<\/p>\n<pre><code>\n### &#35775;&#38382;&#31169;&#26377;&#37096;&#32626;\n\n&#30001;&#20110;&#27809;&#26377;&#20844;&#20849; URL&#65292;&#20351;&#29992;&#20197;&#19979;&#26041;&#27861;&#20043;&#19968;&#65306;\n\n**&#36873;&#39033; 1&#65306;&#26412;&#22320;&#20195;&#29702;&#65288;&#26368;&#31616;&#21333;&#65289;**\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n# Forward local port 3000 to the app\nfly proxy 3000:3000 -a my-openclaw\n\n# Then open http:\/\/localhost:3000 in browser\n<\/code><\/pre>\n<p><strong>&#36873;&#39033; 2&#65306;WireGuard VPN<\/strong><\/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>Create WireGuard config (one-time)<\/h1>\n<p>fly wireguard create<\/p>\n<h1>Import to WireGuard client, then access via internal IPv6<\/h1>\n<h1>Example: http:\/\/[fdaa:x:x:x:x::x]:3000<\/h1>\n<pre><code>\n**&#36873;&#39033; 3&#65306;&#20165; SSH**\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nfly ssh console -a my-openclaw\n<\/code><\/pre>\n<h3>&#31169;&#26377;&#37096;&#32626;&#30340; Webhooks<\/h3>\n<p>&#22914;&#26524;&#20320;&#38656;&#35201; webhook &#22238;&#35843;&#65288;Twilio&#12289;Telnyx &#31561;&#65289;&#32780;&#19981;&#26292;&#38706;&#20844;&#20849;&#65306;<\/p>\n<ol>\n<li><strong>ngrok &#38567;&#36947;<\/strong> &#8211; &#22312;&#23481;&#22120;&#20869;&#25110;&#20316;&#20026; sidecar &#36816;&#34892; ngrok<\/li>\n<li><strong>Tailscale Funnel<\/strong> &#8211; &#36890;&#36807; Tailscale &#26292;&#38706;&#29305;&#23450;&#36335;&#24452;<\/li>\n<li><strong>&#20165;&#20986;&#31449;<\/strong> &#8211; &#26576;&#20123;&#25552;&#20379;&#21830;&#65288;Twilio&#65289;&#23545;&#20110;&#20986;&#31449;&#21628;&#21483;&#26080;&#38656; webhooks &#20063;&#33021;&#27491;&#24120;&#24037;&#20316;<\/li>\n<\/ol>\n<p>&#20351;&#29992; ngrok &#30340;&#31034;&#20363;&#35821;&#38899;&#36890;&#35805;&#37197;&#32622;&#65306;<\/p>\n<p><code>json  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n{<br \/>\n  \"plugins\": {<br \/>\n    \"entries\": {<br \/>\n      \"voice-call\": {<br \/>\n        \"enabled\": true,<br \/>\n        \"config\": {<br \/>\n          \"provider\": \"twilio\",<br \/>\n          \"tunnel\": { \"provider\": \"ngrok\" }<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n}<\/code><\/p>\n<p>ngrok &#38567;&#36947;&#22312;&#23481;&#22120;&#20869;&#36816;&#34892;&#24182;&#25552;&#20379;&#20844;&#20849; webhook URL&#65292;&#32780;&#19981;&#26292;&#38706; Fly &#24212;&#29992;&#26412;&#36523;&#12290;<\/p>\n<h3>&#23433;&#20840;&#20248;&#21183;<\/h3>\n<table>\n<thead>\n<tr>\n<th>&#26041;&#38754;<\/th>\n<th>&#20844;&#20849;<\/th>\n<th>&#31169;&#26377;<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>&#20114;&#32852;&#32593;&#25195;&#25551;&#22120;<\/td>\n<td>&#21487;&#21457;&#29616;<\/td>\n<td>&#38544;&#34255;<\/td>\n<\/tr>\n<tr>\n<td>&#30452;&#25509;&#25915;&#20987;<\/td>\n<td>&#21487;&#33021;<\/td>\n<td>&#34987;&#38459;&#27490;<\/td>\n<\/tr>\n<tr>\n<td>Control UI &#35775;&#38382;<\/td>\n<td>&#27983;&#35272;&#22120;<\/td>\n<td>&#20195;&#29702;\/VPN<\/td>\n<\/tr>\n<tr>\n<td>Webhook &#25237;&#36882;<\/td>\n<td>&#30452;&#25509;<\/td>\n<td>&#36890;&#36807;&#38567;&#36947;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>&#27880;&#24847;&#20107;&#39033;<\/h2>\n<ul>\n<li>Fly.io &#20351;&#29992; <strong>x86 &#26550;&#26500;<\/strong>&#65288;&#38750; ARM&#65289;<\/li>\n<li>Dockerfile &#20860;&#23481;&#20004;&#31181;&#26550;&#26500;<\/li>\n<li>&#23545;&#20110; WhatsApp\/Telegram &#26032;&#25163;&#24341;&#23548;&#65292;&#20351;&#29992; <code>fly ssh console<\/code><\/li>\n<li>&#25345;&#20037;&#25968;&#25454;&#20301;&#20110; <code>\/data<\/code> &#21367;&#19978;<\/li>\n<li>Signal &#38656;&#35201; Java + signal-cli&#65307;&#20351;&#29992;&#33258;&#23450;&#20041;&#38236;&#20687;&#24182;&#20445;&#25345;&#20869;&#23384;&#22312; 2GB+&#12290;<\/li>\n<\/ul>\n<h2>&#25104;&#26412;<\/h2>\n<p>&#20351;&#29992;&#25512;&#33616;&#37197;&#32622;&#65288;<code>shared-cpu-2x<\/code>&#65292;2GB RAM&#65289;&#65306;<\/p>\n<ul>\n<li>&#26681;&#25454;&#20351;&#29992;&#24773;&#20917;&#32422; $10-15\/&#26376;<\/li>\n<li>&#20813;&#36153;&#22871;&#39184;&#21253;&#21547;&#19968;&#20123;&#37197;&#39069;<\/li>\n<\/ul>\n<p>&#35814;&#24773;&#21442;&#35265; <a href=\"https:\/\/fly.io\/docs\/about\/pricing\/\">Fly.io &#23450;&#20215;<\/a>&#12290;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Deploy OpenClaw on Fly.io Fly.io Fly.io &#37096;&#038;#32626 [&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-158","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/158","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=158"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/158\/revisions"}],"predecessor-version":[{"id":793,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/158\/revisions\/793"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}