Install OpenClaw on Raspberry Pi 5: Step-by-Step Guide

·

·

Yes, you can install OpenClaw on Raspberry Pi 5, and it is the board the docs rank highest [1]. The Pi only runs the OpenClaw Gateway, while the models run in the cloud through an API [1]. Flash 64-bit Raspberry Pi OS, install Node 24, run the installer, onboard, enable lingering, and verify. Plan on about 30 minutes [1].

What do you need to install OpenClaw on Raspberry Pi 5?

You need a Pi 5 (or Pi 4) with 2 GB of RAM or more, 64-bit Raspberry Pi OS, the official power supply, 16 GB or more of storage, and a network connection [1].

The OpenClaw Raspberry Pi install page rates each board [1]. These rows matter most:

Board RAM Docs rating [1]
Pi 5 4 GB or 8 GB "Best. Fastest, recommended"
Pi 4 4 GB "Good. Sweet spot for most users"
Pi 4 2 GB "OK. Add swap"
Pi 4 1 GB "Tight. Possible with swap, minimal config"

The hard minimum is 1 GB of RAM, one core, 500 MB of free disk and a 64-bit OS; the recommended setup is 2 GB or more of RAM, a 16 GB+ SD card or USB SSD, and Ethernet [1].

The 64-bit OS is mandatory. The docs say "required — do not use 32-bit" [1], and the reason is practical: on 32-bit ARMv7 Linux the installer stops before it installs anything, because official Node 24+ ARMv7 binaries do not exist [6][7].

Power is the thing people underestimate. The Pi 5 takes 5V/5A over USB-C, and Raspberry Pi recommends "a high-quality 5V 5A USB-C power supply, such as the new Raspberry Pi 27W USB-C Power Supply," warning that an under-powered supply causes problems [11]. For storage, an SD card works, but the docs say "SD cards are slow and wear out" [1]. A USB SSD on one of the two USB 3.0 ports is the easy upgrade [11]. The Pi 5 can also boot from an NVMe SSD through its PCIe slot with an M.2 HAT+ [14].

On price, be careful. On November 24, 2026, the Raspberry Pi 5 product page listed only one price: "Raspberry Pi 5 16GB is available now for $305" [11]. Other variants are sold through Approved Resellers without a price there [11]. The OpenClaw docs quote "$35-80 one-time, no monthly fees" [1], but that is their own estimate, not a shop price.

How do you install OpenClaw on Raspberry Pi 5 step by step?

Flash 64-bit Raspberry Pi OS Lite, connect over SSH, update, install Node 24, add swap if needed, install with --no-onboard, onboard with the daemon, enable lingering, and verify [1]. Each step uses the exact commands from the docs.

On November 24, 2026, the current npm release of openclaw was version 2026.11.8, published on GitHub that day [4][5]. It needs Node 24.16.0+ on the 24.x line or 26.1.0+, and the docs strongly recommend 24.22.1+ or 26.12.1+ for security [2][3].

Step 1: Flash the card. In Raspberry Pi Imager, choose Raspberry Pi OS Lite (64-bit) [1]. In the settings dialog, set a hostname (the docs use gateway-host), enable SSH, set a username and password, and enter WiFi details if you will not use Ethernet [1]. Lite has no desktop, so if you skip the SSH toggle you will need a keyboard and monitor to recover.

Step 2: Connect over SSH. Power the Pi, give it a minute, and connect from your computer, replacing user with your username:

ssh user@gateway-host

Step 3: Update the system and set the timezone. Update packages and install basic build tools [1]:

sudo apt update && sudo apt upgrade -y
sudo apt install -y git curl build-essential

Then set your timezone, the part people skip. The docs call it "important for cron and reminders" [1]: a wrong zone fires scheduled tasks at the wrong hour. List zones, then put yours in place of <IANA zone>:

timedatectl list-timezones
sudo timedatectl set-timezone <IANA zone>

Step 4: Install Node 24 LTS. Add the NodeSource repository and install Node [1]:

curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs
node --version

Confirm the printed version meets the requirement above. The installer can provision Node 24 LTS itself [2][3], but installing it first means you know what you have.

Step 5: Add swap (2 GB of RAM or less). The docs mark this "important for 2 GB or less" [1]; on a 4 GB or 8 GB Pi 5 it is optional. Create a 2 GB swap file, make it permanent, and lower swappiness so the Pi swaps only when it must [1]:

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Step 6: Install OpenClaw. Run the official installer but skip its built-in onboarding, so you handle that as its own step [1]:

curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard

Step 7: Onboard and install the service. This sets up your model provider and channel and installs the Gateway as a background service [1]:

openclaw onboard --install-daemon

The docs advise: "API keys are recommended over OAuth for headless devices. Telegram is the easiest channel to start with" [1]. Have your API key ready before you start.

Step 8: Enable lingering. Most guides miss this, because the docs mention it only in the tuning text and troubleshooting list, not in the numbered steps [1]. OpenClaw runs as a user service, and without lingering it does not survive logout [1]. The symptom: the Gateway works while you are logged in and stops when you close SSH. Run this once [1]:

