Make Ollama to Listen Any
Contents
Make ollama to listen on 0.0.0.0 instead of 127.0.0.1(default)
So that other hosts can talk to ollama
I installed ollama on lxc container, so I need to make my host machine or other container can use ollama running on the other container.
On Linux
Edit ollama service
sudo systemctl edit ollama.service
- Add following
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
Reload
sudo systemctl daemon-reload
sudo systemctl restart ollama
On mac OS
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"