AI & Agents

How to Set Up Raspberry Pi OS Lite for OpenClaw AI Agents

Raspberry Pi OS Lite uses half the RAM of the Desktop variant at idle, leaving the Pi 5's 8 GB almost entirely free for OpenClaw's agent orchestration. Flash the 64-bit Lite image, pre-configure SSH for headless access, install Node.js and OpenClaw, then connect agent output to cloud storage so files don't stay trapped on a tiny SD card.

Fast.io Editorial Team 10 min read
AI agent orchestration with cloud workspace integration

Why Raspberry Pi OS Lite for Agent Workloads

Raspberry Pi OS Lite boots into 250 MB of RAM at idle. The Desktop variant starts at 503 MB before you open a single application. That 253 MB gap, measured in 2026 benchmarks by peppe8o, grows wider under real workloads as Chromium, the Pixel display manager, and background desktop services all compete for the same memory pool your agent needs.

The savings extend to storage. The Lite image downloads at 551 MB versus 1,285 MB for Desktop, and installs into 3.9 GB of disk space compared to 6.7 GB. On a 32 GB SD card, that 2.8 GB of freed space holds months of OpenClaw's SQLite database writes, cached API responses, and generated output files.

Fewer running services also means a smaller attack surface. No display server means no VNC exposure, no X11 socket, and no Chromium process listening for connections. For a device that sits on your home network running autonomous AI tools around the clock, this matters.

OpenClaw on a Pi doesn't run large language models locally. The device acts as an orchestration layer: it manages tool calls, schedules tasks, routes requests to cloud APIs like Claude, GPT-4, or Gemini, and handles integrations with messaging platforms. The actual inference happens on remote servers. This architecture means the Pi 5's quad-core Cortex-A76 processor handles coordination work comfortably, and you want the operating system consuming as little RAM as possible so the orchestrator gets the rest.

The economics seal the case. A Pi 5 draws 2.7 to 3.0 watts at idle in headless mode. At a typical US rate of $0.30 per kilowatt-hour, that works out to roughly $0.60 per month for a dedicated, always-on AI agent. The cheapest comparable cloud VM costs five to ten times more, and you still don't own the hardware.

Hardware and Storage Checklist

The OpenClaw documentation lists a minimum of 1 GB RAM and 500 MB free disk space, but the recommended spec for comfortable daily use is a Raspberry Pi 5 with 2 GB or more of RAM. In practice, the 8 GB Pi 5 is the right choice. It gives OpenClaw room to handle multiple concurrent tool calls without swapping, and it costs only about $20 more than the 4 GB model.

The Pi 4 with 4 GB RAM works but slows down noticeably during complex multi-step tasks. If you already own one, it's worth trying before buying new hardware. The 2 GB Pi 4 functions with swap space configured, but expect delays.

Storage deserves more attention than most guides give it. OpenClaw writes frequently to its SQLite database and logs. SD cards degrade under sustained small-write workloads, and a corrupted card means rebuilding everything from scratch. The Raspberry Pi M.2 HAT with a budget NVMe drive (120 GB models start around $15) eliminates this bottleneck and is worth the extra cost for any always-on deployment.

If you stick with an SD card, choose one rated A2 for application performance and at least 32 GB capacity. Plan to check its health periodically with tools like f3 or by monitoring /sys/block/mmcblk0/stat for error counts.

What to have ready before starting:

  • Raspberry Pi 5 (8 GB recommended) or Pi 4 (4 GB minimum)
  • MicroSD card (32 GB, A2 rated) or NVMe drive with M.2 HAT
  • Official Raspberry Pi 27W USB-C power supply
  • Ethernet cable or WiFi network credentials
  • Active cooling case or heatsink with fan
  • A Mac, Windows, or Linux computer with Raspberry Pi Imager installed

Use the official 27W power supply. Third-party USB-C chargers frequently trigger under-voltage warnings when an NVMe drive and active cooler draw power simultaneously, and voltage drops cause unpredictable crashes that corrupt OpenClaw's state database.

Flash and Pre-Configure Raspberry Pi OS Lite Headless

The key to a headless setup is configuring everything before the Pi boots for the first time. Raspberry Pi Imager writes SSH credentials, WiFi settings, hostname, and user accounts directly into the image, so the device is network-accessible from the moment it powers on.

Download Raspberry Pi Imager from raspberrypi.com/software and install it on your computer. Open it and walk through these steps:

  1. Click "Choose Device" and select your Pi model (Raspberry Pi 5 or Raspberry Pi 4).

  2. Click "Choose OS," navigate to "Raspberry Pi OS (other)," and select "Raspberry Pi OS Lite (64-bit)." The 64-bit version is required. OpenClaw does not support 32-bit builds.

  3. Click "Choose Storage" and select your SD card or NVMe drive.

  4. Click the gear icon (or "Edit Settings") to open the OS customization panel. Configure each setting:

