issue: OLLAMA_BASE_URL being passed as OLLAMA_API_BASE_URL #4538

Closed
opened 2025-11-11 15:56:26 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @deboboy on GitHub (Mar 23, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.5.20 - 2025-03-05

Ollama Version (if applicable)

0.6.3

Operating System

Ubuntu

Browser (if applicable)

Chromium 133

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

  • Download a model from the OUI interface
  • Model is successfully downloaded from Ollama, with confirmation message in the OUI interface

Actual Behavior

  • Get 'Download canceled' message in OUI interface after starting a download
  • Browser console shows incorrect Ollama BASE URL in the API call even though the correct env variable is set in the Docker compose YML

Steps to Reproduce

  1. Go to OUI interface
  2. Click 'Select a model'
  3. Enter 'qwen2.5:3b' in 'Search a model'
  4. Click 'Pull qwen2.5:3b from ollama.com'
  5. See 'Download canceled' message

Logs & Screenshots

Browser console shows this error:
Failed to load resource: the server responded with a status of 404 (Not Found) - /ollama/api/pull/0:1

Further inspection of the browser console shows this specific line in ollama/index.ts where the API call is failing:
const res = await fetch(${OLLAMA_API_BASE_URL}/api/pull${urlIdx !== null ? /${urlIdx} : ''}, {

Yet here's my Docker compose YML setting the Ollama BASE URL correctly:

Create docker-compose directory and file

mkdir -p /opt/ollama
cat > /opt/ollama/docker-compose.yml <<'COMPOSE'
version: '3.8'
services:
ollama:
container_name: ollama
image: ollama/ollama:latest
restart: always
ports:
- "127.0.0.1:11434:11434"
volumes:
- ollama:/root/.ollama
openwebui:
container_name: open-webui
image: ghcr.io/open-webui/open-webui:ollama
restart: always
ports:
- "127.0.0.1:3000:8080"
environment:
- OLLAMA_BASE_URL=http://ollama:11434
volumes:
- ollama:/root/.ollama
- open-webui:/app/backend/data
depends_on:
- ollama
volumes:
ollama:
driver: local
open-webui:
driver: local
COMPOSE

Additional Information

No response

Originally created by @deboboy on GitHub (Mar 23, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.5.20 - 2025-03-05 ### Ollama Version (if applicable) 0.6.3 ### Operating System Ubuntu ### Browser (if applicable) Chromium 133 ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior - Download a model from the OUI interface - Model is successfully downloaded from Ollama, with confirmation message in the OUI interface ### Actual Behavior - Get 'Download canceled' message in OUI interface after starting a download - Browser console shows incorrect Ollama BASE URL in the API call even though the correct env variable is set in the Docker compose YML ### Steps to Reproduce 1. Go to OUI interface 2. Click 'Select a model' 3. Enter 'qwen2.5:3b' in 'Search a model' 4. Click 'Pull qwen2.5:3b from ollama.com' 5. See 'Download canceled' message ### Logs & Screenshots Browser console shows this error: Failed to load resource: the server responded with a status of 404 (Not Found) - /ollama/api/pull/0:1 Further inspection of the browser console shows this specific line in ollama/index.ts where the API call is failing: const res = await fetch(`${OLLAMA_API_BASE_URL}/api/pull${urlIdx !== null ? `/${urlIdx}` : ''}`, { Yet here's my Docker compose YML setting the Ollama BASE URL correctly: # Create docker-compose directory and file mkdir -p /opt/ollama cat > /opt/ollama/docker-compose.yml <<'COMPOSE' version: '3.8' services: ollama: container_name: ollama image: ollama/ollama:latest restart: always ports: - "127.0.0.1:11434:11434" volumes: - ollama:/root/.ollama openwebui: container_name: open-webui image: ghcr.io/open-webui/open-webui:ollama restart: always ports: - "127.0.0.1:3000:8080" environment: - OLLAMA_BASE_URL=http://ollama:11434 volumes: - ollama:/root/.ollama - open-webui:/app/backend/data depends_on: - ollama volumes: ollama: driver: local open-webui: driver: local COMPOSE ### Additional Information _No response_
GiteaMirror added the bug label 2025-11-11 15:56:26 -06:00
Author
Owner

@tjbck commented on GitHub (Mar 23, 2025):

Intended behaviour.

@tjbck commented on GitHub (Mar 23, 2025): Intended behaviour.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4538