<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: sir'Alexander</title>
    <description>The latest articles on DEV Community by sir'Alexander (@sir_alexander_t).</description>
    <link>https://dev.to/sir_alexander_t</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F164660%2Fa798aaa5-258b-435f-bb18-26aa953763da.webp</url>
      <title>DEV Community: sir'Alexander</title>
      <link>https://dev.to/sir_alexander_t</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sir_alexander_t"/>
    <language>en</language>
    <item>
      <title>From Broken Docker Containers to a Working AI Agent: The Full OpenClaw Journey</title>
      <dc:creator>sir'Alexander</dc:creator>
      <pubDate>Sun, 05 Apr 2026 15:53:27 +0000</pubDate>
      <link>https://dev.to/sir_alexander_t/from-broken-docker-containers-to-a-working-ai-agent-the-full-openclaw-journey-3mc0</link>
      <guid>https://dev.to/sir_alexander_t/from-broken-docker-containers-to-a-working-ai-agent-the-full-openclaw-journey-3mc0</guid>
      <description>&lt;p&gt;&lt;strong&gt;Every blocker, every fix, and why bare metal is the sweet spot for a personal AI agent setup.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; I spent several weeks self-hosting OpenClaw on a Hetzner VPS. The setup involved more blockers than I expected — a 3-day crash loop caused by a model hallucinating its own config, a Docker isolation wall that prevented the agent from using any tools I didn't bake into the image at build time, and a browser control problem I had completely misunderstood. I migrated to bare metal. Everything works now. Here's the full story with every exact fix.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is OpenClaw and why did I want it?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://openclaw.io" rel="noopener noreferrer"&gt;OpenClaw&lt;/a&gt; is an open-source AI agent gateway. You connect it to Telegram (or a web chat), point it at a model, and you get a personal AI agent that can browse the web, read files, run code, and respond to messages. The selling point is control: you pick the model, you own the server, you pay for it if you want or run it for free with community models.&lt;/p&gt;

&lt;p&gt;I wanted a personal AI agent that could take real actions — not just answer questions. One I could message from my phone and have it actually do things. A Hetzner 4GB VPS at around €5/month seemed like the right place to start.&lt;/p&gt;

&lt;p&gt;Here is what actually happened.&lt;/p&gt;




&lt;h2&gt;
  
  
  Part 1: Getting Docker running (it took longer than it should have)
&lt;/h2&gt;

&lt;p&gt;The official setup uses Docker. You clone the repo, configure a &lt;code&gt;.env&lt;/code&gt; file, and run a setup script. Straightforward in theory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blocker 1: &lt;code&gt;Cannot find package 'nostr-tools'&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first time I ran the gateway, it crashed immediately with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: Cannot find package 'nostr-tools'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After digging into the repo, the root cause was simple: the Docker image needs to be built with the &lt;code&gt;nostr&lt;/code&gt; extension included, and if you don't pass it explicitly, the build skips it.&lt;/p&gt;

&lt;p&gt;Fix: add this to &lt;code&gt;docker-compose.yml&lt;/code&gt; under the build section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;OPENCLAW_EXTENSIONS&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nostr&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then rebuild the image with &lt;code&gt;docker compose build&lt;/code&gt; before running. That cleared it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blocker 2: The &lt;code&gt;.env&lt;/code&gt; trap&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The setup script uses an environment variable called &lt;code&gt;OPENCLAW_IMAGE&lt;/code&gt; to know which Docker image to use. I had it set in my &lt;code&gt;.env&lt;/code&gt; file. The script silently ignored it.&lt;/p&gt;

&lt;p&gt;The fix is to export it in the shell before running the script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OPENCLAW_IMAGE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;openclaw:local
./scripts/docker/setup.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Setting it in &lt;code&gt;.env&lt;/code&gt; is not enough — the script doesn't source the file. This one cost me more time than it should have because there was no error, just the wrong image being used.&lt;/p&gt;

&lt;p&gt;After both fixes: the gateway started, and &lt;code&gt;/healthz&lt;/code&gt; returned &lt;code&gt;{"ok":true}&lt;/code&gt;. First win.&lt;/p&gt;




&lt;h2&gt;
  
  
  Part 2: Browser control — I had the wrong mental model
&lt;/h2&gt;

&lt;p&gt;I wanted the agent to be able to browse the web. OpenClaw supports browser control via Chrome DevTools Protocol. I installed Google Chrome on the VPS host, enabled browser control in the config, and expected it to work.&lt;/p&gt;

&lt;p&gt;It didn't. The agent couldn't find the browser at all.&lt;/p&gt;

&lt;p&gt;The problem was my mental model. The gateway runs inside a Docker container. The browser I installed is on the host. The container has no visibility into the host's binaries. The browser has to be inside the container.&lt;/p&gt;