Hostname: Pick something memorable like agent-pi or openclaw-node. This is how you'll find the device on your network.

Enable SSH: Turn this on and select "Use password authentication." You can switch to key-based auth later, but password auth gets you in on the first boot with no extra prep.

Username and password: Create a username and strong password. Current Raspberry Pi OS releases no longer include a default pi user, so you must set this during imaging.

WiFi credentials: If you're not using Ethernet, enter your SSID, password, and country code. The country code ensures correct wireless channel selection and regulatory compliance.

Locale settings: Set your timezone and keyboard layout. Getting the timezone right now saves a configuration step after boot and ensures scheduled agent tasks fire at the correct time.

  1. Click "Save," then "Write." Imager downloads the 551 MB Lite image, writes it to the storage device, and verifies the write automatically.

Remove the storage device, insert it into the Pi, connect Ethernet if applicable, and plug in the power supply. The first boot takes 60 to 90 seconds as the system expands the filesystem and applies your pre-configured settings. Resist the urge to unplug anything during this window.

For networking, Ethernet is the most reliable option for an always-on headless device. WiFi works but adds a failure mode: if your router reassigns the Pi's IP address or the WiFi drops overnight, SSH access breaks until you physically intervene. If you must use WiFi, assign a static IP or DHCP reservation in your router's settings.

Raspberry Pi OS Lite headless configuration workflow

First Boot: SSH In and Prepare the System

After the Pi finishes its first boot, connect over SSH using the hostname you configured:

ssh youruser@agent-pi.local

If .local hostname resolution doesn't work on your network (common on some Windows machines and older routers), find the Pi's IP address from your router's DHCP client list or scan your local subnet from another machine:

nmap -sn 192.168.1.0/24

Once connected, update the system and install the build tools OpenClaw needs:

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

Set your timezone explicitly. Scheduled agent tasks and log timestamps depend on it:

sudo timedatectl set-timezone America/Chicago

Replace America/Chicago with your actual timezone. Run timedatectl list-timezones to browse the full list.

Install Node.js 24 OpenClaw requires Node.js 24 or later.

Install it from the NodeSource repository:

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

Verify the installation:

node --version

The output should show v24.x.x. If you see a lower version number, the NodeSource repository didn't override the default Debian package. Remove the system Node.js with sudo apt remove nodejs and reinstall from NodeSource.

Configure Swap Space

If your Pi has 4 GB of RAM or less, add 2 GB of swap space. This prevents out-of-memory kills during heavy orchestration work:

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

The low swappiness value of 10 tells the kernel to prefer physical RAM over swap unless memory pressure is real, which avoids unnecessary writes to your SD card. The 8 GB Pi 5 doesn't strictly need swap for typical OpenClaw workloads, but adding it as a safety net prevents hard crashes if a runaway process temporarily consumes more memory than expected.

Headless Optimizations

Reduce GPU memory allocation since there is no display attached, and disable Bluetooth if you won't use it:

echo 'gpu_mem=16' | sudo tee -a /boot/firmware/config.txt
sudo systemctl disable bluetooth

The default GPU allocation is 76 MB. Dropping it to 16 MB is safe for headless operation and frees another 60 MB for your agent. Disabling Bluetooth eliminates one more wireless service that would otherwise run idle in the background.

Fastio features

Give your Pi agent persistent, shareable storage

50 GB free workspace with MCP endpoint for agent reads and writes, version history, and ownership transfer to hand finished projects to clients. No credit card, no expiration.

Install OpenClaw and Verify the Agent

With the system prepared, install OpenClaw using the official install script:

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

On a Pi 5 with NVMe storage, expect the process to take 3 to 5 minutes. On a Pi 4 with an SD card, it can take 15 to 30 minutes. The bottleneck is I/O speed, not CPU.

After installation completes, run the onboarding wizard:

openclaw onboard --install-daemon

The wizard walks through initial configuration. For a headless device, choose API key authentication rather than OAuth when prompted. API keys work without a browser, which matters when there is no desktop environment to open one. Have your LLM provider's API key ready: Anthropic, OpenAI, or Google, depending on which service you plan to use.

The --install-daemon flag registers OpenClaw as a systemd user service. This means the agent starts automatically when the Pi boots and restarts itself after crashes. Without it, you would need to SSH in and manually start OpenClaw every time the power cycles.

Verify that everything is running:

openclaw status
systemctl --user status openclaw-gateway.service

Both commands should show an active state. To watch logs in real time while testing your first agent task:

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

Keep the Service Alive After Logout

By default, user-level systemd services stop when your SSH session disconnects. Enable lingering so the OpenClaw gateway survives logout:

loginctl enable-linger $USER

This single command is the difference between an agent that runs only when you are connected and one that runs around the clock.

Choosing an LLM Provider

