If installing ollama via brew, to expose Ollama on all interfaces (i.e. 0.0.0.0) for use with a remote application, modify the service file to include an OLLAMA_HOST key in the EnvironmentVariables in /opt/homebrew/Cellar/ollama/{version}/homebrew.mxcl.ollama.plist:
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>OLLAMA_FLASH_ATTENTION</key>
<string>1</string>
<key>OLLAMA_KV_CACHE_TYPE</key>
<string>q8_0</string>
** <key>OLLAMA_HOST</key>
<string>0.0.0.0:11434</string>**
</dict>
...and then restart the service:
brew services restart ollamaFor launchctl-managed ollama, run the following:
launchctl setenv OLLAMA_HOST 0.0.0.0:11434and restart your service.