&lt;p&gt;The fix is to rebuild the image with Chromium and the required display server baked in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OPENCLAW_DOCKER_APT_PACKAGES&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"chromium xvfb xauth"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OPENCLAW_IMAGE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;openclaw:local
./scripts/docker/setup.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the rebuild, &lt;code&gt;openclaw browser open https://example.com&lt;/code&gt; worked. &lt;code&gt;openclaw browser snapshot&lt;/code&gt; printed the page structure. Browser control was live.&lt;/p&gt;




&lt;h2&gt;
  
  
  Part 3: The 3-day crash loop (this one was subtle)
&lt;/h2&gt;

&lt;p&gt;About three weeks in, the gateway started crash-looping. It would start, run for a few seconds, and crash. Every time.&lt;/p&gt;

&lt;p&gt;I spent a while looking at the logs before I found the problem. Someone had appended a stray line after the closing &lt;code&gt;}&lt;/code&gt; in &lt;code&gt;openclaw.json&lt;/code&gt;, making the whole file invalid JSON5:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hocon"&gt;&lt;code&gt;&lt;span class="c1"&gt;// end of the file, after the closing brace:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;channels.telegram.groupAllowFrom&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;your-telegram-id&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stripping that line fixed the first crash. But the gateway crashed again.&lt;/p&gt;

&lt;p&gt;This time, the config itself was valid JSON, but it contained these keys in the &lt;code&gt;session&lt;/code&gt; block:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"session"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"dmScope"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"per-channel-peer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"persistence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"autoSaveInterval"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;300000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;persistence&lt;/code&gt; and &lt;code&gt;autoSaveInterval&lt;/code&gt; do not exist in the OpenClaw config schema. The gateway was rejecting them on startup.&lt;/p&gt;

&lt;p&gt;I had not written those keys. The AI agent had. During a previous session, the agent had edited its own config file and invented plausible-sounding but completely invalid configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this happened: the model quality problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The default model in a fresh OpenClaw setup routes to &lt;code&gt;openrouter/free&lt;/code&gt;. That endpoint cycles through whatever free models are available — often small ones with 4,000–8,000 token context windows. In a long enough session, the model loses context and starts guessing. It guessed config keys that sounded reasonable but didn't exist.&lt;/p&gt;

&lt;p&gt;The fix was to upgrade the model before anything else.&lt;/p&gt;

&lt;p&gt;I switched to &lt;a href="https://kimi.moonshot.cn/" rel="noopener noreferrer"&gt;Kimi K2.5&lt;/a&gt; via Ollama's cloud model feature:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"agents"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"defaults"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"primary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ollama/kimi-k2.5:cloud"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"fallbacks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"ollama/minimax-m2.5:cloud"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"ollama/glm-5:cloud"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"openrouter/free"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kimi K2.5 is free, runs on Moonshot's infrastructure (no VPS RAM impact), and has a 131k token context window. The community consistently ranks it as the top free model for agentic tasks. The fabricated config problem disappeared.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The lesson here is uncomfortable:&lt;/strong&gt; if your agent edits its own config and the model is bad enough, it will silently break itself. Model quality is not optional once you're running long agentic sessions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Part 4: The moment Docker stopped being enough
&lt;/h2&gt;

&lt;p&gt;After sorting the model, everything felt stable. Telegram was working. Browser control was working. Then I asked the agent to read a PDF.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pdftotext: command not found
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I could install &lt;code&gt;pdftotext&lt;/code&gt; on the host easily enough. But the agent can't see the host. It can't run &lt;code&gt;apt-get install&lt;/code&gt; inside a running container. It can't reach the host filesystem outside the mounted volume.&lt;/p&gt;

&lt;p&gt;This isn't a config problem. It's the design of Docker. Containers are isolated. That isolation is useful for security and repeatability, but it means the agent's tool access is fixed at image build time. Every new capability requires a full image rebuild.&lt;/p&gt;

&lt;p&gt;For a personal AI agent — where the whole point is that it can do anything you'd do at a terminal — that's the wrong tradeoff.&lt;/p&gt;




&lt;h2&gt;
  
  
  Part 5: The bare metal migration
&lt;/h2&gt;

&lt;p&gt;Once I understood the Docker wall as a structural constraint rather than a config problem, the migration decision was straightforward. OpenClaw supports &lt;code&gt;npm install -g openclaw&lt;/code&gt; plus a systemd service on bare metal. The agent gets full host access.&lt;/p&gt;

