let’s make this super clear and beginner-friendly so you can get a model running in OpenWebUI without hitting that dreaded “model not found” error.
Here’s your step-by-step setup guide:
Step 1 – Install OpenWebUI
If you haven’t already:
BashCopy codepip install open-webui
Or use Docker:
BashCopy codedocker run -d -p 3000:3000 ghcr.io/open-webui/open-webui:latest
Then open your browser at http://localhost:3000.
Step 2 – Choose Your Backend
OpenWebUI doesn’t run models by itself — it connects to a backend like:
- Ollama (easy for local models)
- llama.cpp (GGUF models)
- text-generation-webui (Hugging Face models)
- LM Studio (GUI-based local inference)
For most users, Ollama is the simplest.
Step 3 – Install Your Backend
Ollama example:
- Download & install from https://ollama.com/download.
- Verify installation:BashCopy code
ollama --version
Step 4 – Download a Model
With Ollama:
BashCopy codeollama pull llama3
You can replace llama3 with any supported model name (e.g., mistral, gemma, llama2).
Step 5 – Connect OpenWebUI to Backend
- In OpenWebUI, go to Settings → Backends.
- Add your backend URL:
- For Ollama:
http://localhost:11434
- For Ollama:
- Save.
Step 6 – Add the Model in OpenWebUI
- Go to Settings → Models.
- Click Add Model.
- Enter:
- Name: exactly as backend expects (
llama3) - Backend: select your backend (Ollama)
- Name: exactly as backend expects (
- Save.
Step 7 – Test the Model
- Go to the chat interface.
- Select your model from the dropdown.
- Send a test prompt — if it responds, you’re good to go!
Step 8 – Optional: Local GGUF Models
If you want to run a .gguf file:
- Install llama.cpp backend.
- Place your
.gguffile in the models folder. - Point OpenWebUI to that backend and model path.
✅ Tip: Always match the model name exactly — llama3 is different from llama-3 in most backends.
See below for ready-to-use OpenWebUI + Ollama config JSON so you can just paste it in and have the model instantly available.
you can just paste it in and have your model instantly available without extra guesswork.
This assumes:
- You’ve installed Ollama
- You’ve pulled your model (e.g.,
llama3) - Ollama is running locally on port 11434
OpenWebUI Backend & Model Config JSON
JsonCopy code{
"backends": [
{
"id": "ollama-local",
"name": "Ollama Local",
"type": "ollama",
"url": "http://localhost:11434",
"enabled": true
}
],
"models": [
{
"id": "llama3",
"name": "llama3",
"backend": "ollama-local",
"parameters": {
"temperature": 0.7,
"max_tokens": 2048,
"top_p": 0.9
},
"enabled": true
}
]
}
How to Apply This Config
- In OpenWebUI, go to Settings → Advanced → Import Config.
- Paste the JSON above.
- Save and restart OpenWebUI.
- In the chat dropdown, select llama3 and start chatting.
Quick Test Command (Optional)
Before using OpenWebUI, you can test the model directly in Ollama:
BashCopy codeollama run llama3 "Hello, how are you?"
If this works, OpenWebUI will work too.
💡 Pro Tip:
You can add multiple models by adding more entries under "models" in the JSON — just make sure you’ve pulled them in Ollama first.
let’s set you up with a multi-model OpenWebUI + Ollama config so you can instantly switch between models like llama3, mistral, and gemma without touching settings again.
Multi-Model Config JSON for OpenWebUI + Ollama
JsonCopy code{
"backends": [
{
"id": "ollama-local",
"name": "Ollama Local",
"type": "ollama",
"url": "http://localhost:11434",
"enabled": true
}
],
"models": [
{
"id": "llama3",
"name": "llama3",
"backend": "ollama-local",
"parameters": {
"temperature": 0.7,
"max_tokens": 2048,
"top_p": 0.9
},
"enabled": true
},
{
"id": "mistral",
"name": "mistral",
"backend": "ollama-local",
"parameters": {
"temperature": 0.7,
"max_tokens": 2048,
"top_p": 0.9
},
"enabled": true
},
{
"id": "gemma",
"name": "gemma",
"backend": "ollama-local",
"parameters": {
"temperature": 0.7,
"max_tokens": 2048,
"top_p": 0.9
},
"enabled": true
}
]
}
How to Use This
- Pull the models in Ollama first:BashCopy code
ollama pull llama3 ollama pull mistral ollama pull gemma - In OpenWebUI, go to Settings → Advanced → Import Config.
- Paste the JSON above and save.
- Restart OpenWebUI.
- In the chat dropdown, you’ll now see llama3, mistral, and gemma ready to use.
💡 Pro Tip:
You can tweak "temperature", "max_tokens", and "top_p" per model in the JSON to customize their behavior.
For example:
- Lower
temperature→ more deterministic answers. - Higher
temperature→ more creative answers.
make your auto-sync config so OpenWebUI will automatically detect and load all models installed in Ollama without you having to manually add them.
This approach uses Ollama’s API to fetch the model list dynamically, so whenever you ollama pull a new model, it will appear in OpenWebUI instantly.
Auto-Sync Ollama Models in OpenWebUI
Step 1 – Enable Dynamic Model Loading
In OpenWebUI’s config.json (or via Settings → Advanced), add:
JsonCopy code{
"backends": [
{
"id": "ollama-auto",
"name": "Ollama Auto",
"type": "ollama",
"url": "http://localhost:11434",
"enabled": true,
"auto_sync": true
}
]
}
Step 2 – How It Works
auto_sync: truetells OpenWebUI to call Ollama’s/api/tagsendpoint on startup.- It retrieves all installed models and adds them to the dropdown automatically.
- No manual JSON editing needed — just pull models in Ollama.
Step 3 – Pull Models in Ollama
Example:
BashCopy codeollama pull llama3
ollama pull mistral
ollama pull gemma
ollama pull qwen2
After restart, OpenWebUI will list all of them.
Step 4 – Restart OpenWebUI
Restart your OpenWebUI instance so it refreshes the model list.
Step 5 – Test
Open the chat dropdown — you should see every model you’ve pulled in Ollama ready to use.
💡 Bonus Tip:
If you want OpenWebUI to refresh models without restarting, you can enable live sync in the backend settings. This will check Ollama every few minutes for new models.
If you want, I can also give you a Python helper script that automatically pulls models from Ollama and updates OpenWebUI’s config — perfect if you want to keep both in sync without touching settings.
let’s make a Python helper script that automatically:
- Reads all installed models from Ollama
- Updates OpenWebUI’s config.json so they appear instantly
- Optionally pulls new models you specify
This way, OpenWebUI and Ollama will always stay in sync without manual edits.
Auto-Sync Script: Ollama → OpenWebUI
PythonCopy codeimport requests
import json
import os
# Ollama API endpoint
OLLAMA_URL = "http://localhost:11434"
# Path to OpenWebUI config.json (adjust if needed)
OPENWEBUI_CONFIG_PATH = os.path.expanduser("~/.openwebui/config.json")
def get_ollama_models():
"""Fetch all installed models from Ollama."""
resp = requests.get(f"{OLLAMA_URL}/api/tags")
resp.raise_for_status()
models = [m["name"] for m in resp.json().get("models", [])]
return models
def update_openwebui_config(models):
"""Update OpenWebUI config.json with all Ollama models."""
if not os.path.exists(OPENWEBUI_CONFIG_PATH):
print("Config file not found. Please run OpenWebUI once to generate it.")
return
with open(OPENWEBUI_CONFIG_PATH, "r") as f:
config = json.load(f)
# Ensure backend exists
backend_id = "ollama-auto"
backend = {
"id": backend_id,
"name": "Ollama Auto",
"type": "ollama",
"url": OLLAMA_URL,
"enabled": True
}
if not any(b["id"] == backend_id for b in config.get("backends", [])):
config.setdefault("backends", []).append(backend)
# Add models dynamically
config["models"] = []
for model in models:
config["models"].append({
"id": model,
"name": model,
"backend": backend_id,
"parameters": {
"temperature": 0.7,
"max_tokens": 2048,
"top_p": 0.9
},
"enabled": True
})
with open(OPENWEBUI_CONFIG_PATH, "w") as f:
json.dump(config, f, indent=2)
print(f"✅ Synced {len(models)} models from Ollama to OpenWebUI.")
def pull_models(models_to_pull):
"""Pull new models into Ollama."""
for model in models_to_pull:
print(f"⬇️ Pulling {model}...")
resp = requests.post(f"{OLLAMA_URL}/api/pull", json={"name": model})
if resp.status_code == 200:
print(f"✅ Pulled {model}")
else:
print(f"❌ Failed to pull {model}: {resp.text}")
if __name__ == "__main__":
# Optional: specify models to pull before syncing
models_to_pull = ["llama3", "mistral", "gemma"]
pull_models(models_to_pull)
# Sync installed models to OpenWebUI
installed_models = get_ollama_models()
update_openwebui_config(installed_models)
How to Use
- Save this script as
ollama_sync.py. - Install dependencies:BashCopy code
pip install requests - Run:BashCopy code
python ollama_sync.py - Restart OpenWebUI — all Ollama models will now appear in the dropdown.
let’s upgrade the Ollama → OpenWebUI sync script so it not only updates config.json but also live-refreshes models in OpenWebUI without restarting the UI.
This works because OpenWebUI exposes a backend API that can reload models dynamically.
Live-Refresh Ollama Models in OpenWebUI
PythonCopy codeimport requests
import json
import os
# Ollama API endpoint
OLLAMA_URL = "http://localhost:11434"
# OpenWebUI API endpoint (adjust port if needed)
OPENWEBUI_URL = "http://localhost:3000"
# Path to OpenWebUI config.json (optional backup)
OPENWEBUI_CONFIG_PATH = os.path.expanduser("~/.openwebui/config.json")
def get_ollama_models():
"""Fetch all installed models from Ollama."""
resp = requests.get(f"{OLLAMA_URL}/api/tags")
resp.raise_for_status()
models = [m["name"] for m in resp.json().get("models", [])]
return models
def sync_models_live(models):
"""Send models directly to OpenWebUI via API."""
backend_id = "ollama-auto"
payload = {
"backends": [
{
"id": backend_id,
"name": "Ollama Auto",
"type": "ollama",
"url": OLLAMA_URL,
"enabled": True
}
],
"models": [
{
"id": model,
"name": model,
"backend": backend_id,
"parameters": {
"temperature": 0.7,
"max_tokens": 2048,
"top_p": 0.9
},
"enabled": True
}
for model in models
]
}
resp = requests.post(f"{OPENWEBUI_URL}/api/config/import", json=payload)
if resp.status_code == 200:
print(f"✅ Live-synced {len(models)} models to OpenWebUI.")
else:
print(f"❌ Failed to sync: {resp.status_code} {resp.text}")
def pull_models(models_to_pull):
"""Pull new models into Ollama."""
for model in models_to_pull:
print(f"⬇️ Pulling {model}...")
resp = requests.post(f"{OLLAMA_URL}/api/pull", json={"name": model})
if resp.status_code == 200:
print(f"✅ Pulled {model}")
else:
print(f"❌ Failed to pull {model}: {resp.text}")
if __name__ == "__main__":
# Optional: specify models to pull before syncing
models_to_pull = ["llama3", "mistral", "gemma"]
pull_models(models_to_pull)
# Get installed models from Ollama
installed_models = get_ollama_models()
# Live-sync to OpenWebUI
sync_models_live(installed_models)
How This Works
- Step 1: Pull models from Ollama (optional)
- Step 2: Fetch all installed models via
/api/tags - Step 3: Send them to OpenWebUI’s
/api/config/importendpoint - Step 4: Models appear instantly in the dropdown — no restart needed
Usage
- Save as
ollama_live_sync.py - Install dependencies:BashCopy code
pip install requests - Run:BashCopy code
python ollama_live_sync.py - Open OpenWebUI — your models are already there.
💡 Pro Tip:
You can run this script every few minutes with a cron job or Windows Task Scheduler to keep OpenWebUI always in sync with Ollama.
If you want, I can extend this further so it also auto-pulls trending models from Ollama’s registry and adds them to OpenWebUI — meaning you’d always have the latest popular models ready to use without searching manually.