[PR #262] [MERGED] cmd: support OLLAMA_CLIENT_HOST environment variable #10069

Closed
opened 2026-04-12 22:51:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/262
Author: @bmizerany
Created: 8/2/2023
Status: Merged
Merged: 8/16/2023
Merged by: @jmorganca

Base: mainHead: hostconfig


📝 Commits (3)

  • 68f8179 cmd: support OLLAMA_CLIENT_HOST environment variable
  • 2959a54 Update api/client.go
  • 90b6471 Update api/client.go

📊 Changes

2 files changed (+64 additions, -13 deletions)

View changed files

📝 api/client.go (+32 -5)
📝 cmd/cmd.go (+32 -8)

📄 Description

This commit adds support for the OLLAMA_CLIENT_HOST environment variable. This variable can be used to specify the host to which the client should connect. This is useful when the client is running somewhere other than the host where the server is running.

The new api.FromEnv function is used to configure clients from the environment. Clients wishing to use the environment variable being consistent with the Ollama CLI can use this new function.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/262 **Author:** [@bmizerany](https://github.com/bmizerany) **Created:** 8/2/2023 **Status:** ✅ Merged **Merged:** 8/16/2023 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `hostconfig` --- ### 📝 Commits (3) - [`68f8179`](https://github.com/ollama/ollama/commit/68f8179d75899e385d3d8783213eda1a6cea1049) cmd: support OLLAMA_CLIENT_HOST environment variable - [`2959a54`](https://github.com/ollama/ollama/commit/2959a547b5296afade7a5f92d521a8be751dee02) Update api/client.go - [`90b6471`](https://github.com/ollama/ollama/commit/90b6471cc14681246abde41124b2abf9551b554c) Update api/client.go ### 📊 Changes **2 files changed** (+64 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+32 -5) 📝 `cmd/cmd.go` (+32 -8) </details> ### 📄 Description This commit adds support for the OLLAMA_CLIENT_HOST environment variable. This variable can be used to specify the host to which the client should connect. This is useful when the client is running somewhere other than the host where the server is running. The new api.FromEnv function is used to configure clients from the environment. Clients wishing to use the environment variable being consistent with the Ollama CLI can use this new function. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 22:51:00 -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#10069