[GH-ISSUE #1355] Running inside a docker. Need -ip or --host parameter to change the interface. #78386

Closed
opened 2026-05-08 22:46:55 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @phalexo on GitHub (Dec 3, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1355

something like

ollama serve --ip 0.0.0.0

It defaults to the localhost 127.0.0.1 which is not usable for my setup.

Is there some way to specify an interface and a port?

Originally created by @phalexo on GitHub (Dec 3, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1355 something like ollama serve --ip 0.0.0.0 It defaults to the localhost 127.0.0.1 which is not usable for my setup. Is there some way to specify an interface and a port?
Author
Owner

@oliverbob commented on GitHub (Dec 3, 2023):

Start ollama by:

OLLAMA_HOST=0.0.0.0 OLLAMA_ORIGINS=* ollama serve

and not with:

ollama serve

Or when you are using docker, do it this way:

docker run -d -v ./ollama -p 11434:11434 -e OLLAMA_ORIGINS="*" --name ollama ollama/ollama

Please check available docs in this repo or refer to this Thread on this repo.

<!-- gh-comment-id:1837313919 --> @oliverbob commented on GitHub (Dec 3, 2023): Start ollama by: `OLLAMA_HOST=0.0.0.0 OLLAMA_ORIGINS=* ollama serve` and not with: `ollama serve` Or when you are using docker, do it this way: docker run -d -v ./ollama -p 11434:11434 -e OLLAMA_ORIGINS="*" --name ollama ollama/ollama Please check available docs in this repo or refer to this [Thread on this repo](https://github.com/jmorganca/ollama/issues/1179#issuecomment-1817099547).
Author
Owner

@technovangelist commented on GitHub (Dec 4, 2023):

It looks like oliverbob's comment solves your issue. I will go ahead and close it now. If you think there is anything we left out, reopen and we can address. Thanks for being part of this great community.

<!-- gh-comment-id:1839762635 --> @technovangelist commented on GitHub (Dec 4, 2023): It looks like oliverbob's comment solves your issue. I will go ahead and close it now. If you think there is anything we left out, reopen and we can address. Thanks for being part of this great community.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#78386