{
  "title": "OpenClaw on Hetzner (Docker, Production VPS Guide)",
  "content": "Run a persistent OpenClaw Gateway on a Hetzner VPS using Docker, with durable state, baked-in binaries, and safe restart behavior.\n\nIf you want “OpenClaw 24/7 for \\~\\$5”, this is the simplest reliable setup.\nHetzner pricing changes; pick the smallest Debian/Ubuntu VPS and scale up if you hit OOMs.\n\n## What are we doing (simple terms)?\n\n* Rent a small Linux server (Hetzner VPS)\n* Install Docker (isolated app runtime)\n* Start the OpenClaw Gateway in Docker\n* Persist `~/.openclaw` + `~/.openclaw/workspace` on the host (survives restarts/rebuilds)\n* Access the Control UI from your laptop via an SSH tunnel\n\nThe Gateway can be accessed via:\n\n* SSH port forwarding from your laptop\n* Direct port exposure if you manage firewalling and tokens yourself\n\nThis guide assumes Ubuntu or Debian on Hetzner.\\\nIf you are on another Linux VPS, map packages accordingly.\nFor the generic Docker flow, see [Docker](/install/docker).\n\n## Quick path (experienced operators)\n\n1. Provision Hetzner VPS\n2. Install Docker\n3. Clone OpenClaw repository\n4. Create persistent host directories\n5. Configure `.env` and `docker-compose.yml`\n6. Bake required binaries into the image\n7. `docker compose up -d`\n8. Verify persistence and Gateway access\n\n* Hetzner VPS with root access\n* SSH access from your laptop\n* Basic comfort with SSH + copy/paste\n* \\~20 minutes\n* Docker and Docker Compose\n* Model auth credentials\n* Optional provider credentials\n  * WhatsApp QR\n  * Telegram bot token\n  * Gmail OAuth\n\n## 1) Provision the VPS\n\nCreate an Ubuntu or Debian VPS in Hetzner.\n\nThis guide assumes the VPS is stateful.\nDo not treat it as disposable infrastructure.\n\n## 2) Install Docker (on the VPS)\n\n## 3) Clone the OpenClaw repository\n\nThis guide assumes you will build a custom image to guarantee binary persistence.\n\n## 4) Create persistent host directories\n\nDocker containers are ephemeral.\nAll long-lived state must live on the host.\n\n```bash theme={null}\nmkdir -p /root/.openclaw\nmkdir -p /root/.openclaw/workspace",
  "code_samples": [
    {
      "code": "This guide assumes the VPS is stateful.\nDo not treat it as disposable infrastructure.\n\n***\n\n## 2) Install Docker (on the VPS)",
      "language": "unknown"
    },
    {
      "code": "Verify:",
      "language": "unknown"
    },
    {
      "code": "***\n\n## 3) Clone the OpenClaw repository",
      "language": "unknown"
    },
    {
      "code": "This guide assumes you will build a custom image to guarantee binary persistence.\n\n***\n\n## 4) Create persistent host directories\n\nDocker containers are ephemeral.\nAll long-lived state must live on the host.",
      "language": "unknown"
    }
  ],
  "headings": [
    {
      "level": "h2",
      "text": "Goal",
      "id": "goal"
    },
    {
      "level": "h2",
      "text": "What are we doing (simple terms)?",
      "id": "what-are-we-doing-(simple-terms)?"
    },
    {
      "level": "h2",
      "text": "Quick path (experienced operators)",
      "id": "quick-path-(experienced-operators)"
    },
    {
      "level": "h2",
      "text": "What you need",
      "id": "what-you-need"
    },
    {
      "level": "h2",
      "text": "1) Provision the VPS",
      "id": "1)-provision-the-vps"
    },
    {
      "level": "h2",
      "text": "2) Install Docker (on the VPS)",
      "id": "2)-install-docker-(on-the-vps)"
    },
    {
      "level": "h2",
      "text": "3) Clone the OpenClaw repository",
      "id": "3)-clone-the-openclaw-repository"
    },
    {
      "level": "h2",
      "text": "4) Create persistent host directories",
      "id": "4)-create-persistent-host-directories"
    }
  ],
  "url": "llms-txt#openclaw-on-hetzner-(docker,-production-vps-guide)",
  "links": []
}