[GH-ISSUE #9512] Explain all the environment variables in documents. #52712

Open
opened 2026-04-29 00:36:49 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @henryclw on GitHub (Mar 5, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9512

Like the latest feature OLLAMA_CONTEXT_LENGTH, I love it, this enabled us setting the default context length.
But this environment variable is poorly documented. It's only mentioned in the https://github.com/ollama/ollama/releases/tag/v0.5.13, you couldn't find any thing mentioning it in https://github.com/ollama/ollama/blob/main/docs/modelfile.md https://github.com/ollama/ollama/blob/main/docs/api.md https://github.com/ollama/ollama/blob/main/docs/faq.md

I highly suggest adding a specialize section, explaining thoroughly what kinds of parameter you could set in the request, the modelfile, and as environment variables. Right now these settings are not well documented.

Originally created by @henryclw on GitHub (Mar 5, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9512 Like the latest feature `OLLAMA_CONTEXT_LENGTH`, I love it, this enabled us setting the default context length. But this environment variable is poorly documented. It's only mentioned in the <https://github.com/ollama/ollama/releases/tag/v0.5.13>, you couldn't find any thing mentioning it in https://github.com/ollama/ollama/blob/main/docs/modelfile.md https://github.com/ollama/ollama/blob/main/docs/api.md https://github.com/ollama/ollama/blob/main/docs/faq.md I highly suggest adding a specialize section, explaining thoroughly what kinds of parameter you could set in the request, the modelfile, and as environment variables. Right now these settings are not well documented.
GiteaMirror added the documentation label 2026-04-29 00:36:49 -05:00
Author
Owner

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

https://github.com/ollama/ollama/issues/4361#issuecomment-2130420343

<!-- gh-comment-id:2700385050 --> @rick-github commented on GitHub (Mar 5, 2025): https://github.com/ollama/ollama/issues/4361#issuecomment-2130420343
Author
Owner

@henryclw commented on GitHub (Mar 5, 2025):

@rick-github Thank you for the kind reply. A command line showing all the environment variables is indeed very helpful. Is there any roadmap for putting the documents? I'm in for having a document of environment variables. Of course, even without the documents things could just work fine as well.

<!-- gh-comment-id:2701767731 --> @henryclw commented on GitHub (Mar 5, 2025): @rick-github Thank you for the kind reply. A command line showing all the environment variables is indeed very helpful. Is there any roadmap for putting the documents? I'm in for having a document of environment variables. Of course, even without the documents things could just work fine as well.
Author
Owner

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

@rick-github Thank you for the quick fix #9545 Now OLLAMA_CONTEXT_LENGTH is in the FAQ

<!-- gh-comment-id:2711763297 --> @henryclw commented on GitHub (Mar 10, 2025): @rick-github Thank you for the quick fix #9545 Now `OLLAMA_CONTEXT_LENGTH` is in the FAQ
Author
Owner

@msanatan commented on GitHub (Aug 5, 2025):

Centralising this knowledge will help users a lot

<!-- gh-comment-id:3156609123 --> @msanatan commented on GitHub (Aug 5, 2025): Centralising this knowledge will help users a lot
Author
Owner

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

These are currently potentially helpful links to a few relevant sources:

Not centralized per se, but available nonetheless. Also, ollama serve -h per this comment (#4361)

<!-- gh-comment-id:3177126569 --> @trentapple commented on GitHub (Aug 11, 2025): These are currently potentially helpful links to a few relevant sources: * [ollama go pkg variables](https://pkg.go.dev/github.com/ollama/ollama/envconfig#pkg-variables) * [ollama source envconfig/config.go:252](https://github.com/ollama/ollama/blob/v0.11.4/envconfig/config.go#L252) Not centralized per se, but available nonetheless. Also, `ollama serve -h` per [this comment](https://github.com/ollama/ollama/issues/4361#issuecomment-2130420343) (#4361)
Author
Owner

@jeana-hines commented on GitHub (Feb 14, 2026):

I would be happy to pull all the environment variable information into a single md file.

<!-- gh-comment-id:3902533278 --> @jeana-hines commented on GitHub (Feb 14, 2026): I would be happy to pull all the environment variable information into a single md file.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#52712