sudo loginctl enable-linger "$(whoami)"

Step 9: Verify. Check the status, the service and the live log [1]:

openclaw status
systemctl --user status openclaw-gateway.service
journalctl --user -u openclaw-gateway.service -f

A good final test: log out, wait a minute, log back in and run openclaw status again. If the Gateway is still up, lingering works.

How do you open the dashboard without exposing the Pi?

Keep the Gateway bound to loopback and reach the Control UI through an SSH tunnel [1]. You never open a port on your network.

On your computer, start the tunnel and leave it running [1]. The default port is 18789 [9][10]:

ssh -N -L 127.0.0.1:18789:127.0.0.1:18789 user@gateway-host

In a second terminal, ask the Pi for a pairing link [1]:

ssh user@gateway-host 'openclaw dashboard --json'

Open the full browserUrl from the output in your local browser within ten minutes [1]. The common snag is a dashboard that loads but will not pair: the plain dashboard URL does not pair a new browser [1]. Treat the pairing link and JSON output as credentials [1].

Which settings make a Pi 5 run OpenClaw better?

Put state on an SSD, turn on the compile cache, add a systemd drop-in, and keep models in the cloud [1].

If the OS stays on the SD card, point OPENCLAW_STATE_DIR at a USB SSD [1]. Then append the compile cache and in-process restarts to ~/.bashrc [1]:

export NODE_COMPILE_CACHE=/var/tmp/openclaw-compile-cache
mkdir -p /var/tmp/openclaw-compile-cache
export OPENCLAW_NO_RESPAWN=1

Use /var/tmp, not /tmp, because some distros clear /tmp on boot [1].

Shell settings do not reach the service, so use a drop-in. Run systemctl --user edit openclaw-gateway.service and add Environment=OPENCLAW_NO_RESPAWN=1, Environment=NODE_COMPILE_CACHE=/var/tmp/openclaw-compile-cache and TimeoutStartSec=90 [1]. Then reload and restart [1]:

systemctl --user daemon-reload && systemctl --user restart openclaw-gateway.service

Do not add your own restart rules; the managed unit already owns Restart=always and RestartSec=5 [1].

The docs also free memory with echo 'gpu_mem=16' | sudo tee -a /boot/config.txt and sudo systemctl disable bluetooth [1]. Two cautions. Raspberry Pi’s config.txt documentation names the file /boot/firmware/config.txt [13], so check which path your system uses before appending. And gpu_mem=16 selects the cut-down firmware, which "removes support for codecs, 3D and debug logging" [13]. On a headless Gateway that is usually fine.

Keep models in the cloud. The docs are blunt: "do not run local LLMs on a Pi, even small models are too slow to be useful" [1].

What goes wrong most often, and how do you fix it?

Most failures trace back to lingering, PATH, memory or power [1][3]. Match your symptom below.

Symptom Likely cause Fix
Gateway stops after logout Lingering not enabled sudo loginctl enable-linger "$(whoami)"; check journalctl --user -u openclaw-gateway.service --no-pager -n 100 and openclaw doctor --non-interactive [1]
openclaw: command not found npm’s global bin directory not in PATH Check npm prefix -g and echo "$PATH"; add export PATH="$(npm prefix -g)/bin:$PATH" to ~/.bashrc [3]
EACCES on npm install -g Permission problem on npm’s global folder mkdir -p "$HOME/.npm-global", npm config set prefix "$HOME/.npm-global", add to PATH; no sudo [3]
Out of memory Too many services or local models free -h, disable cups bluetooth avahi-daemon, API models only [1]
Skill fails with "exec format error" Missing ARM64 binary Confirm uname -m prints aarch64; that skill’s tool has no ARM build [1]
Slow or stuttering SD card or throttling Move to a USB SSD; vcgencmd get_throttled should return 0x0 [1]
WiFi drops WiFi power saving sudo iwconfig wlan0 power off [1]
EADDRINUSE or "another gateway instance is already listening" Port conflict Stop the other process on port 18789 [9][10]
"Gateway start blocked: set gateway.mode=local" Local mode not set openclaw onboard --mode local, or set gateway.mode="local" [9]
Installer stops before installing anything 32-bit ARMv7 OS Reflash with 64-bit Raspberry Pi OS [6][7]

If vcgencmd get_throttled is not 0x0, check the power supply first [1][11]. Most features work on ARM64, including Node.js, Telegram, WhatsApp (Baileys) and Chromium [1].

What do Pi 5 owners report after months of use?

Reports are positive for cloud models and negative for local models or crowded setups. Each is one person’s experience.

In February 2026, one user on r/openclaw reported in a Pi install thread that the installer "was silently failing" on Raspberry Pi OS Lite, blaming the gum shell-UI tool; then npm install failed on permissions, with the advice "don’t brute force your way with sudo" [15]. That matches the EACCES fix above.

In April 2026, one user on r/ollama with an 8 GB Pi 5 reported that ollama run llama3.2:1b worked directly, but through OpenClaw it was "thinking forever without reply" [16].

