ollama
Ollama Plugin
Section titled “Ollama Plugin”One-click offline LLM stack. Free: MIT licensed. Reclassified from paid to free in P99.
Install
Section titled “Install”nself plugin install ollamaWhat It Does
Section titled “What It Does”Stands up an Ollama Docker container alongside your nSelf stack. On first start, auto-pulls gemma-3-4b (a compact, capable open-weight model). Registers itself as an LLM provider in the plugin-ai gateway so other plugins and apps can route inference requests to local Ollama without an API key or external call.
GPU passthrough is opt-in. Set NSELF_OLLAMA_GPU=true in your .env and rebuild.
This plugin is compose-only (no Go binary). It adds a service block to the generated docker-compose.yml.
Configuration
Section titled “Configuration”| Env Var | Default | Description |
|---|---|---|
OLLAMA_PORT | 11434 | Ollama service port (localhost only, not proxied externally) |
OLLAMA_MODEL | gemma-3-4b | Model to pull on first start |
NSELF_OLLAMA_GPU | false | Enable GPU passthrough (requires compatible Docker runtime) |
OLLAMA_KEEP_ALIVE | 5m | Model keep-alive duration |
| Port | Purpose |
|---|---|
| 11434 | Ollama HTTP API (localhost only — not exposed externally) |
Nginx Routes
Section titled “Nginx Routes”None. Ollama runs on localhost only. External access goes through the ai plugin gateway.
Models
Section titled “Models”Default model pulled on first start: gemma-3-4b. Pull additional models at any time:
docker exec nself-ollama ollama pull llama3docker exec nself-ollama ollama pull mistralSource
Section titled “Source”- SPORT:
.claude/docs/sport/F03-PLUGIN-INVENTORY-FREE.md - See also: Local LLM Guide · AI Cost Optimization