> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmollama/common-issues.md).

# Common issues with Ollama Model in Duaer

Common Ollama Model issues in Duaer: reaching a remote or Docker Ollama, the IPv6 error, proxies, and expression values.
## Expressions resolve to the first item <a href="#processing-parameters" id="processing-parameters"></a>

Ollama Model is a sub-node. Most nodes resolve an expression once per input item; Duaer calls a sub-node with the first item only. Given five names, {{ $json.name }} is always the first name.

To use a different value per item, put the expression in the root node (such as the AI Agent prompt), or run Loop Over Items first so each run gets one item.

## Cannot connect to a remote Ollama instance <a href="#cant-connect-to-a-remote-ollama-instance" id="cant-connect-to-a-remote-ollama-instance"></a>

Ollama Model connects to the Base URL in the Ollama credential (default http://localhost:11434). For a remote Ollama behind an authenticating proxy, such as Open WebUI, set Base URL to the remote address and API Key to the proxy key. Duaer sends it as a Bearer token.

## Cannot connect to a local Ollama instance from Docker <a href="#cant-connect-to-a-local-ollama-instance-when-using-docker" id="cant-connect-to-a-local-ollama-instance-when-using-docker"></a>

Each Docker container has its own localhost. If Duaer or Ollama runs in a container, they cannot reach each other on localhost. Set Base URL in the Ollama credential by setup:

- Only Ollama in Docker: publish the port with -p 11434:11434 and use http://localhost:11434.
- Only Duaer in Docker: have the host Ollama listen on 0.0.0.0 and use http://host.docker.internal:11434. On Linux, start the Duaer container with --add-host host.docker.internal:host-gateway; Docker Desktop does this for you.
- Separate containers: put both on one Docker network and use the Ollama container name, such as http://my-ollama:11434.
- Same container: use http://localhost:11434.

## Error: connect ECONNREFUSED ::1:11434 <a href="#error-connect-econnrefused-111434" id="error-connect-econnrefused-111434"></a>

localhost resolved to IPv6 while Ollama listens on IPv4 only. Set Base URL to http://127.0.0.1:11434.

## Ollama and HTTP/HTTPS proxies <a href="#ollama-and-httphttps-proxies" id="ollama-and-httphttps-proxies"></a>

Ollama Model does not support a custom HTTP proxy, so HTTP_PROXY or HTTPS_PROXY may have no effect. If you need a proxy, refer to [Ollama’s proxy guide](https://docs.ollama.com/faq#how-do-i-use-ollama-behind-a-proxy), or let Duaer reach Ollama directly.
## Questions

### How does Duaer in Docker reach Ollama on the host?

Set Base URL in the Duaer Ollama credential to http://host.docker.internal:11434 and have the host Ollama listen on 0.0.0.0.

