Tailscale + Ollama integration into ComfyUI

Hi All First time poster, long time watcher of the channel. Hope this is the correct part of the forum to post this in, it seems very much like a me problem and not specific to just one thing.

I have been scouring the internet trying to find a solution to a problem which as far as I can see is not happening to anyone else.

I am running stability matrix to manage models etc and have swarmui running inside it to swap beetwen it and comfyui.

I have a few workflows working which I am happy with but I am trying to incorporate ollama into things, I have a few workflows with no missing nodes but I cannot get the ollama nodes to see my ollama instance.

All my machines are networked with tailscale, my ollama instance is running on my server which is a few miles away from me, I can curl the ip address with sucesion on my windows machine, I can head to the tailscale IP for my server with ollamas port in a web browser and it shows ollama is running but for the absolute life of me I cannot get any nodes in comfy ui to recognise my self hosted ollama instance, I enter the http address plus the port but I cannot select a model it just stays as undefined and it does not work.

OLLAMA HOST has been set to 0.0.0.0 on my server, I have also added the port to the end of this with no succesion.

I have tried both the servers correct IP and the tailscale IP with no succesion.

Really lost as to how I can get this setup, is it even possible just now or is it local only?

Ollama is running on unraid if that makes any difference.

Curl works, the web url works, just the nodes are not accepting this info in comfyui for some reason.

Tried googling but there does not seem to be much info apart from ensuring the OLLAMA HOST is set correctly which I have already done.

I am not familiar with ComfyUI or ollama, but I’m happy to help with the Tailscale and networking side.

How is the ComfyUI installed and running? Does it have access to the ollama instance via Tailscale? I would try simpler testing to ensure connectivity is working to the ollama server first, ie can you ping the ollama instance’s Tailscale IP from the ComfyUI server?

Thanks for the reply.

Comfyui is installed through stability matrix (its a manager for AI image/Video) generation on my windows machine at home, I can ping the ollama instance on my windows machine to my server in another location without issue as well as access the URL for it to, everything else on my unraid machine is easilly accessible as well from anywhere for me usually (god Tailscale is awesome I would not have half of what I have setup without it)

What you have said though about making things a bit simpler has got me thinking, I may try and install comfyui on its own without it running through the stability matrix manager and see if without that process in the middle if I can then communicate back to my unraid server running Ollama.

Thanks for giving my brain a kick into gear :smiley:

I will report back.

Small update - installing a local instance of comfyui on its own without stability matrix my connection to Ollama using the custom node works without issue usin my tailscale IP for the machine.

Massive thanks for telling me to simplify things, now just to try and find out whats different beetwen a single install and stability matrix, perhaps I will try swarmui and see what happens there.

Smaller update - SwarmUI seems to be the issue.

1 Like