<?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>Forem: Mateusz Rusowicz</title>
    <description>The latest articles on Forem by Mateusz Rusowicz (@mateuszrusowicz).</description>
    <link>https://forem.com/mateuszrusowicz</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%2F3758893%2F92eafcdc-1f4a-44c4-b90e-b0d92ed5259c.jpeg</url>
      <title>Forem: Mateusz Rusowicz</title>
      <link>https://forem.com/mateuszrusowicz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mateuszrusowicz"/>
    <language>en</language>
    <item>
      <title>Bare Metal AI: Taming OpenClaw on a Hetzner VPS (and surviving the systemd boss fight)</title>
      <dc:creator>Mateusz Rusowicz</dc:creator>
      <pubDate>Sun, 15 Mar 2026 21:18:56 +0000</pubDate>
      <link>https://forem.com/mateuszrusowicz/bare-metal-ai-taming-openclaw-on-a-hetzner-vps-and-surviving-the-systemd-boss-fight-4fgc</link>
      <guid>https://forem.com/mateuszrusowicz/bare-metal-ai-taming-openclaw-on-a-hetzner-vps-and-surviving-the-systemd-boss-fight-4fgc</guid>
      <description>&lt;p&gt;When you're juggling the logistics of a music festival while simultaneously shipping code in Next.js, Qwik, and Prisma, you don't just want automation—you &lt;em&gt;need&lt;/em&gt; an autonomous agent. Relying on locked-down SaaS platforms wasn't cutting it, so I decided to host OpenClaw bare-metal on a Hetzner VPS (Ubuntu arm64). &lt;/p&gt;

&lt;p&gt;It sounded simple. Install the CLI, run the daemon, and let the AI handle the emails. Reality, however, was a deep dive into Linux user spaces, headless OAuth, and security architectures. Here is the exact blueprint of how to get OpenClaw running cleanly and securely on bare metal.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Homebrew &amp;amp; Compiler Trap
&lt;/h2&gt;

&lt;p&gt;OpenClaw often relies on Homebrew for external binaries (like &lt;code&gt;gogcli&lt;/code&gt; for Gmail integration). On a fresh Hetzner Ubuntu box, installing Homebrew isn't enough; you need the compiler toolchain, or formulae will silently fail to build from source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Fix:&lt;/strong&gt;&lt;br&gt;
Before touching OpenClaw tools, set up the environment properly:&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;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;build-essential &lt;span class="nt"&gt;-y&lt;/span&gt;
brew &lt;span class="nb"&gt;install &lt;/span&gt;gcc

Ensure your agent user &lt;span class="o"&gt;(&lt;/span&gt;e.g., claw&lt;span class="o"&gt;)&lt;/span&gt; actually has brew &lt;span class="k"&gt;in &lt;/span&gt;its path by appending the shellenv to ~/.bashrc. Without this, the agent is flying blind when trying to execute system tools.

&lt;span class="c"&gt;## 2. The systemd User Service Nightmare&lt;/span&gt;
Running an AI agent via PM2 feels familiar &lt;span class="k"&gt;for &lt;/span&gt;JS developers, but it restricts the agent&lt;span class="s1"&gt;'s environment access. OpenClaw provides native systemd --user integration, which is vastly superior for logging and path resolution.

However, if you switch to your agent user via su - claw instead of a clean SSH login, you will immediately hit:
Failed to connect to bus: No medium found

**The Fix:**
Linux didn'&lt;/span&gt;t load the DBUS environment &lt;span class="k"&gt;for &lt;/span&gt;the user space. You have to inject it manually into the .bashrc and build the service file from scratch:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
bash&lt;br&gt;
echo 'export XDG_RUNTIME_DIR=/run/user/$(id -u)' &amp;gt;&amp;gt; ~/.bashrc&lt;br&gt;
echo 'export DBUS_SESSION_BUS_ADDRESS=unix:path=${XDG_RUNTIME_DIR}/bus' &amp;gt;&amp;gt; ~/.bashrc&lt;/p&gt;

&lt;p&gt;Then, manually "push" the service file (think of it like running db push in Prisma to materialize your schema) so the agent actually runs the gateway process with the correct PATH:&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;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/.config/systemd/user
&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt; &amp;gt; ~/.config/systemd/user/openclaw.service
[Unit]
Description=OpenClaw Agent
After=network.target

[Service]
Type=simple
ExecStart=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;which openclaw&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="sh"&gt; gateway
Restart=always
RestartSec=3
Environment="PATH=&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;&lt;span class="sh"&gt;"
Environment="NODE_COMPILE_CACHE=/var/tmp/openclaw-compile-cache"
Environment="OPENCLAW_NO_RESPAWN=1"

[Install]
WantedBy=default.target
&lt;/span&gt;&lt;span class="no"&gt;EOF

