connecting docker n8n and comfyui API
This is a classic Docker-on-Windows / localhost networking situation. You have: n8n running inside Docker → exposed on host port 5679 ComfyUI running on the host → http://127.0.0.1:8000 You want n8n (inside container) to call ComfyUI using something like http://localhost:8000 That will NOT work by default , because inside Docker: localhost = the container itself , not your Windows host ✅ The Correct & Easiest Solution (Recommended) Use host.docker.internal Docker provides a special DNS name that always points to the host machine . 👉 Inside n8n (Docker), use: http: //host.docker.internal:8000 This works on: Docker Desktop (Windows ✅) Docker Desktop (Mac ✅) No subnet changes needed. API URL http://host.docker.internal:8000 worked