Skip to content

Instantly share code, notes, and snippets.

@jmarhee
Created October 16, 2025 19:04
Show Gist options
  • Save jmarhee/340a76cc525a132040ac87690a6b584a to your computer and use it in GitHub Desktop.
Save jmarhee/340a76cc525a132040ac87690a6b584a to your computer and use it in GitHub Desktop.
Enables the Ollama server to run on all interfaces on macOS via homebrew, or via launchctl.

brew

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 ollama

launchctl

For launchctl-managed ollama, run the following:

launchctl setenv OLLAMA_HOST 0.0.0.0:11434

and restart your service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment