[GH-ISSUE #9083] OLLAMA_HOST Ignored After Upgrading to v0.5.9 on macOS #5910

Closed
opened 2026-04-12 17:14:49 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @cloverzrg on GitHub (Feb 14, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9083

What is the issue?

After upgrading Ollama from v0.5.7 to v0.5.9 on macOS, I noticed that the system no longer respects the OLLAMA_HOST environment variable when startup app. Instead of using the specified address in OLLAMA_HOST, the system defaults to 127.0.0.1. However, when manually executing ollama serve, the correct OLLAMA_HOST value is used.

Environment:

  • Shell: zsh
  • Configuration: export OLLAMA_HOST=x.x.x.x set in .zshrc

Relevant log output

2025/02/14 10:07:27 routes.go:1186: INFO server config env="map[HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/Users/xxx/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://*] OLLAMA_SCHED_SPREAD:false http_proxy: https_proxy: no_proxy:]"
time=2025-02-14T10:07:27.634+08:00 level=INFO source=images.go:432 msg="total blobs: 5"
time=2025-02-14T10:07:27.634+08:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0"
time=2025-02-14T10:07:27.635+08:00 level=INFO source=routes.go:1237 msg="Listening on 127.0.0.1:11434 (version 0.5.9)"
time=2025-02-14T10:07:27.693+08:00 level=INFO source=types.go:130 msg="inference compute" id=0 library=metal variant="" compute="" driver=0.0 name="" total="10.7 GiB" available="10.7 GiB"

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

v0.5.9

Originally created by @cloverzrg on GitHub (Feb 14, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9083 ### What is the issue? After upgrading Ollama from v0.5.7 to v0.5.9 on macOS, I noticed that the system no longer respects the OLLAMA_HOST environment variable when startup app. Instead of using the specified address in OLLAMA_HOST, the system defaults to 127.0.0.1. However, when manually executing `ollama serve`, the correct OLLAMA_HOST value is used. ## Environment: * Shell: zsh * Configuration: export OLLAMA_HOST=x.x.x.x set in .zshrc ### Relevant log output ```shell 2025/02/14 10:07:27 routes.go:1186: INFO server config env="map[HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/Users/xxx/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://*] OLLAMA_SCHED_SPREAD:false http_proxy: https_proxy: no_proxy:]" time=2025-02-14T10:07:27.634+08:00 level=INFO source=images.go:432 msg="total blobs: 5" time=2025-02-14T10:07:27.634+08:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0" time=2025-02-14T10:07:27.635+08:00 level=INFO source=routes.go:1237 msg="Listening on 127.0.0.1:11434 (version 0.5.9)" time=2025-02-14T10:07:27.693+08:00 level=INFO source=types.go:130 msg="inference compute" id=0 library=metal variant="" compute="" driver=0.0 name="" total="10.7 GiB" available="10.7 GiB" ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version v0.5.9
GiteaMirror added the bug label 2026-04-12 17:14:49 -05:00
Author
Owner

@rick-github commented on GitHub (Feb 14, 2025):

Did you try

launchctl setenv OLLAMA_HOST "x.x.x.x"
<!-- gh-comment-id:2658133965 --> @rick-github commented on GitHub (Feb 14, 2025): Did you try ``` launchctl setenv OLLAMA_HOST "x.x.x.x" ```
Author
Owner

@cloverzrg commented on GitHub (Feb 14, 2025):

Did you try

launchctl setenv OLLAMA_HOST "x.x.x.x"

After exec launchctl setenv OLLAMA_HOST "x.x.x.x", it works, but the env set in .zshrc is work in v0.5.7, if this is not a issue, please close it

<!-- gh-comment-id:2658147691 --> @cloverzrg commented on GitHub (Feb 14, 2025): > Did you try > > ``` > launchctl setenv OLLAMA_HOST "x.x.x.x" > ``` After exec `launchctl setenv OLLAMA_HOST "x.x.x.x"`, it works, but the env set in .zshrc is work in v0.5.7, if this is not a issue, please close it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5910