[GH-ISSUE #11860] Please opt to retain the existing configuration in ollama.service #33634

Closed
opened 2026-04-22 16:30:37 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @aZaCqbc7Qort34ugQ3b9 on GitHub (Aug 11, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11860

Upon installation of any new release/update, the existing configuration in ollama.service gets cleared or removed to opt for the default configuration that ships with the new update. While understandable, much software that is released respects previous configurations.

Could there be an option to retain or prefer the existing ollama.service configuration?

To give a concrete example, I often add a few Environment line items under the service directive. They all get cleared upon a new install/update.

Many thanks for creating great and easy to use software.

Originally created by @aZaCqbc7Qort34ugQ3b9 on GitHub (Aug 11, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11860 Upon installation of any new release/update, the existing configuration in ollama.service gets cleared or removed to opt for the default configuration that ships with the new update. While understandable, much software that is released respects previous configurations. Could there be an option to retain or prefer the existing ollama.service configuration? To give a concrete example, I often add a few **Environment** line items under the **service** directive. They all get cleared upon a new install/update. Many thanks for creating great and easy to use software.
GiteaMirror added the feature request label 2026-04-22 16:30:37 -05:00
Author
Owner

@FranBarInstance commented on GitHub (Aug 11, 2025):

You can create a configuration file to override the ollama settings, so you don't have to worry about changes from an update:

sudo mkdir -p /etc/systemd/system/ollama.service.d
sudo nano /etc/systemd/system/ollama.service.d/override.conf

override.conf example:

[Service]
Environment="OLLAMA_HOST=0.0.0.0:11435"
Environment="OLLAMA_MODELS=/mnt/ssd/models"

You will need to restart or:

sudo systemctl daemon-reload
sudo systemctl restart ollama

In override.conf, only indicate the changes or values you want to override.

<!-- gh-comment-id:3175962393 --> @FranBarInstance commented on GitHub (Aug 11, 2025): You can create a configuration file to override the ollama settings, so you don't have to worry about changes from an update: ``` sudo mkdir -p /etc/systemd/system/ollama.service.d sudo nano /etc/systemd/system/ollama.service.d/override.conf ``` override.conf example: ``` [Service] Environment="OLLAMA_HOST=0.0.0.0:11435" Environment="OLLAMA_MODELS=/mnt/ssd/models" ``` You will need to restart or: ``` sudo systemctl daemon-reload sudo systemctl restart ollama ``` In override.conf, only indicate the changes or values you want to override.
Author
Owner

@rick-github commented on GitHub (Aug 11, 2025):

Use the method as shown in the documentation.

<!-- gh-comment-id:3176222749 --> @rick-github commented on GitHub (Aug 11, 2025): Use the method as shown in the [documentation](https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-linux).
Author
Owner

@aZaCqbc7Qort34ugQ3b9 commented on GitHub (Aug 12, 2025):

Thank you @FranBarInstance and @rick-github for the feedback.

<!-- gh-comment-id:3179448149 --> @aZaCqbc7Qort34ugQ3b9 commented on GitHub (Aug 12, 2025): Thank you @FranBarInstance and @rick-github for the feedback.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#33634