[GH-ISSUE #8946] Why is '0.0.0.0' added in config.go? I don't want anyone to be able to access it. #5803

Closed
opened 2026-04-12 17:08:46 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @sjh00 on GitHub (Feb 8, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8946

What is the issue?

Why is '0.0.0.0' added in config.go? I don't want anyone to be able to access it.

Relevant log output


OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.5.7

Originally created by @sjh00 on GitHub (Feb 8, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8946 ### What is the issue? Why is '0.0.0.0' added in config.go? I don't want anyone to be able to access it. ### Relevant log output ```shell ``` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.5.7
GiteaMirror added the bug label 2026-04-12 17:08:46 -05:00
Author
Owner

@mxyng commented on GitHub (Feb 8, 2025):

If you're referring to this line, it sets default origins allowed for cross origin resource sharing

<!-- gh-comment-id:2644714159 --> @mxyng commented on GitHub (Feb 8, 2025): If you're referring to this [line](https://github.com/ollama/ollama/blob/main/envconfig/config.go#L62), it sets default origins allowed for cross origin resource sharing
Author
Owner

@sjh00 commented on GitHub (Feb 9, 2025):

If you're referring to this line, it sets default origins allowed for cross origin resource sharing

yes
So I set OLLAMA_ORIGINS to only allow certain IPs, but after the service runs, the origins are the IPs I set plus the default parameter, meaning 0.0.0.0 is always included in the origins, no matter how I configure OLLAMA_ORIGINS.

<!-- gh-comment-id:2646031357 --> @sjh00 commented on GitHub (Feb 9, 2025): > If you're referring to this [line](https://github.com/ollama/ollama/blob/main/envconfig/config.go#L62), it sets default origins allowed for cross origin resource sharing yes So I set OLLAMA_ORIGINS to only allow certain IPs, but after the service runs, the origins are the IPs I set plus the default parameter, meaning 0.0.0.0 is always included in the origins, no matter how I configure OLLAMA_ORIGINS.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5803