[GH-ISSUE #12306] manual dotenv: adding a flag for ollama to read a specific dotenv file #54690

Open
opened 2026-04-29 06:57:30 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @xushidev on GitHub (Sep 16, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12306

Hey! I would like to ask if it is possible to add a flag for Ollama to pull a specific dotenv file?

Following the guidelines,
New features: new features (e.g. API fields, environment variables) add surface area to Ollama and make it harder to maintain in the long run as they cannot be removed without potentially breaking users in the future.
This shouldn't potentially make Ollama harder to maintain, since it isn't gonna read a specific path, as users still need to provide the flag manually (unless it is for bash files).

Explain why the change is important.
Adding a way to point towards a specific dotenv file I think would help in the development of Ollama and it's models, along with testing various models.

Explain how the change will be used.

  1. This change can be used to make Ollama point towards a specific model directory almost permanently (in case of an external drive which may change directory letter on windows for example).
  2. Allows for easy changes to the environmental variables, before they are copied as global environment variables.

The proposal in short is:
Adding something alike ollama serve --config "/path/to/config.env"

Originally created by @xushidev on GitHub (Sep 16, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12306 Hey! I would like to ask if it is possible to add a flag for Ollama to pull a specific dotenv file? Following the guidelines, **New features: new features (e.g. API fields, environment variables) add surface area to Ollama and make it harder to maintain in the long run as they cannot be removed without potentially breaking users in the future.** This shouldn't potentially make Ollama harder to maintain, since it isn't gonna read a specific path, as users still need to provide the flag manually (unless it is for bash files). **Explain why the change is important.** Adding a way to point towards a specific dotenv file I think would help in the development of Ollama and it's models, along with testing various models. **Explain how the change will be used.** 1. This change can be used to make Ollama point towards a specific model directory almost permanently (in case of an external drive which may change directory letter on windows for example). 2. Allows for easy changes to the environmental variables, before they are copied as global environment variables. The proposal in short is: Adding something alike `ollama serve --config "/path/to/config.env"`
GiteaMirror added the feature request label 2026-04-29 06:57:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#54690