๐ก Celeste Field Update โ April 2026
When Your AI Agent Goes Dark: Removing the External Drive Dependency from OpenClaw
Sunday morning. Coffee in hand. Check on Celeste. She's offline. Not because the Pi crashed. Not because the internet went down. Because a USB external drive I'd been meaning to remove for weeks quietly unmounted itself, and with it went every npm global package OpenClaw needed to run โ including OpenClaw itself. This is the story of how one external drive nearly took out my 24/7 AI assistant, and how we cleaned it up for good.How We Got Here
A while back, during the great npm-global migration project, I moved my npm global package directory to an external USB drive calledsethdisk1. The reasoning made sense at the time โ free up space on the SD card. The problem is that npm doesn't just store packages on that drive. It stores the entire runtime dependency chain for every globally installed tool. Including OpenClaw.
So when sethdisk1 decided it was done mounting at boot, OpenClaw's systemd service kept trying to launch a binary that pointed here:
/media/admin/sethdisk1/npm-global/lib/node_modules/openclaw/openclaw.mjsFile not found. Service crash. Restart in 10 seconds. File not found. Repeat, forever, until the restart counter hit its limit and systemd just gave up.
โ ๏ธ Lesson Learned
Never set your npm global prefix to an external drive that isn't guaranteed to be mounted before your services start. If you need overflow storage, handle it at the OS level with fstab and
RequiresMountsFor= in your systemd unit โ not by pointing npm at it.The Diagnosis: Reading the Logs
The first thing that tipped us off was the missing systemd service file entirely. After a reboot the service unit was gone โ likely a casualty of an earlier interrupted update. Once we recreated the service and tried to start it,journalctl told the real story:
Error: Cannot find module '/media/admin/sethdisk1/npm-global/lib/node_modules/openclaw/openclaw.mjs' code: 'MODULE_NOT_FOUND' Node.js v22.22.2The drive wasn't mounted. The files weren't there. And we'd already decided we wanted to remove the drive entirely โ so this was actually the perfect forcing function to finally do it right.
The Fix: Cutting the Drive Dependency
Here's the sequence that worked. The goal was to get npm pointing entirely at local storage and get OpenClaw reinstalled clean.Step 1 โ Stop the restart loop
sudo systemctl stop openclaw sudo systemctl disable openclaw
Step 2 โ Fix npm's global prefix and cache
Both were pointing at the external drive. Fix them both:npm config set prefix '/home/admin/.npm-global' npm config set cache '/home/admin/.npm-cache' echo 'export PATH=/home/admin/.npm-global/bin:$PATH' >> ~/.bashrc source ~/.bashrcVerify they took:
npm config get prefix npm config get cache
Step 3 โ Clear the broken partial install
There was a half-copied openclaw directory from an earlier failed migration attempt โ it haddist/ and node_modules/ but was missing package.json and the bin symlink. Useless. Remove it:
rm -rf /home/admin/.npm-global/lib/node_modules/openclaw
Step 4 โ Reinstall via the official installer
npm on a Pi 4 is painfully slow for large installs. We skipped the npm route entirely and used the official curl installer instead:curl -fsSL https://openclaw.ai/install.sh | bashThis is actually the recommended method for Raspberry Pi โ it handles Node detection, sets up the correct paths, and runs the onboarding wizard. Much faster than waiting for npm to resolve dependencies on ARM hardware.
Step 5 โ Recreate the systemd service
sudo nano /etc/systemd/system/openclaw.service
[Unit] Description=OpenClaw AI Agent Service After=network.target [Service] Type=simple User=admin WorkingDirectory=/home/admin/.openclaw ExecStart=/home/admin/.npm-global/bin/openclaw --config /home/admin/.openclaw/openclaw.json Restart=on-failure RestartSec=10 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target
sudo systemctl daemon-reload sudo systemctl enable openclaw sudo systemctl start openclaw
The Timeline of This Morning
Morning
Celeste goes dark
Checked Discord โ no response. Pi is up, network is fine. OpenClaw service is missing entirely.+15 min
Service file gone, binary found at /usr/bin/openclaw
Recreated the service file. Started it. Immediate crash loop. Journalctl reveals the MODULE_NOT_FOUND error pointing to the unmounted drive.+30 min
Drive is already unmounted/gone
du on the drive path returns nothing. Decision made: remove the drive dependency entirely.
+45 min
npm cache also pointing to dead drive
Runningnpm show openclaw fails with EACCES trying to write to the drive cache path. Fixed both prefix and cache.
+60 min
Partial install discovered, npm reinstall attempted
Openclaw directory exists but is broken โ missing package.json and bin symlink. npm install starts but grinds. Switched to curl installer.+75 min
Celeste back online
Clean install, service recreated, config intact. All 185 skills preserved. Kimi K2.5 backend reconnected.What Celeste's Config Survived
The good news in all of this: your~/.openclaw/ directory is completely separate from the npm installation. All of this survived untouched:
- All 185 skills
- The full
openclaw.jsonconfig (plus several dated backups) - Agent memory, tasks, flows, and workspace files
- Discord channel integration (channel ID intact)
- Kimi K2.5 backend configuration via Moonshot AI
โ
Pro Tip
OpenClaw auto-creates timestamped backups of your config:
openclaw.json.bak.20260412, openclaw.json.backup.20260327-131114, etc. These are in ~/.openclaw/. If something ever goes wrong with a config update, you can restore from any of these instantly.Why npm on Pi Is a Pain (And What to Do About It)
This isn't the first time we've hit npm slowness on the Pi 4. It's a known issue โ npm's dependency resolution is CPU-intensive, and ARM processors don't have the raw compute that x86 does. A package that installs in 30 seconds on your desktop can take 10+ minutes on a Pi 4. A few things that help:- Use the curl installer for OpenClaw specifically โ it's optimized for Pi and skips a lot of the npm overhead
- Add a NODE_COMPILE_CACHE environment variable to speed up repeated invocations:
export NODE_COMPILE_CACHE=/var/tmp/openclaw-compile-cache - Never put npm-global on an external drive unless you absolutely have to, and if you do, make sure the drive auto-mounts before services start via
/etc/fstab - Keep swap active โ the Pi 4 default 100MB swap is not enough. Set it to at least 1GB
Current State of the Machine
After this morning's cleanup, here's where things stand :mrk-pi4 Status โ April 12, 2026
- Hardware: Raspberry Pi 4 Model B Rev 1.5, 7.6GB RAM
- OS: Raspberry Pi OS 64-bit (aarch64, kernel 6.1.21)
- Storage: 27GB root, 2.8GB free (external drive removed)
- OpenClaw: Reinstalled clean via curl installer
- Celeste config: Intact โ 185 skills, all data preserved
- Backend: Moonshot AI / Kimi K2.5
- Discord: Reconnected, private #sethbot channel active
- npm paths: Now 100% local โ no external drive dependency
What's Next
The external drive removal was overdue. Now that npm is fully local and the service file is clean, the Pi 4 is actually in its most stable state since we started this project. A few things on the roadmap:- SD card upgrade โ still running close to capacity. A 512GB A2-rated card is on the list for a clean clone and expansion.
- Aaron agent โ a second OpenClaw instance on a private VPS, positioned as a junior admin/support agent. Different model, stripped skill set, separate from Celeste's environment.
- Auto-mount safety net โ documenting the proper
/etc/fstab+ systemdRequiresMountsFor=pattern for anyone running OpenClaw with external storage, so nobody else hits this same wall.
Links and Resources
- OpenClaw Documentation
- OpenClaw Raspberry Pi Setup Guide
- Raspberry Pi 4 Model B
- Moonshot AI โ Kimi K2.5 backend
- solarblu.net โ more Pi, AI, and web development content