خرید بک لینک

Caot get through my docker container and coect to my local ollama server.

Ollama server is up and ruing :

http://localhost:11434 returns "Ollama is ruing"

When adding n8n credentials for ollama, I get the following :

Couldn't coect with these settings ECONNREFUSED

Here's my n8n credentials config :

Base URL : http://host.docker.internal:11434

API Key : not needed for local install and ruing models (?!)

Allowed HTTP Request Domains : All

According to what I've found, looks like we need to provide manually the host.docker.internal:host-gateway flags for linux hosts. This can be done either in compose.yaml or by command line :

# compose.yaml
n8n
    extra-hosts :
        - host.docker.internal:host-gateway
# command line
docker run --add-host="host.docker.internal:host-gateway" <image-name>

This should resolve DNS requests from internal docker container to the local host.

Detail Config :

Docker version 29.10.0

Docker Compose version 5.8.0

n8n version 2.48.7

برچسب: نویسنده: استخدام کار تاريخ: شنبه 30 آبان 1405 ساعت: 17:40

صفحه بندی