Ollama (self-hosted)
Connecting Aimogen Pro to a local or remote Ollama server for private, no-per-token-cost inference, including networking, model lists and embeddings.
Ollama runs open models on hardware you control. There are no per-token charges and no prompt data leaves your infrastructure, which makes it the option to reach for when privacy is the constraint.
Prerequisites#
- Install Ollama on a machine your WordPress server can reach over HTTP.
- Pull at least one model:
ollama pull llama3.3
ollama pull nomic-embed-text # if you want local embeddings- Make the API reachable from WordPress. By default Ollama binds to
127.0.0.1:11434, which is only reachable from the same machine.
Configure#
Aimogen Pro › Settings › API Keys › Ollama URL
Enter the base URL, for example:
http://127.0.0.1:11434
http://10.0.0.5:11434
https://ollama.example.comThere is no API key. The plugin considers Ollama configured when this URL is non-empty.
After saving, the plugin queries the server and caches the installed models in the
aiomatic_ollama_models option, and embedding models in aiomatic_ollama_embedding_models. Only models
actually pulled on the server appear in the selectors.
This tutorial was recorded before Aiomatic was renamed to Aimogen Pro. Some labels or interface elements may differ slightly from the current version.
Networking#
Same server as WordPress. http://127.0.0.1:11434 works if PHP can open local sockets. Some managed
hosts block this.
Different server. Ollama must listen on a reachable interface:
OLLAMA_HOST=0.0.0.0:11434 ollama serveA minimal nginx front end with basic auth and TLS is the usual answer.
Models#
The list is whatever you have pulled. The plugin also maintains two static capability lists that matter:
- Vision models (
AIMOGEN_MODELS_OLLAMA_VISION) —llama3.2-vision,llava,llava-llama3,bakllava,moondreamand similar. Only these accept image input. - Function-calling models — a large list including
llama3.3,llama3.2,llama3.1,qwen2.5,mistral,mixtral,command-r,phi4,deepseek-r1and many community fine-tunes. Only these work with Chatbot Extensions and agents.
If a model you pulled is not in the plugin capability list, it still works for plain text generation; it simply will not be offered where tools or vision are required.
Embeddings#
Ollama can serve as the embeddings provider, which keeps your indexed content entirely on your own hardware. The plugin recognises a long list of embedding models; the common choices are:
ollama pull nomic-embed-text
ollama pull mxbai-embed-large
ollama pull bge-m3Configure under Settings › Embeddings.
Token limits#
Ollama responses are capped at AIMOGEN_MAX_OLLAMA_TOKEN_COUNT, 4000 tokens in 2.8.8. For longer
articles, generate in sections.
The Ollama Responses API#
Settings › Advanced AI Settings › Enable Usage Of Ollama's Responses API
Off by default. Version 2.8.2 fixed a streaming issue that occurred when Ollama streaming was combined with tool calls; if you see odd streaming behaviour with tools, make sure you are on 2.8.8 or newer and leave this toggle off.
Performance expectations#
Ollama speed is a function of your hardware.
| Hardware | Realistic expectation |
|---|---|
| Modern GPU with 24GB+ VRAM | Comparable to hosted providers for 7B–70B models |
| Apple Silicon with unified memory | Good for 7B–13B, workable for 70B on high-memory machines |
| CPU only | Very slow. Minutes per article. Not viable for bulk work |
Long generations on modest hardware will exceed PHP max_execution_time. Raise it, use smaller models,
or generate in sections. See
Recommended server configuration.
Common problems#
No Ollama models in the dropdown WordPress cannot reach the URL. Test from the WordPress server itself:
curl http://127.0.0.1:11434/api/tagsConnection refused from another machine
Ollama is bound to localhost. Set OLLAMA_HOST=0.0.0.0:11434.
Timeouts Model too large for the hardware, or PHP limits too low. Try a smaller model first.
Tools never fire
The model is not in the function-calling capability list. Use llama3.3, qwen2.5 or another listed
model.
Related#
- Hugging Face — the same models, hosted
- Custom OpenAI-compatible APIs — for other self-hosted runtimes
- Security and privacy
Still stuck? Open a support ticket and include the diagnostics from Aimogen Pro › System & Logs › System Info.