{"id":615,"date":"2026-03-21T22:52:57","date_gmt":"2026-03-21T14:52:57","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/install-digitalocean\/"},"modified":"2026-03-21T23:23:48","modified_gmt":"2026-03-21T15:23:48","slug":"install-digitalocean","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/install-digitalocean\/","title":{"rendered":"DigitalOcean"},"content":{"rendered":"<h1>DigitalOcean<\/h1>\n<p>Run a persistent OpenClaw Gateway on a DigitalOcean Droplet.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>DigitalOcean account (<a href=\"https:\/\/cloud.digitalocean.com\/registrations\/new\">signup<\/a>)<\/li>\n<li>SSH key pair (or willingness to use password auth)<\/li>\n<li>About 20 minutes<\/li>\n<\/ul>\n<h2>&#23433;&#35013;&#37197;&#32622;<\/h2>\n<p>      Use a clean base image (Ubuntu 24.04 LTS). Avoid third-party Marketplace 1-click images unless you have reviewed their startup scripts and firewall defaults.\n    <\/p>\n<pre><code>1. Log into [DigitalOcean](https:\/\/cloud.digitalocean.com\/).\n2. Click **Create &gt; Droplets**.\n3. Choose:\n   * **Region:** Closest to you\n   * **Image:** Ubuntu 24.04 LTS\n   * **Size:** Basic, Regular, 1 vCPU \/ 1 GB RAM \/ 25 GB SSD\n   * **Authentication:** SSH key (recommended) or password\n4. Click **Create Droplet** and note the IP address.\n<\/code><\/pre>\n<\/p>\n<p>\n    &#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n    ssh root@YOUR_DROPLET_IP<\/p>\n<pre><code>apt update &amp;&amp; apt upgrade -y\n\n# Install Node.js 24\ncurl -fsSL https:\/\/deb.nodesource.com\/setup_24.x | bash -\napt install -y nodejs\n\n# Install OpenClaw\ncurl -fsSL https:\/\/openclaw.ai\/install.sh | bash\nopenclaw --version\n```\n<\/code><\/pre>\n<\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --install-daemon<\/code><\/p>\n<pre><code>The wizard walks you through model auth, channel setup, gateway token generation, and daemon installation (systemd).\n<\/code><\/pre>\n<\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    fallocate -l 2G \/swapfile<br \/>\n    chmod 600 \/swapfile<br \/>\n    mkswap \/swapfile<br \/>\n    swapon \/swapfile<br \/>\n    echo '\/swapfile none swap sw 0 0' &gt;&gt; \/etc\/fstab<\/code>\n  <\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw status<br \/>\n    systemctl --user status openclaw-gateway.service<br \/>\n    journalctl --user -u openclaw-gateway.service -f<\/code>\n  <\/p>\n<p>\n    The gateway binds to loopback by default. Pick one of these options.<\/p>\n<pre><code>**Option A: SSH tunnel (simplest)**\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n# From your local machine\nssh -L 18789:localhost:18789 root@YOUR_DROPLET_IP\n```\n\nThen open `http:\/\/localhost:18789`.\n\n**Option B: Tailscale Serve**\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\ncurl -fsSL https:\/\/tailscale.com\/install.sh | sh\ntailscale up\nopenclaw config set gateway.tailscale.mode serve\nopenclaw gateway restart\n```\n\nThen open `https:\/\/&lt;magicdns&gt;\/` from any device on your tailnet.\n\n**Option C: Tailnet bind (no Serve)**\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nopenclaw config set gateway.bind tailnet\nopenclaw gateway restart\n```\n\nThen open `http:\/\/&lt;tailscale-ip&gt;:18789` (token required).\n<\/code><\/pre>\n<\/p>\n<h2>&#25925;&#38556;&#25490;&#26597;<\/h2>\n<p><strong>Gateway will not start<\/strong> &#8212; Run <code>openclaw doctor --non-interactive<\/code> and check logs with <code>journalctl --user -u openclaw-gateway.service -n 50<\/code>.<\/p>\n<p><strong>Port already in use<\/strong> &#8212; Run <code>lsof -i :18789<\/code> to find the process, then stop it.<\/p>\n<p><strong>Out of memory<\/strong> &#8212; Verify swap is active with <code>free -h<\/code>. If still hitting OOM, use API-based models (Claude, GPT) rather than local models, or upgrade to a 2 GB Droplet.<\/p>\n<h2>&#19979;&#19968;&#27493;<\/h2>\n<ul>\n<li><a href=\"\/channels\">Channels<\/a> &#8212; connect Telegram, WhatsApp, Discord, and more<\/li>\n<li><a href=\"\/gateway\/configuration\">Gateway configuration<\/a> &#8212; all config options<\/li>\n<li><a href=\"\/install\/updating\">Updating<\/a> &#8212; keep OpenClaw up to date<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>DigitalOcean Run a persistent OpenClaw Gateway on a Dig [&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-615","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/615","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=615"}],"version-history":[{"count":3,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/615\/revisions"}],"predecessor-version":[{"id":769,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/615\/revisions\/769"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}