Skip to main content

ollama

ollama — ɳSelf documentation.

Ollama Plugin

One-click offline LLM stack. Free: MIT licensed. Reclassified from paid to free in P99.

Install

nself plugin install ollama

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

Env VarDefaultDescription
OLLAMA_PORT11434Ollama service port (localhost only, not proxied externally)
OLLAMA_MODELgemma-3-4bModel to pull on first start
NSELF_OLLAMA_GPUfalseEnable GPU passthrough (requires compatible Docker runtime)
OLLAMA_KEEP_ALIVE5mModel keep-alive duration

Ports

PortPurpose
11434Ollama HTTP API (localhost only — not exposed externally)

Nginx Routes

None. Ollama runs on localhost only. External access goes through the ai plugin gateway.

Models

Default model pulled on first start: gemma-3-4b. Pull additional models at any time:

docker exec nself-ollama ollama pull llama3
docker exec nself-ollama ollama pull mistral

Source