Get Started →

    On this page

    How to Install OpenClaw on a Raspberry Pi (Always-On Agent for $35)

    Meta Description: Install OpenClaw on Raspberry Pi 4/5 for a 24/7 AI agent. Thermal management, swap config, headless boot, ARM compatibility, and when to upgrade to cloud hosting explained.

    A $35 computer running your AI agent 24/7. No cloud bills. No VPS subscription. Just a Raspberry Pi on your desk, always listening, always ready.

    The Pi 4 and Pi 5 are powerful enough to run OpenClaw for personal use. 4GB of RAM handles most skills. Low power consumption means it costs pennies per month to run. And it’s yours—no one else’s server, no data leaving your network.

    This guide covers Pi 4/5 installation with thermal considerations, swap configuration for memory-constrained environments, headless boot setup, and which skills are too heavy for ARM architecture.

    We’ll also be honest about when a Pi isn’t enough and you should upgrade to cloud hosting instead.

    Why Raspberry Pi for OpenClaw

    The case for Pi:

    Cost: $35-75 depending on model and RAM. One-time purchase vs $5-20/month VPS.

    Privacy: Your data stays on your network. No cloud provider can access it.

    Always-on: Runs 24/7 for ~$2/month in electricity. Compare to laptop ($$) or desktop ($$$).

    Learning: Physical server you can touch. See the activity LEDs. Power cycle by unplugging.

    Edge computing: Responds instantly (no internet round-trip). Works during outages if you have local power.

    The tradeoffs:

    Limited RAM: 4GB or 8GB max (Pi 5). Some skills need more.

    ARM architecture: Not all Node packages have ARM builds. Expect compatibility issues.

    SD card reliability: MicroSD fails eventually. Requires backup discipline.

    Thermal throttling: Gets hot under load. Needs cooling solution.

    No redundancy: If Pi dies, agent is down. No automatic failover.

    When Pi makes sense:

    • Personal AI assistant (1 user)
    • Low-moderate message volume
    • Primarily text-based interactions
    • Home network deployment
    • Learning/experimentation

    When Pi doesn’t make sense:

    • Team/multi-user deployment
    • High message volume (>100/day)
    • Heavy skills (image generation, voice processing)
    • Mission-critical uptime needs
    • Public internet exposure

    Hardware Requirements

    Raspberry Pi 5 (8GB) – Current generation, best performance

    • $80 for 8GB model
    • ARM Cortex-A76 (quad-core, 2.4GHz)
    • 2× USB 3.0, 2× USB 2.0
    • Gigabit Ethernet + WiFi 6
    • PCIe for NVMe (optional)

    Raspberry Pi 4 (4GB or 8GB) – Previous gen, still solid

    • $35-55 depending on RAM
    • ARM Cortex-A72 (quad-core, 1.5GHz)
    • 2× USB 3.0, 2× USB 2.0
    • Gigabit Ethernet + WiFi 5

    Minimum: Pi 4 with 4GB RAM. Anything less will struggle.

    Required Accessories

    MicroSD card: 32GB minimum, 64GB recommended

    • SanDisk Extreme or Samsung EVO
    • NOT generic brands (high failure rate)

    Power supply: Official Pi power supply

    • 5V/3A for Pi 4
    • 5V/5A for Pi 5 (uses USB-C PD)
    • Don’t use phone chargers (causes stability issues)

    Cooling solution: Essential for sustained load

    • Minimum: Heatsinks (passive cooling)
    • Better: Case with fan (active cooling)
    • Best: Argon ONE case (metal case acts as giant heatsink + fan)

    Optional but recommended:

    • Ethernet cable (more stable than WiFi)
    • Case (protect from dust/damage)
    • Backup MicroSD or USB drive

    Initial Setup

    Flash Raspberry Pi OS

    Download Raspberry Pi Imager: raspberrypi.com/software

    Choose OS:

    • Raspberry Pi OS Lite (64-bit) – Command-line only, minimal resources
    • NOT Desktop version (wastes RAM on GUI)

    Configure before flash:

    Click gear icon for advanced options:

    • Set hostname: openclaw
    • Enable SSH: Yes
    • Set username/password: pi / [your password]
    • Configure WiFi: SSID + password (if using WiFi)
    • Set locale: Your timezone

    Flash to MicroSD:

    1. Insert card into computer
    2. Select OS and card
    3. Write

    First boot:

    1. Insert MicroSD into Pi
    2. Connect ethernet (or rely on WiFi config)
    3. Power on
    4. Wait 60 seconds for boot

    Find Pi’s IP:

    From your computer:

    ping openclaw.local
    

    Or check your router’s DHCP list.

    SSH into Pi:

    Enter password you configured.

    You’re in.

    System Preparation

    Update System

    sudo apt update
    sudo apt upgrade -y
    

    Install Node.js (ARM-compatible)

    Don’t use apt’s Node.js (old version).

    Use NodeSource repository:

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

    Verify:

    node --version  # Should show v20.x
    npm --version   # Should show 10.x
    

    Install Git

    sudo apt install -y git
    

    Install SQLite (for memory backend)

    sudo apt install -y sqlite3
    

    Configure Swap (Critical for 4GB Models)

    Pi 4 with 4GB RAM will run out of memory under load. Swap extends RAM using SD card storage.

    Check Current Swap

    free -h
    

    Default: 100MB swap (not enough).

    Increase Swap to 2GB

    Edit swap config:

    sudo nano /etc/dphys-swapfile
    

    Find line:

    CONF_SWAPSIZE=100
    

    Change to:

    CONF_SWAPSIZE=2048
    

    Save: Ctrl+X, Y, Enter

    Restart swap:

    sudo dphys-swapfile swapoff
    sudo dphys-swapfile setup
    sudo dphys-swapfile swapon
    

    Verify:

    free -h
    

    Should show 2GB swap.

    Important: Swap on MicroSD reduces card lifespan. Use high-quality card and expect to replace every 2-3 years.

    Install OpenClaw

    Clone Repository

    cd ~
    git clone https://github.com/openclaw/openclaw.git
    cd openclaw
    

    Install Dependencies

    npm install
    

    This takes 10-15 minutes on Pi. ARM compilation is slow.

    If you see errors about native modules:

    Some packages don’t have ARM builds. Common issues:

    better-sqlite3: Usually works but needs compilation

    npm rebuild better-sqlite3
    

    sharp (image processing): Works on ARM but slow to compile

    npm rebuild sharp
    

    If package fails completely: You’ll need to disable that skill.

    Create Configuration

    cp .env.example .env
    nano .env
    

    Configure:

    # Core
    NODE_ENV=production
    
    # Telegram
    TELEGRAM_ENABLED=true
    TELEGRAM_BOT_TOKEN=your-bot-token
    TELEGRAM_PHONE_NUMBER=+15551234567
    
    # WhatsApp (works but drains resources)
    WHATSAPP_ENABLED=false  # Enable only if needed
    
    # Memory
    MEMORY_BACKEND=sqlite
    MEMORY_DB_PATH=./data/memory.db
    
    # Logging
    LOG_LEVEL=info
    

    WhatsApp note: WhatsApp uses Chrome/Chromium in background. Heavy on Pi. Enable only if you need it.

    Create Data Directory

    mkdir -p data logs
    

    Test Run

    npm start
    

    Should see:

    [INFO] OpenClaw starting...
    [INFO] Telegram bot connected
    [INFO] Agent ready
    

    Ctrl+C to stop.

    Run as System Service

    Make OpenClaw auto-start on boot and restart on crash.

    Create Systemd Service

    sudo nano /etc/systemd/system/openclaw.service
    

    Paste:

    [Unit]
    Description=OpenClaw AI Agent
    After=network.target
    
    [Service]
    Type=simple
    User=pi
    WorkingDirectory=/home/pi/openclaw
    ExecStart=/usr/bin/node index.js
    Restart=always
    RestartSec=10
    StandardOutput=append:/home/pi/openclaw/logs/service.log
    StandardError=append:/home/pi/openclaw/logs/service-error.log
    
    # Environment
    Environment=NODE_ENV=production
    
    [Install]
    WantedBy=multi-user.target
    

    Save: Ctrl+X, Y, Enter

    Enable and Start Service

    sudo systemctl daemon-reload
    sudo systemctl enable openclaw
    sudo systemctl start openclaw
    

    Check status:

    sudo systemctl status openclaw
    

    Should show “active (running)”.

    View logs:

    tail -f ~/openclaw/logs/service.log
    

    Service Management Commands

    sudo systemctl start openclaw    # Start
    sudo systemctl stop openclaw     # Stop
    sudo systemctl restart openclaw  # Restart
    sudo systemctl status openclaw   # Check status
    

    Thermal Management

    Pi throttles CPU when temperature hits 80°C. This makes OpenClaw sluggish.

    Check Temperature

    vcgencmd measure_temp
    

    Shows current temp (e.g., temp=65.0'C).

    Safe range: 40-75°C Warning: 75-80°C Throttling: 80°C+

    Monitor While Running

    watch -n 2 vcgencmd measure_temp
    

    Updates temp every 2 seconds.

    Cooling Solutions

    Level 1: Heatsinks (Passive)

    $5 aluminum heatsinks on CPU and RAM chips.

    • Lowers temp by 5-10°C
    • No noise
    • Insufficient under sustained load

    Level 2: Case with Fan (Active)

    $10-15 case with 30mm fan.

    • Lowers temp by 15-20°C
    • Slight noise
    • Sufficient for most use cases

    Level 3: Argon ONE Case

    $25 metal case that IS the heatsink + controllable fan.

    • Lowers temp by 20-30°C
    • Quietest fan (only spins when needed)
    • Best solution for 24/7 operation

    Pi 5 specific: Runs hotter than Pi 4. Active cooling mandatory.

    If You’re Throttling

    Reduce CPU usage:

    Edit service to use less Node threads:

    Environment=UV_THREADPOOL_SIZE=2
    

    Limit agent skills:

    Disable heavy skills in config:

    SKILLS_DISABLED=image-gen,video-processing,voice-synthesis
    

    Add fan immediately.

    Skills That Are Too Heavy for ARM/Pi

    Not all OpenClaw skills run well on Pi. Some are too CPU/RAM intensive, others lack ARM support.

    Skills That Work Fine

    Text processing – Summarization, Q&A, general chat ✅ Telegram/Discord – Messaging integration ✅ Calendar integration – Google Calendar API ✅ File operations – Read/write documents ✅ Web scraping – Fetching data from websites ✅ SQLite operations – Database queries

    Skills That Are Slow But Functional

    ⚠️ Image analysis – Works but takes 30-60 seconds per image ⚠️ PDF processing – Large PDFs (>100 pages) are slow ⚠️ WhatsApp – Runs Chrome in background, uses 500MB+ RAM

    Skills That Don’t Work or Cause Problems

    Voice synthesis (TTS) – Most TTS engines lack ARM builds ❌ Speech recognition (STT) – Too CPU intensive, real-time impossible ❌ Image generation – Stable Diffusion etc. need GPU ❌ Video processing – Encoding/decoding too slow ❌ Large language model inference – Need 8GB+ VRAM (Pi has 0)

    If you need these skills: Cloud deployment required (VPS or PaioClaw).

    Testing Skill Performance

    # Enable debug logging
    export LOG_LEVEL=debug
    
    # Test specific skill
    npm run test-skill image-analysis
    

    If execution takes >5 seconds or causes temperature spike, skill is too heavy.

    Headless Operation (No Monitor)

    Pi runs without keyboard/monitor/display. Access via SSH or web UI.

    SSH Access from Anywhere

    Problem: Home IP changes, can’t SSH from outside network.

    Solution 1: Dynamic DNS

    Use service like NoIP or DuckDNS:

    1. Register free hostname (e.g., myclaw.ddns.net)
    2. Install update client on Pi
    3. Hostname always points to your home IP

    Solution 2: Tailscale (Recommended)

    Zero-config VPN. Access Pi from anywhere.

    curl -fsSL https://tailscale.com/install.sh | sh
    sudo tailscale up
    

    Now SSH via Tailscale hostname (stays same even when home IP changes).

    Web UI (Optional)

    If OpenClaw has web interface:

    Forward port in router: 3000 → Pi’s IP

    Access: http://your-home-ip:3000

    Security warning: Don’t expose to internet without auth.

    Monitoring

    Install monitoring tool:

    sudo apt install -y htop
    

    View system resources:

    htop
    

    Shows CPU, RAM, running processes.

    Backup Strategy

    MicroSD cards fail. Backup regularly or lose everything.

    Daily Automated Backup

    Backup script:

    Create ~/backup.sh:

    #!/bin/bash
    
    BACKUP_DIR=/home/pi/backups
    DATE=$(date +%Y%m%d)
    
    mkdir -p $BACKUP_DIR
    
    # Backup OpenClaw data
    tar -czf $BACKUP_DIR/openclaw-$DATE.tar.gz 
      /home/pi/openclaw/data 
      /home/pi/openclaw/.env 
      /home/pi/openclaw/config
    
    # Keep only last 7 days
    find $BACKUP_DIR -name "openclaw-*.tar.gz" -mtime +7 -delete
    

    Make executable:

    chmod +x ~/backup.sh
    

    Schedule daily at 2am:

    crontab -e
    

    Add:

    0 2 * * * /home/pi/backup.sh
    

    Weekly Manual Backup

    Stop agent:

    sudo systemctl stop openclaw
    

    Backup to external USB:

    sudo rsync -av /home/pi/openclaw /media/usb-drive/openclaw-backup
    

    Restart agent:

    sudo systemctl start openclaw
    

    SD Card Cloning (Full System Backup)

    Use Pi Imager to create image of entire SD card.

    1. Shut down Pi
    2. Remove SD card
    3. Insert into computer
    4. Raspberry Pi Imager → “Read” mode
    5. Save .img file

    If card fails, flash .img to new card = instant recovery.

    Power Management

    Pi has no power button. Power cycle = unplug/replug.

    Graceful Shutdown

    From SSH:

    sudo shutdown now
    

    Wait 30 seconds for Pi to power off (LED stops blinking).

    Then unplug power.

    Never just yank power while Pi is running. Corrupts SD card.

    UPS for Pi

    $30 battery backup (Geekworm/Waveshare UPS HAT).

    Provides:

    • 30-60 min backup power
    • Clean shutdown on power loss
    • Prevents data corruption

    Worth it for 24/7 operation.

    Power Consumption

    Pi 4 idle: 3-4W Pi 4 under load: 6-8W

    Cost at $0.15/kWh:

    • Idle: $0.40/month
    • 24/7 under load: $0.80/month

    Compare to:

    • Laptop 24/7: $10-15/month
    • Desktop 24/7: $30-50/month
    • Cloud VPS: $5-20/month

    When to Upgrade from Pi to Cloud

    Pi is amazing for learning and personal use. But there are clear limits.

    You’ve Outgrown Pi When:

    Performance:

    • Agent response time >5 seconds regularly
    • CPU at 100% constantly
    • Temperature throttling frequently
    • Out of memory errors

    Reliability:

    • SD card failed (2nd or 3rd time)
    • Need redundancy/failover
    • Can’t afford downtime

    Scale:

    • Multiple users need access
    • Message volume >100/day
    • Need skills Pi can’t run (voice, images, video)

    Connectivity:

    • Need guaranteed uptime
    • Home internet too unreliable
    • Want access from anywhere without VPN

    Cloud Alternatives

    Budget VPS ($5-10/month):

    • DigitalOcean, Linode, Vultr
    • 2GB+ RAM, real CPU
    • 99.9% uptime SLA
    • Professional networking

    When to choose: Personal use, moderate scale, want control.

    PaioClaw Managed ($15-25/month):

    • No server management
    • Automatic scaling
    • Built-in monitoring
    • Professional support

    When to choose: Don’t want to manage servers, need reliability, team use.

    The Honest Take

    Pi is perfect for:

    • Learning OpenClaw
    • Personal AI assistant (1 user)
    • Home automation integration
    • Privacy-first deployment
    • Experimentation

    Pi struggles with:

    • Multiple users
    • Heavy skills (voice, images, video)
    • Mission-critical uptime
    • High message volume
    • Professional/business use

    Pi costs:

    • Hardware: $35-150 (one-time)
    • Electricity: $0.40-0.80/month
    • SD card replacement: $10/year

    Cloud costs:

    • VPS: $5-20/month ongoing
    • PaioClaw: $15-25/month ongoing

    The decision: If Pi handles your workload and you enjoy tinkering, it’s unbeatable value. If you’re fighting thermal issues, memory limits, or ARM incompatibility, cloud is cheaper than your time.

    The Bottom Line

    Raspberry Pi can absolutely run OpenClaw for personal use. The Pi 5 with 8GB RAM handles text-based agent tasks smoothly. Add proper cooling and a good SD card, you’ve got a reliable $35 AI agent running 24/7.

    The limitations are real: some skills won’t work, heavy workloads cause throttling, and SD cards eventually fail. But for learning, experimentation, or personal use, Pi delivers exceptional value.

    If you followed this guide, you now have OpenClaw running on a Pi with proper thermal management, swap configuration, and automatic startup.

    Whether you stick with Pi or upgrade to cloud depends on your needs. Pi for personal/learning. Cloud for production/team use.

    Ready to skip the hardware entirely? PaioClaw runs OpenClaw in the cloud with zero setup, automatic scaling, and professional monitoring. No Pi to configure, no SD cards to fail, no thermal management. Starts FREE, Smart $15/month, Genius $25/month. Start free →

    Join Our Community

    Connect with other PaioClaw users, share tips, and stay up to date.