[GH-ISSUE #11295] Feature Request: Configurable OLLAMA_ORIGINS for Network Exposure #69508

Open
opened 2026-05-04 18:17:03 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @phygineer on GitHub (Jul 4, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11295

Now that Ollama supports network exposure, it would be extremely helpful to have an option to configure the OLLAMA_ORIGINS environment variable directly within the configuration or startup process.

For example, in cases like my statically hosted chatbot here, I still need to manually run Ollama with the following command to bypass CORS restrictions:

OLLAMA_ORIGINS=https://app.phygineer.com ollama serve

Having a built-in option to persist and manage OLLAMA_ORIGINS would streamline deployment and eliminate the need for manual intervention.

Something like below:

Image

Originally created by @phygineer on GitHub (Jul 4, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11295 Now that Ollama supports network exposure, it would be extremely helpful to have an option to configure the OLLAMA_ORIGINS environment variable directly within the configuration or startup process. For example, in cases like my statically hosted chatbot [here](https://app.phygineer.com/public/#/llm-chat), I still need to manually run Ollama with the following command to bypass CORS restrictions: `OLLAMA_ORIGINS=https://app.phygineer.com ollama serve` Having a built-in option to persist and manage OLLAMA_ORIGINS would streamline deployment and eliminate the need for manual intervention. Something like below: ![Image](https://github.com/user-attachments/assets/829a4bca-fd35-4d35-95b5-7f2102400f01)
GiteaMirror added the feature request label 2026-05-04 18:17:03 -05:00
Author
Owner

@phygineer commented on GitHub (Jul 4, 2025):

Tried using with exposed ollama to network but there I get net::ERR_SSL_PROTOCOL_ERROR

Image

<!-- gh-comment-id:3034750379 --> @phygineer commented on GitHub (Jul 4, 2025): Tried using with exposed ollama to network but there I get `net::ERR_SSL_PROTOCOL_ERROR` ![Image](https://github.com/user-attachments/assets/0836cb46-7a9b-48b2-a5d5-0ba83e615134)
Author
Owner

@rick-github commented on GitHub (Jul 4, 2025):

http, not https. http://192.168.1.6:11434/api/tags

<!-- gh-comment-id:3034812667 --> @rick-github commented on GitHub (Jul 4, 2025): http, not https. http://192.168.1.6:11434/api/tags
Author
Owner

@phygineer commented on GitHub (Jul 4, 2025):

Since my app is hosted on https://app.phygineer.com, the browser:

  • Enforces secure-only requests (no http:// to 192.168.x.x)
  • Converts all API requests to https://192.168.1.6:11434/...
  • Which fails with ERR_SSL_PROTOCOL_ERROR because Ollama is not running HTTPS

it's browser behaviour for security reasons

<!-- gh-comment-id:3034834552 --> @phygineer commented on GitHub (Jul 4, 2025): Since my app is hosted on https://app.phygineer.com, the browser: - Enforces secure-only requests (no http:// to 192.168.x.x) - Converts all API requests to https://192.168.1.6:11434/... - Which fails with ERR_SSL_PROTOCOL_ERROR because Ollama is not running HTTPS it's browser behaviour for security reasons
Author
Owner

@rick-github commented on GitHub (Jul 4, 2025):

Then you need to run a service (nginx, caddy, etc) in front of ollama that provides https.

<!-- gh-comment-id:3034845071 --> @rick-github commented on GitHub (Jul 4, 2025): Then you need to run a service (nginx, caddy, etc) in front of ollama that provides https.
Author
Owner

@phygineer commented on GitHub (Jul 4, 2025):

Actually, Ollama currently supports setting allowed origins via the OLLAMA_ORIGINS environment variable, like this:

OLLAMA_ORIGINS=https://app.phygineer.com ollama serve

When I start Ollama with this command, it works as expected. That’s why I’m requesting a feature to allow configuring OLLAMA_ORIGINS directly from the settings UI, so the Ollama service can automatically start with the specified origin.

<!-- gh-comment-id:3034853920 --> @phygineer commented on GitHub (Jul 4, 2025): Actually, Ollama currently supports setting allowed origins via the OLLAMA_ORIGINS environment variable, like this: `OLLAMA_ORIGINS=https://app.phygineer.com ollama serve` When I start Ollama with this command, it works as expected. That’s why I’m requesting a feature to allow configuring OLLAMA_ORIGINS directly from the settings UI, so the Ollama service can automatically start with the specified origin.
Author
Owner

@rick-github commented on GitHub (Jul 4, 2025):

I'm just commenting on the SSL failure.

<!-- gh-comment-id:3034858288 --> @rick-github commented on GitHub (Jul 4, 2025): I'm just commenting on the SSL failure.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#69508