Ollama on PC and Home Assistant in VM on Qnap NAS issues

I’m having an issue integrating Ollama running on my PC (with an RTX a4000) with Home Assistant running on my Qnap NAS using a VM.

Ollama is installed on my PC and I can access HA on my PC as well. There is a virtual switch on my NAS allowing for the Home Assistant Virtualization Station to be accessed by my PC.

When I try the Ollama integration in HA, I type in my PC’s IP address 192.168.XX.XX:11434 and get the following message: “Invalid hostname or IP address”

Things I’ve tried:

  • made sure Windows Firewall and NAS firewall aren’t blocking port 11434
  • added OLLAMA_HOST=0.0.0.0 to my Windows system variables
  • enabled “expose Ollama to the network” in Ollama settings

Unfortunately, nothing worked so far.

Any ideas, community?

Thank you in advance.

type this in powershell

netsh interface portproxy add v4tov4 listenaddress=192.168.1.17 listenport=11434 connectaddress=127.0.0.1 connectport=11434

change “192.168.1.17” by your pc(with ollama) ip

1 Like

Thank you so much for the reply. I typed what you suggested, but unfortunately it didn’t work.

and with this

netsh interface portproxy add v4tov4 listenaddress=192.168.1.17 listenport=11434 connectaddress=localhost connectport=11434

Thanks again. It turned out to be a windows firewall, I had to allow port 11434.