mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[SOLVED] Ollama Open web Ui in WSL2 Bug after Reinstall - BASE URL & admin User #571
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Gara06 on GitHub (Apr 1, 2024).
Bug Report
Description
I installed in a first time Ollama and OpenWebUi; It was working , but only CPU. So i uninstall it to make a clean install with nvidia gpu.
Bug Summary:
install on Win11 - Docker desktop - WSL2- Docker Compose :
version: '3.8'
services:
ollama:
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
volumes:
- ollama:/root/.ollama
container_name: ollama
restart: unless-stopped
image: ollama/ollama:latest
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
volumes:
- open-webui:/app/backend/data
depends_on:
- ollama
ports:
- ${OPEN_WEBUI_PORT-3000}:8080
environment:
- 'OLLAMA_BASE_URL=http://ollama:11434'
- 'WEBUI_SECRET_KEY='
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped
volumes:
ollama: {}
open-webui: {}
Steps to Reproduce:
I uninstall with revo uninstaller to delete every thing from ollama, docker desktop and openWebUi, But all time , more than 20 times , i re-install all. i have all time my first old admin User working. Why ? why cannot delete it and create a new admin user ? this is the first BUG. But tho most important it's i cannot connect OpenWebUi to Ollama with Base URL. BASE URL doesnt save any change , and doesnt valide to work any change. If i use http://localhost:3000 i get acces to OpenWebUi, If i go to http://localhost:11434/ "Ollama is running" but never exept the first time i connected OpenWebUi to ollama.
i tryed to use docker run instead of docker compose after , but same result. Admin User stay the same even i delete and erase alle things. And never connect to ollama.
Expected Behavior:
There is a data base i can delete to erase all from old install and restart reely clean and NEW?
Actual Behavior:
[Describe what actually happened.]
Environment
Confirmation:
Thank you
@justinh-rahb commented on GitHub (Apr 1, 2024):
This issue is not a bug, but rather a misunderstanding of how Docker functions. To resolve it, please remove the persistent volume using the following command:
It's important to understand that, from a Docker container's perspective,
localhostrefers to itself rather than the host machine, which is the intended target. For more information, please refer to our FAQ: https://docs.openwebui.com/faq#q-why-cant-my-docker-container-connect-to-services-on-the-host-using-localhostTo correct this, use the default URL that would be applied if no environment variable is set:
Upon checking Ollama Connections, you should see
http://host.docker.internal:11434. If this still fails to connect, the problem might be that Ollama is not listening on all interfaces (0.0.0.0), but only onlocalhost. To fix this issue, set the Ollama environment variablesOLLAMA_HOST=0.0.0.0andOLLAMA_ORIGINS=*. Note that this should not be necessary when using our Docker Compose installation method, nor would changing any Base URL values (it would behttp://ollama:11434in this case). Only change your Ollama environment variables if you are running the .exe installer variant: https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-windows@Gara06 commented on GitHub (Apr 1, 2024):
[SOLVED] Thank you very much. Works fine with this 2 commands.
OpenWebUi now is connected to ollama, and i can registre a new admin user. ;)
Ty also for the FAQ link