In October 2026, one user on r/openclaw said an 8 GB Pi 5 was "working fine" with a cloud model, but after adding containers and Chromium "the device kills from out of memory continuously," and was moving to a mini PC [17]. A Pi 5 is a good single-purpose Gateway, not a general home server.

In September 2026, one user on r/openclaw described running "production" OpenClaw on a Pi 5 with a 256 GB NVMe drive, upgrading by cloning the NVMe to a spare Pi first [18]. Without a spare board, run openclaw backup create before each openclaw update [1][8].

Can you install OpenClaw on a Raspberry Pi 4 instead?

Yes. The steps are identical, and the docs call the 4 GB Pi 4 the "sweet spot for most users" [1].

The Pi 4 Model B uses a Broadcom BCM2711 quad-core Cortex-A72 at 1.8 GHz [12], against the Pi 5’s BCM2712 Cortex-A76 at 2.4 GHz [11]. RAM variants are listed as 1, 2, 3, 4 or 8 GB, and the Pi 4 product page says "From $35" (checked November 24, 2026) [12].

What changes on a Pi 4 is the margin, not the method. The docs rate 2 GB as "OK. Add swap" and 1 GB as "Tight. Possible with swap, minimal config" [1], so on those boards Step 5 is not optional and the out-of-memory row in the table above is the one you will meet first. To boot from a USB SSD, note that early Pi 4 units may need a bootloader update [14].

User reports are mixed. In January 2026, one user on r/vibecoding got OpenClaw onto an old Pi 4 only "after trials and workarounds" [19]. Whether a Pi 5 is worth the upgrade is debated in an April 2026 r/openclaw thread [20]. If you already own a 4 GB Pi 4, use it; if you are buying new, the docs point to the Pi 5 [1].

Is a Raspberry Pi 5 better than a VPS for OpenClaw?

It depends on what you value. A Pi 5 is hardware you own on your own network; a VPS removes the hardware care but adds a recurring bill.

Pick the Pi if you are happy managing power, storage and throttling. Pick a VPS if you want nothing to maintain; our comparison of the cheapest VPS options for OpenClaw covers that route. Weighing bigger hardware? See our Mac mini alternatives for OpenClaw and the short answer on whether you need a Mac mini for OpenClaw.

Bottom line

A Raspberry Pi 5 with 4 GB or 8 GB is the docs’ top pick for the OpenClaw Gateway [1]. Use the 64-bit Lite image, a 5V/5A power supply and ideally a USB SSD [1][11]. Follow the nine steps and do not skip lingering, or the service stops when you log out [1]. Keep models in the cloud, check vcgencmd get_throttled if things feel slow, and back up before each update [1][8]. If the box must also run containers and a browser, a mini PC or VPS will serve you better.

Frequently asked questions

How long does it take to install OpenClaw on Raspberry Pi 5?

The docs estimate about 30 minutes [1]. Flashing and system updates take most of it; the OpenClaw install is one command.

Can I install OpenClaw on Raspberry Pi 5 with 32-bit Raspberry Pi OS?

No. On 32-bit ARMv7 the installer stops because official Node 24+ ARMv7 binaries are unavailable [6][7]. Flash the 64-bit image and confirm uname -m prints aarch64 [1].

Can OpenClaw on a Raspberry Pi 5 run a local model?

The docs advise against it: even small models are too slow to be useful [1]. Use a cloud model through an API key instead.

Why does OpenClaw stop when I close my SSH session?

Lingering is not enabled, so your user service ends at logout [1]. Run the Step 8 command once and the Gateway keeps running.

How do I update OpenClaw on Raspberry Pi 5?

Run openclaw update and check it with openclaw update status [8]. Back up first with openclaw backup create; your config and sessions live in ~/.openclaw/ [1].

Sources

All sources were read on November 24, 2026.

  1. [1] OpenClaw docs: install/raspberry-pi
  2. [2] OpenClaw docs: install
  3. [3] OpenClaw docs: install/node
  4. [4] npm registry: openclaw (latest)
  5. [5] OpenClaw release v2026.11.8 on GitHub
  6. [6] OpenClaw docs: install/installer
  7. [7] OpenClaw docs: install/node-compatibility
  8. [8] OpenClaw docs: install/updating
  9. [9] OpenClaw docs: gateway/troubleshooting/gateway-service-and-process
  10. [10] OpenClaw docs: gateway/security/network-exposure
  11. [11] Raspberry Pi 5 product page
  12. [12] Raspberry Pi 4 Model B product page
  13. [13] Raspberry Pi documentation: config.txt
  14. [14] Raspberry Pi documentation: Raspberry Pi hardware and boot
  15. [15] Reddit r/openclaw: openclaw on raspberry pi i almost gave up
  16. [16] Reddit r/ollama: openclaw ollama on pi5 well
  17. [17] Reddit r/openclaw: minipc upgrading from pi5
  18. [18] Reddit r/openclaw: successful strategy to upgrade an nvme rpi5 to 93
  19. [19] Reddit r/vibecoding: it was tough to install openclaw on raspberry pi
  20. [20] Reddit r/openclaw: which raspberry pi are you running openclaw on