&lt;/span&gt;systemctl &lt;span class="nt"&gt;--user&lt;/span&gt; daemon-reload
systemctl &lt;span class="nt"&gt;--user&lt;/span&gt; &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; openclaw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Unlocking the Runtimes (ACPX)
&lt;/h2&gt;

&lt;p&gt;If you're using OpenClaw 2026.3+, you might notice your agent complaining that it can't write files or execute commands, throwing errors like plugin not found: fs. The architecture changed. Terminal and file operations are no longer standard plugins; they are governed by the ACPX runtime and Tool Profiles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Fix:&lt;/strong&gt;&lt;br&gt;
Stop editing JSON configs manually. Use the CLI to enable the Anthropic/Model Context Protocol (ACP) runtime and elevate the tool profile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openclaw plugins &lt;span class="nb"&gt;enable &lt;/span&gt;acpx
openclaw config &lt;span class="nb"&gt;set &lt;/span&gt;tools.profile full
systemctl &lt;span class="nt"&gt;--user&lt;/span&gt; restart openclaw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the agent has hands.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Headless OAuth (The curl Hack)
&lt;/h2&gt;

&lt;p&gt;To let the agent manage Gmail, I used gogcli. Authenticating an OAuth app on a headless VPS without a TTY or a browser usually requires setting up SSH port forwarding. But there's a faster way.&lt;/p&gt;

&lt;p&gt;When you run gog auth add &lt;a href="mailto:your@email.com"&gt;your@email.com&lt;/a&gt;, it prints a Google OAuth link and starts a local listener on a random port (e.g., 127.0.0.1:36367).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Fix:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Copy the Google link to your local laptop browser and approve it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google will redirect you to a broken localhost link. Copy that entire broken URL.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SSH into your server in a second terminal window.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Use curl to fire the callback directly at the waiting process:&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="s2"&gt;"[http://127.0.0.1:36367/oauth2/callback?state=...&amp;amp;code=](http://127.0.0.1:36367/oauth2/callback?state=...&amp;amp;code=)..."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Boom. Token saved securely. No SSH tunneling required.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Security: Revoking Sudo
&lt;/h2&gt;

&lt;p&gt;Just revoke the sudo...&lt;/p&gt;

&lt;p&gt;Running AI bare-metal takes a bit of Linux elbow grease, but the result is a deeply integrated, lightning-fast agent that lives right on your infrastructure.&lt;/p&gt;

</description>
      <category>openclaw</category>
      <category>devops</category>
      <category>linux</category>
      <category>ai</category>
    </item>
    <item>
      <title>I just learned, that you can overtrain a Neuro Network so that it becomes stupid... Imyself feel this way sometimes :D checkout Bengio et at 2003 paper on MLP https://dl.acm.org/doi/10.5555/944919.944966</title>
      <dc:creator>Mateusz Rusowicz</dc:creator>
      <pubDate>Wed, 11 Mar 2026 08:04:57 +0000</pubDate>
      <link>https://forem.com/mateuszrusowicz/i-just-learned-that-you-can-overtrain-a-neuro-network-so-that-it-becomes-stupid-imyself-feel-2457</link>
      <guid>https://forem.com/mateuszrusowicz/i-just-learned-that-you-can-overtrain-a-neuro-network-so-that-it-becomes-stupid-imyself-feel-2457</guid>
      <description>&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://dl.acm.org/doi/10.5555/944919.944966" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;dl.acm.org&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Never expected training a NN to be so easy! at least on the conceptual level ;)
https://www.youtube.com/watch?v=VMj-3S1tku0&amp;list=PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ</title>
      <dc:creator>Mateusz Rusowicz</dc:creator>
      <pubDate>Mon, 02 Mar 2026 17:13:03 +0000</pubDate>
      <link>https://forem.com/mateuszrusowicz/never-expected-training-a-nn-to-be-so-easy-at-least-on-the-conceptual-level--14hm</link>
      <guid>https://forem.com/mateuszrusowicz/never-expected-training-a-nn-to-be-so-easy-at-least-on-the-conceptual-level--14hm</guid>
      <description>&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://www.youtube.com/watch?v=VMj-3S1tku0&amp;amp;amp;list=PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;youtube.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Hello World!
Started in IT feeling overwhelmed.
Years later, learning Python for AI — and appreciating how much easier the next language becomes.</title>
      <dc:creator>Mateusz Rusowicz</dc:creator>
      <pubDate>Sat, 07 Feb 2026 18:34:50 +0000</pubDate>
      <link>https://forem.com/mateuszrusowicz/hello-world-started-in-it-feeling-overwhelmed-years-later-learning-python-for-ai-and-6dg</link>
      <guid>https://forem.com/mateuszrusowicz/hello-world-started-in-it-feeling-overwhelmed-years-later-learning-python-for-ai-and-6dg</guid>
      <description></description>
    </item>
  </channel>
</rss>
