Run curl http://localhost:11434/api/tags on the Ollama host when Open WebUI loads but its model picker is empty or stuck. If the response contains a models array, even an empty one, check reachability from the Open WebUI backend and verify the saved base URL. A working host probe only confirms the local connection. Ollama model-list API
ollama: network problem
Open WebUI calls Ollama from its backend. Use the address reachable from that process, and substitute your actual container or service name where it differs. Open WebUI connection troubleshooting
| Where you test | Reachability check | Base URL for Open WebUI |
|---|---|---|
| On the Ollama host, with Ollama running natively | curl http://localhost:11434/api/tags | http://localhost:11434 when Open WebUI also runs natively on that host |
| From Open WebUI using Docker bridge networking, with Ollama on the Docker host | From inside the Open WebUI container, request http://host.docker.internal:11434/api/version. | http://host.docker.internal:11434 |
From Open WebUI in Docker, with ollama on the same Docker network | Use Verify Connection below. | http://ollama:11434 |
| From an Open WebUI backend on a different machine | Use Verify Connection below. | http://192.168.1.5:11434, using the Ollama host’s actual address. |
If Ollama and Open WebUI share a Docker network and Ollama’s port is unpublished, check Ollama’s model list with docker exec ollama ollama list, then use Verify Connection with the shared-network URL to check HTTP reachability. Open WebUI connection troubleshooting
| Result | Next step |
|---|---|
| The native host probe refuses the connection or times out | Check whether Ollama is running and listening on the address and port you tested. |
| The host probe works and the Docker bridge probe fails | Check whether the hostname resolves. If it resolves, check Ollama’s bind address and whether the host firewall allows traffic from the Docker network. |
Ollama’s /api/tags response contains an empty model list | Ollama answered with no models for that instance. Follow the missing-models guide. |
Ollama’s /api/tags response contains models and Open WebUI still shows none | Check that the Ollama URL that returned those models is enabled in the admin connections. |
In Admin Panel → Settings → Connections, enter the Ollama base URL with its scheme and port, such as http://host.docker.internal:11434, then use Verify Connection and save. Leave /api off the URL. Open WebUI appends /api/version, so a base URL ending in /api makes it request /api/api/version. Open WebUI connection troubleshooting
| Check | Ollama endpoint | What a successful response tells you |
|---|---|---|
| Verify Connection | /api/version | The backend can reach Ollama’s version endpoint. |
| Model picker | /api/tags | Ollama returned the model list for that instance, which can be empty. |
| Send a chat message | /api/chat | Ollama ran the selected model and returned a reply. |
ollama: cannot connect to host (host.docker.internal:11434) …
When Open WebUI runs in Docker bridge mode, localhost refers to its container. If the Open WebUI container on Linux Docker Engine cannot resolve host.docker.internal, add --add-host=host.docker.internal:host-gateway when recreating it with its existing data volume. With Compose, add this under the open-webui service and apply it with docker compose up -d. Open WebUI Docker update guide
extra_hosts:
- host.docker.internal:host-gateway
If the hostname resolves but the backend still cannot connect, check the listener on the Ollama host. On Linux, run ss -tlnp | grep 11434. On Windows, run netstat -an | findstr 11434. A listener on 127.0.0.1:11434 is restricted to loopback. Open WebUI connection troubleshooting
If the backend needs to reach a non-loopback address, change OLLAMA_HOST where Ollama starts and restart it. The examples below listen on all interfaces. Ollama’s local API does not require authentication, so restrict inbound port 11434 at the host firewall to the Open WebUI host. On a shared Docker network, keep Ollama’s port unpublished. Open WebUI connection troubleshooting
-
Linux with systemd. Run
systemctl edit ollama.serviceand add the following override. After saving, runsystemctl daemon-reloadandsystemctl restart ollama.[Service] Environment="OLLAMA_HOST=0.0.0.0:11434" -
macOS app. Run
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"and restart the Ollama app. -
Windows app. Quit Ollama from the taskbar, set the user environment variable
OLLAMA_HOSTto0.0.0.0:11434, then start Ollama from the Start menu. Ollama Local FAQ
Repeat the backend probe after the restart. For Docker host networking, start Open WebUI with --network=host and use http://127.0.0.1:11434 for host Ollama. Docker ignores -p in host mode. With the default Open WebUI port, open http://localhost:8080 on that host. For host networking on Docker Desktop, use version 4.34 or later and turn on Settings → Resources → Network → Enable host networking. Open WebUI connection troubleshooting · Changing the Open WebUI port
Open WebUI keeps trying an old Ollama URL
URLs saved in Admin Panel → Settings → Connections take precedence over environment variables by default. Correct or remove the old address there and save. If you set both OLLAMA_BASE_URLS and OLLAMA_BASE_URL, the plural setting takes precedence. Open WebUI environment reference
If Settings hangs after you save an unreachable URL, supply the correct Ollama URL in Open WebUI’s environment. Set RESET_CONFIG_ON_START=true for the startup on which you want to clear saved database settings. If a legacy config.json is present in DATA_DIR, Open WebUI imports it after clearing those settings. For an environment-managed deployment, ENABLE_PERSISTENT_CONFIG=false makes UI changes revert on restart. Open WebUI environment reference · Open WebUI connection troubleshooting
If the model picker spins or Settings stalls, correct or remove unreachable endpoints. With multiple Ollama or OpenAI URLs configured, Open WebUI queries them concurrently, so the slowest endpoint determines the wait. The default model-list timeout for each endpoint is 10 seconds. To fail sooner while you troubleshoot, set AIOHTTP_CLIENT_TIMEOUT_MODEL_LIST=3 in the Open WebUI environment. Open WebUI connection troubleshooting
open webui: server connection error
If verification succeeds and models appear but chat fails, run the same model on the Ollama host. Replace MODEL_NAME with the exact model name from the picker. Use the second command when Ollama itself runs in a container named ollama. Open WebUI connection troubleshooting
ollama run MODEL_NAME
docker exec -it ollama ollama run MODEL_NAME
If the model fails there too, check Ollama’s logs for the execution error. On systemd, use journalctl -u ollama. For a container named ollama, use docker logs ollama. If the model runs locally, check the Open WebUI log for an Ollama error under Error processing chat payload. Open WebUI connection troubleshooting
If the page shows Open WebUI backend required on load, check whether the browser’s request to /api/config succeeds. That request belongs to Open WebUI. If it fails with the official Docker image, check that the published port or tunnel leads to the Open WebUI service, which listens on container port 8080 by default. Open WebUI connection troubleshooting
502 bad gateway
A 502 means a gateway or proxy received an invalid upstream response while trying to fulfill the request. HTTP Semantics, section 15.6.3
- The proxy URL fails and direct Open WebUI works. From the Open WebUI host, open the instance’s published address, such as
http://localhost:3000for a3000:8080mapping. If the browser console shows WebSocket errors, check forwarding ofUpgradeandConnection. Docker installation and proxy guide - Direct Open WebUI loads and only the Ollama connection fails. Repeat the reachability check for your Open WebUI setup. If the probe fails, use an Ollama URL that the backend can reach. A successful request from a browser or another machine leaves the backend path unverified. Open WebUI connection troubleshooting
Evidence and limits. The steps follow the rolling Open WebUI and Ollama documentation for the native Ollama API. The commands were not run for this guide.