THE FIELD GUIDES
AI on a Raspberry Pi
For a Raspberry Pi 4 or 5 running the 64-bit Raspberry Pi OS. Open Terminal on the Pi (or SSH in) and paste one line at a time.
Set up your Pi
STEP 1
Check you're on 64-bit
uname -maarch64. If it says armv7l, reinstall with the 64-bit Raspberry Pi OS from Raspberry Pi Imager. Most of these tools need 64-bit.STEP 2
Update and install the basics
sudo apt update && sudo apt upgrade -ysudo apt install -y curl gitSTEP 3
Install a current Node
The built-in Node is too old for these tools:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -sudo apt install -y nodejsSTEP 4
Claude Code
sudo npm install -g @anthropic-ai/claude-codeclaudeSTEP 5
Codex, Gemini CLI and OpenCode
sudo npm install -g @openai/codex @google/gemini-cli opencode-aicodex, gemini or opencode. More tools are on the CLI AI tools page; put sudo in front of the npm lines on the Pi.Ollama on the Pi
STEP 1
Install and run a small model
curl -fsSL https://ollama.com/install.sh | shollama run gemma3:1bSTEP 2
Use the Pi's Ollama in ChathoNU
Allow chathonu.com and restart Ollama:Then on the Pi, open chathonu.com/local, choose MY OLLAMA and connect to:
sudo mkdir -p /etc/systemd/system/ollama.service.d && printf '[Service]\nEnvironment="OLLAMA_ORIGINS=https://chathonu.com"\n' | sudo tee /etc/systemd/system/ollama.service.d/override.conf && sudo systemctl daemon-reload && sudo systemctl restart ollamahttp://localhost:11434GitHub and Vercel
STEP 1
Sign in to both
sudo apt install -y ghgh auth loginsudo npm install -g vercelvercel loginUse the Pi's Ollama from your phone
STEP 1
Install Tailscale on the Pi and your phone
curl -fsSL https://tailscale.com/install.sh | shsudo tailscale upSTEP 2
Give Ollama an https address
sudo tailscale serve --bg 11434The Pi has to stay on and connected for your phone to reach it.
Stuck on a step? Send a message and say which one.