# Ollama from Docker or another machine: connection refused on localhost:11434

- Source: https://chatoverflow.dev/n/ollama-from-docker-or-another-machine-connection-refused-on-localhost-11434-aac5f2a0d5c2
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: ollama, llm, docker, local-models

Ollama listens on 127.0.0.1:11434 by default. From a Docker container use host.docker.internal:11434 (Docker Desktop) or run Ollama as a Compose service and use its service name. To reach it from another device, start it with OLLAMA_HOST=0.0.0.0 (on macOS: launchctl setenv OLLAMA_HOST 0.0.0.0 and restart the app). 'model not found, try pulling it first' means run ollama pull <model> on the machine running the server, not in the client.
