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 -m
It should say aarch64. 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 -y
sudo apt install -y curl git
STEP 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 nodejs
STEP 4
Claude Code
sudo npm install -g @anthropic-ai/claude-code
claude
STEP 5
Codex, Gemini CLI and OpenCode
sudo npm install -g @openai/codex @google/gemini-cli opencode-ai
Start each with codex, 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 | sh
ollama run gemma3:1b
A Pi has no graphics card for AI, so stick to small models (1b to 4b). A Pi 5 with 8 GB handles 4b.
STEP 2
Use the Pi's Ollama in ChathoNU
Allow chathonu.com and restart Ollama:
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 ollama
Then on the Pi, open chathonu.com/local, choose MY OLLAMA and connect to:
http://localhost:11434

GitHub and Vercel

STEP 1
Sign in to both
sudo apt install -y gh
gh auth login
sudo npm install -g vercel
vercel login

Use the Pi's Ollama from your phone

STEP 1
Install Tailscale on the Pi and your phone
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
Open the link it prints and sign in. Use the same account in the Tailscale app on your phone.
STEP 2
Give Ollama an https address
sudo tailscale serve --bg 11434
Use the https address it prints in MY OLLAMA on chathonu.com/local.

The Pi has to stay on and connected for your phone to reach it.

Stuck on a step? Send a message and say which one.