diff --git a/src/site/posts/2026/2026-02-24-openclaw-linux-secure-homelab-setup.md b/src/site/posts/2026/2026-02-24-openclaw-linux-secure-homelab-setup.md new file mode 100644 index 00000000..22c95769 --- /dev/null +++ b/src/site/posts/2026/2026-02-24-openclaw-linux-secure-homelab-setup.md @@ -0,0 +1,283 @@ +--- +layout: post +title: "Running OpenClaw on Linux (Securely): My Practical Setup Guide" +description: "A practical, security-focused guide for running OpenClaw on a Linux machine without buying dedicated Apple hardware. Covers VLAN isolation, memory setup, browser config, OAuth access, and maintenance." +tags: [AI, Linux, Self-hosting, Security] +thumbnail: /uploads/2026-02-openclaw-linux-guide/thumb_timeline.jpg +upload_directory: /uploads/2026-02-openclaw-linux-guide/ +--- + +I wanted a practical OpenClaw setup that is: + +- self-hosted +- reasonably secure +- affordable +- maintainable over time + +This guide is for technical people who want to run OpenClaw on Linux without buying a dedicated Mac Mini for no reason. + +This is a living guide. I update it as my setup evolves. + + + +## Installation + +My preferred setup is OpenClaw inside a Proxmox VM. + +Why a VM? + +- easy snapshots before upgrades +- easy rollback when something breaks +- cleaner isolation from the rest of your environment + +## Security + +### Isolate OpenClaw with VLANs + +You don’t want to give OpenClaw full unrestricted access to your network. +Even if your own prompts are safe, prompt injection attacks are real. + +#### UniFi + +1. Create a separate network (example: `Untrusted servers`) and assign a VLAN ID. +2. Go to **Ports**, find the Proxmox uplink port. +3. Set **Tagged VLAN Management** to: + - `Allow All`, or + - `Custom` if you want to limit available networks. + +#### Proxmox + +1. Go to host → **Network** → your bridge (`vmbr0` in most setups). +2. Enable **VLAN aware**. +3. Open your OpenClaw VM → **Hardware** → **Network Device**. +4. Set **VLAN Tag** to the VLAN ID configured in UniFi. +5. Reboot the VM. + +#### Validate segmentation + +- From trusted network → SSH into VM should work if allowed. +- From VM → reaching your personal devices should be blocked by policy. + +## Memory + +### Install QMD + +```bash +npm install -g @tobilu/qmd +``` + +### Enable QMD backend + +```bash +openclaw config set memory.backend "qmd" +openclaw memory status +openclaw memory index +``` + +The first index can take a while. + +### Memory files that matter + +At minimum, maintain these files consistently: + +- `AGENTS.md` +- `HEARTBEAT.md` +- `MEMORY.md` +- `USER.md` +- `IDENTITY.md` + +If these are stale, your agent gets inconsistent quickly. + +## Browser + +### Setup headless browser in OpenClaw + +```bash +openclaw config set browser.enabled true +openclaw config set browser.defaultProfile '"openclaw"' +openclaw config set browser.headless true +openclaw config set browser.noSandbox true +openclaw gateway restart +``` + +### Install Google Chrome on Linux + +I prefer Google Chrome over Chromium here. + +```bash +curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg + +cat <