Ollama local LLM
Your API server analyses the frames a client streams to it with a local vision LLM via Ollama. You provide the hardware. In a processing mode that uses the server, the web app's monitor also sends it frames, in a message the server refuses because it names no stream, so the models read none of the web app's frames. With no cloud AI key on the server, frames stay on your LAN. If you set OPENROUTER_API_KEY, OPENAI_API_KEY or ANTHROPIC_API_KEY, then when Ollama is down or its analysis fails, the server sends the frame to the first of these it has a key for and, if that one fails, to the next.
Install Ollama
macOS, Linux, or Windows — installers at ollama.com/download.
# macOS / Linux brew install ollama # or use the installer ollama serve # starts on http://localhost:11434
Pull a vision model
| Model | Download | What the server asks it |
|---|---|---|
| moondream | 1.7 GB | A first look at each frame |
| llava:7b | 4.7 GB | A closer look when the first one finds a concern |
ollama pull moondream ollama pull llava:7b
Wire to SafeOS
Add the Ollama host URL to your API server's .env:
OLLAMA_HOST=http://localhost:11434
If Ollama runs on a different machine on your LAN, use that machine's IP. Open port 11434 in its firewall.
Verify it works
From the package root, run the bundled health check:
pnpm ollama:check # GETs http://localhost:11434/api/tags
Then pick a model under Settings → AI Models. If it's detected, the dropdown will list the model name.