[GH-ISSUE #9623] Update on Linux should keep existing settings for ollama service #6279

Closed
opened 2026-04-12 17:42:07 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @stweil on GitHub (Mar 10, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9623

After an update on Linux with curl https://ollama.ai/install.sh | sh any environment settings which were made in /etc/systemd/system/ollama.service are lost. This breaks for example an installation which requires an API which not only listens on localhost (Environment="OLLAMA_HOST=0.0.0.0:11434").

Maybe I missed it, but I did not find a way to provide the settings in a persistent way.

Ideally the ollama service on Linux would read an optional file /etc/default/ollama with local ollama settings like it is done for other services. The installation then could provide a default file during the first installation and keep this file untouched in update installations.

Originally created by @stweil on GitHub (Mar 10, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9623 After an update on Linux with `curl https://ollama.ai/install.sh | sh` any environment settings which were made in /etc/systemd/system/ollama.service are lost. This breaks for example an installation which requires an API which not only listens on localhost (Environment="OLLAMA_HOST=0.0.0.0:11434"). Maybe I missed it, but I did not find a way to provide the settings in a persistent way. Ideally the ollama service on Linux would read an optional file /etc/default/ollama with local ollama settings like it is done for other services. The installation then could provide a default file during the first installation and keep this file untouched in update installations.
GiteaMirror added the feature request label 2026-04-12 17:42:07 -05:00
Author
Owner

@zkzkzk2015 commented on GitHub (Mar 10, 2025):

I second that one, after update my working installation gone havoc again.

<!-- gh-comment-id:2710496148 --> @zkzkzk2015 commented on GitHub (Mar 10, 2025): I second that one, after update my working installation gone havoc again.
Author
Owner

@rick-github commented on GitHub (Mar 10, 2025):

If you follow the provided instructions, an overrides file is created which is not modified during an upgrade.

<!-- gh-comment-id:2710536334 --> @rick-github commented on GitHub (Mar 10, 2025): If you follow the [provided instructions](https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-linux), an overrides file is created which is not modified during an upgrade.
Author
Owner

@stweil commented on GitHub (Mar 10, 2025):

Right, I can confirm that the instructions in https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-linux work fine. Therefore I close this issue again.

Thank you!

<!-- gh-comment-id:2710544667 --> @stweil commented on GitHub (Mar 10, 2025): Right, I can confirm that the instructions in https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-linux work fine. Therefore I close this issue again. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#6279