mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 15:53:59 -06:00
[GH-ISSUE #12034] issue: OLLAMA_BASE_URL is not used as the setting when restarting container #31973
Reference in New Issue
Block a user
Originally created by @WebKenth on GitHub (Mar 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12034
Check Existing Issues
Installation Method
Docker
Open WebUI Version
main
Ollama Version (if applicable)
latest
Operating System
MacOS / Docker
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Set the environment variable:
OLLAMA_BASE_URL: "http://ollama:11434"Load up the container and expect to see the setting set:
Actual Behavior
Set the environment variable:
OLLAMA_BASE_URL: "http://ollama:11434"Load up the container and expect to see the setting set:
The base url is set to host.docker.internal which does not work
Steps to Reproduce
I am using Traefik to manage the alot of containers and bind them to the network to avoid them exposing conflicting ports, your experience may vary
Basically this config boots up a traefik container which makes 2 routers, one for each service and using the docker network we bind the containers together so they can communicate
ollama.webui.yml
ollama.yml
docker-compose.yml
docker-compose upAnd go to chat.local
You should see this:
Close it, and navigate to the settings page
Notice the setting is not set to what you put in the environment variable

Change the setting to "http://ollama:11434" and it now works
To reproduce the error simply run
docker-compose down; docker-compose up -d, repeat the above steps and you will see the exact same behaviourLogs & Screenshots
docker logs ollama-webuidocker logs ollamaAdditional Information
It would help to see a full list of available Environment Variables
There might be a hidden one i missed to set the the settings host?
@Ithanil commented on GitHub (Mar 25, 2025):
I didn't check your setup in detail and might be wrong, but please check that the reason is not OLLAMA_BASE_URL being a
PersistentConfigsetting. The docs don't specifyPersistentConfigforOLLAMA_BASE_URL, but they do forOLLAMA_BASE_URLShttps://docs.openwebui.com/getting-started/env-configuration/#ollama_base_urlsPersistentConfigsettings will be read from the database once it is configured for the first time.