[GH-ISSUE #6622] [Bug] open-webui integration error when ui docker listen on 11434 #4167

Closed
opened 2026-04-12 15:05:31 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @zydmtaichi on GitHub (Sep 4, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6622

What is the issue?

i start open-webui via below cmd first and then ollama service failed to up by using ollama serve. Output tells the port already in use. I got the same err reason if i change the order of launch(first ollama, then open-webui docker), please check and improve the integration of ollama and open-webui.
my cmd for start open-webui:
docker run -d -p 3000:8080 -p 127.0.0.1:11434:11434 -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always registry.cn-hangzhou.aliyuncs.com/kin-images/open-webui:git-18ae586
my cmd for start ollama:
ollama serve

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.3.6

Originally created by @zydmtaichi on GitHub (Sep 4, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6622 ### What is the issue? i start open-webui via below cmd first and then ollama service failed to up by using `ollama serve`. Output tells the port already in use. I got the same err reason if i change the order of launch(first ollama, then open-webui docker), please check and improve the integration of ollama and open-webui. my cmd for start open-webui: `docker run -d -p 3000:8080 -p 127.0.0.1:11434:11434 -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always registry.cn-hangzhou.aliyuncs.com/kin-images/open-webui:git-18ae586` my cmd for start ollama: `ollama serve` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.3.6
GiteaMirror added the bug label 2026-04-12 15:05:31 -05:00
Author
Owner

@igorschlum commented on GitHub (Sep 4, 2024):

Hi @zydmtaichi could you update Ollama to version 0.3.9?

<!-- gh-comment-id:2327884104 --> @igorschlum commented on GitHub (Sep 4, 2024): Hi @zydmtaichi could you update Ollama to version 0.3.9?
Author
Owner

@rick-github commented on GitHub (Sep 4, 2024):

docker network create ollama-openwebui
docker run -d -p 11434:11434 --network ollama-openwebui -v ollama:/root/.ollama --name ollama --restart always ollama/ollama
docker run -d -p 3000:8080 --network ollama-openwebui -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://ollama:11434 --name open-webui --restart always registry.cn-hangzhou.aliyuncs.com/kin-images/open-webui:git-18ae586
<!-- gh-comment-id:2328635642 --> @rick-github commented on GitHub (Sep 4, 2024): ``` docker network create ollama-openwebui docker run -d -p 11434:11434 --network ollama-openwebui -v ollama:/root/.ollama --name ollama --restart always ollama/ollama docker run -d -p 3000:8080 --network ollama-openwebui -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://ollama:11434 --name open-webui --restart always registry.cn-hangzhou.aliyuncs.com/kin-images/open-webui:git-18ae586 ```
Author
Owner

@zydmtaichi commented on GitHub (Sep 5, 2024):

docker network create ollama-openwebui
docker run -d -p 11434:11434 --network ollama-openwebui -v ollama:/root/.ollama --name ollama --restart always ollama/ollama
docker run -d -p 3000:8080 --network ollama-openwebui -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://ollama:11434 --name open-webui --restart always registry.cn-hangzhou.aliyuncs.com/kin-images/open-webui:git-18ae586

Thanks, I solve the problem by using docker run -d -p 3000:8080 -v open-webui:/app/backend/data -e http://172.17.0.1:11434 --name open-webui --restart always registry.cn-hangzhou.aliyuncs.com/kin-images/open-webui:git-18ae586 and running the ollama cmd OLLAMA_HOST=172.17.0.1:11434 ollama serve.

the key of solving is virtual network addr for docker. It seems this is only way for program inside visit the host port outside under bridge mode.

<!-- gh-comment-id:2330377123 --> @zydmtaichi commented on GitHub (Sep 5, 2024): > ``` > docker network create ollama-openwebui > docker run -d -p 11434:11434 --network ollama-openwebui -v ollama:/root/.ollama --name ollama --restart always ollama/ollama > docker run -d -p 3000:8080 --network ollama-openwebui -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://ollama:11434 --name open-webui --restart always registry.cn-hangzhou.aliyuncs.com/kin-images/open-webui:git-18ae586 > ``` Thanks, I solve the problem by using `docker run -d -p 3000:8080 -v open-webui:/app/backend/data -e http://172.17.0.1:11434 --name open-webui --restart always registry.cn-hangzhou.aliyuncs.com/kin-images/open-webui:git-18ae586` and running the ollama cmd `OLLAMA_HOST=172.17.0.1:11434 ollama serve`. the key of solving is virtual network addr for docker. It seems this is only way for program inside visit the host port outside under bridge mode.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4167