&lt;p&gt;Here's what the migration actually involved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Node.js 24&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ubuntu's default Node.js is outdated. Install via NodeSource:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://deb.nodesource.com/setup_24.x | bash -
apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; nodejs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Google Chrome &lt;code&gt;.deb&lt;/code&gt; — not the snap&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The snap version of Chromium breaks under systemd. AppArmor blocks Chrome DevTools Protocol from binding. You need the &lt;code&gt;.deb&lt;/code&gt; package from Google directly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt &lt;span class="nb"&gt;install&lt;/span&gt; ./google-chrome-stable_current_amd64.deb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify headless mode works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;google-chrome &lt;span class="nt"&gt;--headless&lt;/span&gt; &lt;span class="nt"&gt;--no-sandbox&lt;/span&gt; &lt;span class="nt"&gt;--dump-dom&lt;/span&gt; https://example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If that returns HTML, you're good.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Install OpenClaw and update the config&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; openclaw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then update two values in &lt;code&gt;openclaw.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Change&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Ollama&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;URL&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Docker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;bridge&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;localhost&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"models"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"providers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ollama"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"baseUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://localhost:11434"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Update&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;workspace&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Docker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;container&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;host&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;path&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"agents"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"defaults"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"workspace"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/home/&amp;lt;your-user&amp;gt;/.openclaw/workspace"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Stop Docker, start the systemd service&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker compose down
openclaw gateway &lt;span class="nb"&gt;install
&lt;/span&gt;openclaw gateway start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check both health endpoints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl http://localhost:3000/healthz   &lt;span class="c"&gt;# {"ok":true}&lt;/span&gt;
curl http://localhost:3000/readyz    &lt;span class="c"&gt;# {"ready":true}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Chrome lock file problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First browser open attempt failed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Failed to start Chrome CDP — profile appears to be in use by another process
(hostname: &amp;lt;docker-container-id&amp;gt;)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That hostname is the old Docker container. It had left lock files behind in the Chrome profile directory. Remove them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; ~/.openclaw/browser/openclaw/user-data/Singleton&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, &lt;code&gt;openclaw browser open https://example.com&lt;/code&gt; succeeded. Browser control working on bare metal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Install the tools the agent actually needs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that the agent has host access, this is just a one-liner:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;poppler-utils  &lt;span class="c"&gt;# pdftotext&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No image rebuild. No container restart. The agent can now read PDFs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Part 6: The verdict
&lt;/h2&gt;

&lt;p&gt;After all of this, here's where I landed:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Docker&lt;/th&gt;
&lt;th&gt;Bare Metal&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Agent tool access&lt;/td&gt;
&lt;td&gt;Sealed — no installs at runtime&lt;/td&gt;
&lt;td&gt;Full host access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Browser control&lt;/td&gt;
&lt;td&gt;Chromium + Xvfb inside container&lt;/td&gt;
&lt;td&gt;Headless Chrome &lt;code&gt;.deb&lt;/code&gt; on host&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model quality&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;openrouter/free&lt;/code&gt; default — dangerous&lt;/td&gt;
&lt;td&gt;Kimi K2.5 cloud — 131k context, free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAM overhead&lt;/td&gt;
&lt;td&gt;Higher&lt;/td&gt;
&lt;td&gt;~1–1.5 GB idle&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PDF / host tools&lt;/td&gt;
&lt;td&gt;Blocked&lt;/td&gt;
&lt;td&gt;Works natively&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Update process&lt;/td&gt;
&lt;td&gt;Rebuild image&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm install -g openclaw&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best for&lt;/td&gt;
&lt;td&gt;Isolated multi-user setups&lt;/td&gt;
&lt;td&gt;Single-user VPS — the sweet spot&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Docker is not wrong. For multi-user setups or anything security-critical, the isolation it provides is valuable. But for a personal AI agent on a VPS you control, it's the wrong default. The agent's whole value is its ability to act. Sealing it in a container limits what it can act on.&lt;/p&gt;

&lt;p&gt;Bare metal gives you a lighter setup, simpler operations, and a proper agent.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I would do differently from the start
&lt;/h2&gt;

&lt;p&gt;If I were starting over today, these are the things I'd do in the first ten minutes rather than discovering them the hard way:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Upgrade the model immediately.&lt;/strong&gt; Before anything else. &lt;code&gt;openrouter/free&lt;/code&gt; is dangerous for agents that modify their own state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use bare metal from day one&lt;/strong&gt; if you're on a personal VPS and you're the only user. Docker adds overhead and constraints that don't pay off in this scenario.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Export environment variables in your shell&lt;/strong&gt;, not just &lt;code&gt;.env&lt;/code&gt;, when running setup scripts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Google Chrome &lt;code&gt;.deb&lt;/code&gt;, not the snap.&lt;/strong&gt; AppArmor will kill you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the config minimal.&lt;/strong&gt; If you're not sure a config key exists, don't add it. Let the agent work with valid defaults before customising.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Current state
&lt;/h2&gt;

&lt;p&gt;The gateway has been running on bare metal for several weeks. Telegram is working. Browser control is working. The agent can read PDFs, run commands, and manage files. Kimi K2.5 hasn't hallucinated a single config key.&lt;/p&gt;

&lt;p&gt;If you're running OpenClaw or thinking about it, drop a comment. I'm curious what setups others are running and whether the Docker-to-bare-metal migration pattern holds up across different VPS providers.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tags: AI, Self-Hosting, DevOps, Docker, Software Engineering&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>docker</category>
      <category>openclaw</category>
    </item>
  </channel>
</rss>
