Connect Ollama running local to n8n running local (no docker)

Describe the problem/error/question

I am trying to connect my locally running n8n instance (localhost:5678) to my locally running Ollama instance (localhost:11434)

What is the error message (if any)?

Error: connect ECONNREFUSED ::1:11434
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16) {
  errno: -61,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '::1',
  port: 11434
} undefined

Information on your n8n setup

  • **n8n version:[email protected]
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • **Operating system:MacOS 14.6.1

try replacing localhost with 127.0.0.1. It looks like your system has IPv6 enabled, but ollama isn’t configured to listen on ::1

1 Like

It worked <3 thank you!

2 Likes

hello im searching how to connect ollama to n8n no docker but im lost can you share the how to or link me to a guide
noob must grow up and need help
thank you in advance

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.