惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - xgqfrms

Dell 显示器 S2419HM 灰屏 &花屏 All In One AI Harness Engineering All In One 电脑外接显示器天梯榜 All In One How to change the speed display unit of GSP from mph to km/h using GoPro Labs All In One WHCA 白宫记者协会 All In One Pascal Editor All In One 主流犬种图解指南 All In One 泡沫喷雾 & 辣椒喷雾 All In One 如何给身份证照片添加水印 All In One GoPro MISSION 1 PRO price All In One 杭州历史天气数据 All In One Pandoc All In One GoPro MISSION 1 SERIES All In One GoPro telemetry 中的 GPS5 与 GPS9 是什么 All In One NHTSA FARS All In One How to extract raw telemetry data from GoPro videos using FFmpeg All In One Free Vercel Services All In One How to run for loop in Python REPL All In One 使用不同 AI 大模型生成一杯装满的红酒的高脚杯挑战赛 All In One CSS Custom Highlight API All In One OpenCode All In One OpenClaw 设置 cron 定时任务 All In One free MongoDB Cloud API All In One free cloud LLM models API All In One Claude Code Free Video Tutorials All In One 如何解决 OpenClaw 升级后导致 feishu plugin 无法使用的问题 All In One Claude Code skills & plugins All In One LLM Benchmark All In One How to fix use the FileZilla FTP upload file error All In One
如何在 Raspberry Pi 安装 OpenClaw All In One
xgqfrms · 2026-03-27 · via 博客园 - xgqfrms

如何在 Raspberry Pi 安装 OpenClaw All In One

树莓派 4B / 5B 养龙虾🦞

前置条件(Raspberry Pi 软硬件推荐配置)

  • Raspberry Pi 5 with 4 GB+ RAM
  • USB SSD (USB 移动固态硬盘)
  • Raspberry Pi 官方电源
  • WiFi (写入系统时候,添加到配置文件)
  • 64-bit Raspberry Pi OS

image

https://docs.openclaw.ai/install/raspberry-pi#prerequisites

Raspberry Pi 5 / Raspberry Pi 4B

https://www.raspberrypi.com/products/raspberry-pi-5/

https://www.raspberrypi.com/products/raspberry-pi-5-model-b/

https://www.raspberrypi.com/products/raspberry-pi-4-model-b/

Raspberry Pi 5 compute module

https://www.raspberrypi.com/products/compute-module-5/?variant=cm5-104032

Raspberry Pi Imager

使用 Raspberry Pi OS Lite (64-bit) 制作 headless 服务器系统,设置必要启动配置项目

  • 设置 hostname
  • 开启 SSH
  • 设置 username & password
  • 配置 WiFi (wifi name & wifi password)
  • 静态 ip ?
$ sudo apt install rpi-imager

https://www.raspberrypi.com/software/

https://www.raspberrypi.com/software/operating-systems/

SSH 远程连接

# ssh username@hostname
$ ssh pi@192.168.1.7
# 更新
$ sudo apt update && sudo apt upgrade -y

# 安装必要的 OpenClaw 依赖软件包 (git, curl, build-essential)
$ sudo apt install -y git curl build-essential

# 设置 timezone (用于准确触发 cron & reminders)
$ sudo timedatectl set-timezone Asia/Shanghai

# 安装 nvm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
$ nvm -h

$ nvm ls-remote | grep "Latest LTS"
# 安装 node.js 24+
$ nvm install 24.14.0
$ nvm use 24.14.0
$ nvm alias default 24.14.0

$ node --version
$ npm -v
$ npx -v

https://github.com/nvm-sh/nvm?tab=readme-ov-file#install--update-script

设置 swap, 内存性能优化

$ 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

# Reduce swappiness for low-RAM devices
$ echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p

安装 OpenClaw

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

$ openclaw status

$ sudo systemctl status openclaw

$ journalctl -u openclaw -f
# 获取 dashboard URL (username@hostname)
$ ssh pi@192.168.1.7  'openclaw dashboard --no-open'
# 在新 Terminal 开启 SSH tunnel (username@hostname)
$ ssh -N -L 18789:127.0.0.1:18789 pi@192.168.1.7

一直可以远程访问,需要使用Tailscale integration (内网穿透 VPN)

# Tailnet-only (Serve)

{
  gateway: {
    bind: "loopback",
    tailscale: { mode: "serve" },
  },
}
#Tailnet-only (bind to Tailnet IP)

{
  gateway: {
    bind: "tailnet",
    auth: { mode: "token", token: "your-token" },
  },
}

https://docs.openclaw.ai/gateway/tailscale

The best secure connectivity platform for devs, IT, and security

A Zero Trust identity-based connectivity platform that replaces your legacy VPN, SASE, and PAM and connects remote teams, multi-cloud environments, CI/CD pipelines, Edge & IoT devices, and AI workloads.

https://tailscale.com/

demos

image

性能优化

  1. 使用 USB SSD 启动 Raspberry Pi

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#usb-mass-storage-boot

  1. 开启 module compile cache
$ grep -q 'NODE_COMPILE_CACHE=/var/tmp/openclaw-compile-cache' ~/.bashrc || cat >> ~/.bashrc <<'EOF' # pragma: allowlist secret
export NODE_COMPILE_CACHE=/var/tmp/openclaw-compile-cache
mkdir -p /var/tmp/openclaw-compile-cache
export OPENCLAW_NO_RESPAWN=1
EOF

$ source ~/.bashrc
  1. 减少 memory 使用
$ echo 'gpu_mem=16' | sudo tee -a /boot/config.txt

# 禁用蓝牙 💩
$ sudo systemctl disable bluetooth

https://docs.openclaw.ai/install/raspberry-pi#performance-tips

OpenClaw 配置

$ cat ~/.openclaw/openclaw.json
# 🚀 直接修改配置文件
$ sudo vim ~/.openclaw/openclaw.json

# ⚠️ 直接 CLI 命令行修改
$ openclaw config get agents.defaults.workspace
$ openclaw config set agents.defaults.heartbeat.every "2h"
$ openclaw config unset plugins.entries.brave.config.webSearch.apiKey

# 💩 命令行交互式修改
# full onboarding flow
$ openclaw onboard

# config wizard
$ openclaw configure

https://docs.openclaw.ai/gateway/configuration

feishu bot

https://docs.openclaw.ai/gateway/configuration

$ openclaw plugins install @openclaw/feishu

https://docs.openclaw.ai/channels/feishu

timezone

Ubuntu Linux 通过命令查看时区 timezone

xgqfms@ai2026:~$ timedatectl
               Local time: 五 2026-03-27 14:08:57 CST
           Universal time: 五 2026-03-27 06:08:57 UTC
                 RTC time: 五 2026-03-27 06:08:57
                Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
xgqfms@ai2026:~$ cat /etc/timezone
Asia/Shanghai
xgqfms@ai2026:~$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 33  3月 11 21:38 /etc/localtime -> /usr/share/zoneinfo/Asia/Shanghai

xgqfms@ai2026:~$ date
2026年 03月 27日 星期五 14:08:46 CST
xgqfms@ai2026:~$ date -R
Fri, 27 Mar 2026 14:08:49 +0800

image

refs

©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!