The Pi doesn't run large models locally. It routes requests to cloud APIs, which is why OS Lite's low resource footprint works so well for this use case. Claude Sonnet, GPT-4, and Gemini all work for agent orchestration tasks. If you want an offline fallback for simple classification or routing decisions, a small model through Ollama can serve as a backup. But for anything requiring real reasoning, cloud APIs deliver full-speed responses without taxing the Pi's limited compute.

Enable Node.js module compile caching for better startup times on repeated runs, and confirm systemd lingering is active so the gateway service persists through SSH disconnects and system reboots.

Persist Agent Output with Cloud Storage

A headless agent that generates files, reports, and logs needs somewhere durable to put them. Storing everything locally on the Pi creates problems: SD cards fill up, files on a headless device require SSH to retrieve, and a failed storage device means losing all output without a backup strategy.

The simplest solution is rsync to a NAS or remote server on a cron schedule. S3 buckets work for archival storage but require managing credentials, bucket policies, and lifecycle rules. Google Drive and Dropbox have CLI tools, but they were designed for desktop sync patterns, not agent-driven file operations.

Fast.io takes a different approach. It provides intelligent workspaces where agents and humans access the same files through different interfaces: agents write through the MCP server at mcp.fast.io, and humans browse, search, and share through the web UI. The free agent tier includes 50 GB of storage, 5,000 credits per month, and five workspaces with no credit card and no expiration.

The practical workflow for a Pi-based OpenClaw agent looks like this: the agent runs a scheduled task, generates output, and uploads it to a Fast.io workspace through the MCP endpoint. Recipients get a branded download link without needing SSH access to your Pi. The workspace keeps version history and audit trails, so you can trace what the agent produced and when it produced it.

With Intelligence Mode enabled on a workspace, uploaded documents are automatically indexed for semantic search. You can ask questions about agent-generated reports using natural language and get answers with citations pointing to specific files. This turns a pile of agent output into a queryable knowledge base without setting up a separate vector database or search index.

For teams running multiple Pi agents, each device can write to a shared workspace. File locks prevent conflicts when two agents modify the same document. The ownership transfer pattern lets the agent build and populate a workspace, then hand full control to a human client while retaining admin access for ongoing maintenance.

If your setup involves sensitive data, evaluate the data handling requirements for whichever storage approach you choose. Fast.io encrypts data at rest and in transit, but does not currently hold compliance certifications like SOC 2 or HIPAA.

Cloud workspace for agent file storage and collaboration

Frequently Asked Questions

What is Raspberry Pi OS Lite?

Raspberry Pi OS Lite is the minimal, headless variant of the official Raspberry Pi operating system. It ships without a desktop environment, window manager, or GUI applications, booting straight to a command-line terminal. The Lite image is 551 MB compared to 1,285 MB for Desktop and uses roughly 250 MB of RAM at idle, making it the preferred choice for servers, IoT devices, and agent workloads where every megabyte of free memory counts.

How do I install Raspberry Pi OS Lite without a monitor?

Use Raspberry Pi Imager to flash the Lite image and pre-configure SSH, hostname, WiFi, and user credentials before the first boot. When you power on the Pi, it connects to your network automatically and accepts SSH connections at the hostname you set. No monitor, keyboard, or mouse is needed at any point in the process.

What is the difference between Raspberry Pi OS and Raspberry Pi OS Lite?

Raspberry Pi OS with Desktop includes the Pixel desktop environment, Chromium browser, file manager, and other GUI applications. It uses 503 MB of RAM at idle and installs into 6.7 GB of disk space. Raspberry Pi OS Lite strips all of that out, providing only the base Linux system with a command-line interface. It uses 250 MB of RAM at idle and installs into 3.9 GB. Lite is better for headless server and agent applications. Desktop is better when you need a graphical interface.

Can I run AI on Raspberry Pi OS Lite?

Yes, but the architecture matters. The Pi runs AI agent frameworks like OpenClaw that orchestrate tool calls, manage workflows, and handle messaging integrations. The actual LLM inference happens on cloud APIs such as Claude, GPT-4, or Gemini, not on the Pi itself. This orchestration approach works because the Pi 5's 8 GB RAM handles coordination work easily and OS Lite leaves most of that RAM available. Running large language models locally on a Pi is technically possible with tools like Ollama but too slow for production agent workloads.

How much does it cost to run a Raspberry Pi 5 around the clock?

A Raspberry Pi 5 running headless draws 2.7 to 3.0 watts at idle. At the US average electricity rate of $0.30 per kilowatt-hour, that costs roughly $0.60 per month or $7 to $8 per year. Under sustained CPU load the draw increases to about 8.8 watts, but typical agent orchestration workloads spend most of their time at idle waiting for API responses.

Related Resources

Fastio features

Give your Pi agent persistent, shareable storage

50 GB free workspace with MCP endpoint for agent reads and writes, version history, and ownership transfer to hand finished projects to clients. No credit card, no expiration.