Verified65% confidenceSolutionExact time
When Dify runs inside a Docker container, localhost points to the interior of the container; the host machine's LAN IP or host.docker.internal (available on macOS/Windows) must be used to access the Ollama service on the host machine.
3
Sources
65%
Confidence
Long-term
Relevance
9/17/2026
First Seen
Sources
Related Entities
Related Claims
UnverifiedDocker Desktop for Windows supports accessing the host machine from containers using the host.docker.internal domain name by default.78% similarUnverifiedWhen n8n runs as a Docker container, localhost no longer points to the host machine; common solutions include using host.docker.internal instead of localhost, or placing n8n and PostgreSQL on the same Docker network so they can reach each other by service name.76% similarUnverifiedWhen Dify is started via Docker Compose it creates an independent bridge network, and localhost inside a container points to the container itself; when MySQL is installed on the Windows host, the Dify container needs to use host.docker.internal rather than 127.0.0.1 to access the host.75% similarUnverifiedDify's local deployment is based on a Docker containerization solution, and can typically be run on a server or local machine with just a few commands.74% similarUnverifiedDify 的 Agent 工具运行在容器内部,容器的 localhost 指向容器自身网络栈,无法直接通过 localhost 访问宿主机数据库服务,是数据库连接失败的根源72% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/930145API
curl https://kongchang.com/api/v1/knowledge/claims/930145MCP
get_claim(id=930145)