N8n selhosted not communicating with ollama api

Describe the problem/error/question

Hey,

I am a first timer trying n8n and ollama using self-hosted ai starter kit. I am unsure if my n8n is able to call webhooks in general and specifically the ollama api end point too.

What is the error message (if any)?

Please share your workflow

Here is how I have setup.

Custom DNS with caddy as reverse proxy, pointing to docker compose ran ollama and n8n both hosted on same server.

in compose I have added the env too for n8n but not sure why this is happening



If not til ollama but still a simple telegram on message is also not working as expected.

Information on your n8n setup

  • n8n version: 1.72.1
  • Database (default: SQLite): Postgress
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker compose
  • Operating system: ubuntu

Can you confirm with a basic HTTP node to something like google.com, that DNS is working and you can correctly fetch something?

I solved a similar issue to this for our internal n8n before with network bridge mode. But am unsure if that would be necessary.

Hey,

Thanks for your reply…

Here are my observations.

The google.com fetches correctly with https://google.com

But when called the internally hosted ollama api end point it fails/ timeouts the request.

My only assumption is we have implemented a VPN (tailscale) to connect to our on premise server and only with whitelisted machines those api endpoints are accessible.

Even if I’am calling from a white listed machine not sure the end point know who is calling in a network level?

Any ideas or thoughts on how to proceed and possible help?

Thanks for your time.

Oh interesting.

Is the n8n instance and ollama instance hosted on the same server?

Or the requests could be coming from the n8n subdomain itself actually, and that may not be whitelisted.

Yes they are running on the same server,

According to tailscale documentation the whitelisting is done per device and not according to subdomain.

Are both machines behind the VPN?

Yes, both machines the machine i orchestrate around with n8n and the machine n8n is self hosted are on same vpn.

I wonder if its blocking certain port access? Are you able to see the logs in chrome/browser dev console when making the requests? Are there more details?

I am not confident with VPN setups for n8n tho.