> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/ai/llm/providers/ollama.md).

# Ollama

Connect Ollama as an LLM integration.

Ollama runs open models (Llama, Qwen, Gemma, …) on a machine you own. There is no API key.

{% hint style="warning" %}
You can connect and test Ollama in Cloud, but the AI chat cannot run on it yet: every chat question fails with *Error while running chat turn* (the server has no Ollama chat connector). For the chat, use an OpenAI-compatible provider — [OpenAI](/codemash/cloud/ai/llm/providers/openai.md), [Groq](/codemash/cloud/ai/llm/providers/groq.md), [Mistral](/codemash/cloud/ai/llm/providers/mistral.md), [OpenRouter](/codemash/cloud/ai/llm/providers/openrouter.md) or [Grok](/codemash/cloud/ai/llm/providers/grok.md). Through the SDK, CLI and API the integration is saved the same way: [Save Llm Integration](/codemash/api-reference/ai/integrations/save-llm-integration.md).
{% endhint %}

## Get your credentials

1. Install Ollama from [ollama.com/download](https://ollama.com/download) on a machine that Norbix can reach over the network.
2. Pull a model, for example `ollama pull llama3.1` (see the [model library](https://ollama.com/library)). A small model needs a few GB of memory; an 8 B model about 6 GB.
3. Make Ollama listen on the network: set `OLLAMA_HOST=0.0.0.0:11434` before `ollama serve` (by default it listens only on `127.0.0.1`). Put it behind a firewall or VPN — Ollama has no sign-in of its own.
4. Note the address, for example `http://ollama.example.internal:11434`.

More in the provider's own guide: [Ollama documentation](https://docs.ollama.com/).

## Connect it in Cloud

**Where:** Project → Integrations → LLM → **Add New Integration** → Ollama → **Connect** · `/projects/<project>/ai/llms/integrations/new/ollama`

| Field            | Required        | What it does                                                                                                                                      | Example                                |
| ---------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| Endpoint         | yes in practice | The address of your Ollama server. Empty = `http://localhost:11434`, which is the Norbix server itself — on the managed service that never works. | `http://ollama.example.internal:11434` |
| Default Model    | no              | The model used when a request names none. Empty = the provider's default.                                                                         | `llama3.1`                             |
| Integration Name | yes             | How the integration is listed in Norbix.                                                                                                          | `Local Llama`                          |

Ollama has no **API Key** field.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-1d0619649a1327b4e48bfa7f5bbbcc278d3e2e77%2Follama-form-1.png?alt=media" alt="New Ollama Integration form filled with placeholder values"><figcaption><p>The filled form.</p></figcaption></figure>

Press **Save**. The title becomes *Editing Ollama integration*, the badges say **ENABLED** and **NOT TESTED**, the id (`int_…`) appears with a copy button, the key field is empty again with the note that the key will not be displayed, and the test panel appears at the bottom.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-1b7bc64b4cbd8aa3954589e2e16cc449eb3063bf%2Follama-saved-2.png?alt=media" alt="The Ollama integration after save: badges ENABLED and NOT TESTED, the integration id, and the Test integration panel"><figcaption><p>After save.</p></figcaption></figure>

## Test and set as default

**Test integration** checks only that Norbix can read the stored key; it does not call Ollama, so a wrong key also passes — see [Test an LLM integration](/codemash/cloud/ai/llm/test.md). Ask the [AI chat](/codemash/cloud/ai/ai-chat.md) a question to check it for real.

The first LLM of an environment gets the **DEFAULT** badge. To make this one the model the AI uses, pick it as the project's **Default LLM** — see [Set the default LLM](/codemash/cloud/ai/llm/set-default.md). To turn it off: [Disable or delete](/codemash/cloud/ai/llm/disable.md).

## Common errors

| Message                                                 | Cause                                                                                                                       | Fix                                                                                                         |
| ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| *Domain URL format is invalid* (`CM-ERRORS-DOMAIN-002`) | **Endpoint** is not a full address.                                                                                         | Write it with `http://` or `https://`.                                                                      |
| *Error while running chat turn* on every chat question  | Norbix has no chat connector for Ollama yet: the server log says *Service of type 'IChatCompletionService' not registered*. | Use an OpenAI-compatible provider (OpenAI, Groq, Mistral, OpenRouter, Grok) for the chat until it is added. |
