Apidog

All-in-one Collaborative API Development Platform

API Design

API Documentation

API Debugging

API Mocking

API Automated Testing

How to Use Open WebUI with Ollama

Set up Open WebUI with Ollama to chat with LLMs like Llama 3.1 in a browser. Save histories, store prompts, and upload docs with this beginner-friendly guide!

Ashley Goolam

Ashley Goolam

Updated on May 21, 2025

Would you like to chat with powerful language models like Llama 3.1 or Mistral without getting stuck in a terminal? Open WebUI is your ticket to a sleek, ChatGPT-like interface that makes interacting with Ollama’s LLMs fun and intuitive. It lets you save chat histories, store prompts, and even upload documents for smarter responses—all in your browser. In this beginner-friendly guide, I’ll walk you through installing Ollama, testing a model in the terminal, and then leveling up with Open WebUI for a more user-friendly experience. We’ll use Docker for a quick setup and test it with a fun prompt. Ready to make AI chats a breeze? Let’s get rolling!

💡
Need to document your APIs? Try APIdog for a polished, interactive way to design and share API docs—perfect for your AI projects!
button

What is Open WebUI? Your LLM Command Center

Open WebUI is an open-source, self-hosted web interface that connects to Ollama, letting you interact with large language models (LLMs) like Llama 3.1 or Mistral in a browser-based dashboard. Unlike Ollama’s command-line interface, Open WebUI feels like ChatGPT, offering:

  • Chat History: Save and revisit your conversations.
  • Prompt Storage: Store and reuse your go-to prompts.
  • Document Uploads: Add files for context-aware responses (Retrieval-Augmented Generation, or RAG).
  • Model Switching: Easily swap between models in a click.

With over 50K GitHub stars, Open WebUI is a hit for developers and AI enthusiasts who want a collaborative, graphical way to work with LLMs locally. First, let’s get Ollama running to see why Open WebUI is worth adding!

ollama and open webui

Installing and Testing Ollama

Before we dive into Open WebUI, let’s set up Ollama and test a model like Llama 3.1 or Mistral in the terminal. This gives you a baseline to appreciate Open WebUI’s intuitive interface.

1. Check System Requirements:

  • OS: Windows, macOS, or Linux (Ubuntu 24.04 or similar).
  • Hardware: At least 16GB RAM and 10GB free storage for models (Llama 3.1 8B needs ~5GB). A GPU (e.g., NVIDIA 1060 4GB) is optional for faster performance.
  • Software: Ollama, downloadable from ollama.com.

2. Install Ollama: Download and install Ollama from ollama.com for your OS. Follow the installer prompts—it’s a quick setup. Verify installation with:

ollama --version

Expect a version like 0.1.44 (April 2025). If it fails, ensure Ollama is in your PATH.

ollama

3. Download a Model: Choose a model like Llama 3.1 (8B) or Mistral (7B). For this guide, we’ll use Llama 3.1:

ollama pull llama3.1

This downloads ~5GB, so grab a coffee if your internet’s slow. Check it’s installed:

ollama list

Look for llama3.1:latest. Mistral (ollama pull mistral) is another great option if you want a lighter model (~4GB).

ollama models

4. Test the Model in Terminal: Try a simple prompt to see Ollama in action:

ollama run llama3.1

At the prompt (>>>), type: “Tell me a dad joke about computers.” Hit Enter. You might get: “Why did the computer go to the doctor? It had a virus!” Exit with /bye. I ran this and got a chuckle-worthy joke, but typing in the terminal felt clunky—no chat history, no saved prompts. This is where Open WebUI shines, offering a visual interface to save conversations, reuse prompts, and upload documents for richer responses. Let’s set it up!

ollama terminal chat

Setting Up Your Environment for Open WebUI

Now that you’ve seen Ollama’s terminal interface, let’s prep for Open WebUI to make your LLM experience more intuitive. We’ll assume you have Docker installed, as it’s required for the Open WebUI setup.

1. Verify Docker: Ensure Docker is installed and running:

docker --version

Expect something like Docker 27.4.0. If you don’t have Docker, download and install Docker Desktop from their official website—it’s a quick setup for Windows, macOS, or Linux.

docker

2. Create a Project Folder: Keep things organized:

mkdir ollama-webui
cd ollama-webui

This folder will be your base for running Open WebUI.

3. Ensure Ollama is Running: Start Ollama in a separate terminal:

ollama serve

This runs Ollama’s API at http://localhost:11434. Keep this terminal open, as Open WebUI needs it to connect to your models.

Installing Open WebUI with Docker

With Ollama and Llama 3.1 ready, let’s install Open WebUI using a single Docker command for a fast, reliable setup.

1. Run Open WebUI: In your ollama-webui folder, execute:

docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

This command:

  • Pulls the Open WebUI image (ghcr.io/open-webui/open-webui:main, ~3.77GB).
  • Maps port 3000 (local) to 8080 (container) for browser access.
  • Adds host.docker.internal to connect to Ollama’s API at localhost:11434.
  • Uses a volume (open-webui) to persist chat history and settings.
  • Names the container open-webui and sets it to restart automatically.

It takes a minute to download. Check it’s running with docker ps—look for the open-webui container.

2. Access Open WebUI: Open your browser and go to http://localhost:3000. You’ll see Open WebUI’s welcome page. Click “Sign Up” to create an account (the first user gets admin privileges). Use a strong password and save it securely. You’re now ready to chat! If the page doesn’t load, ensure the container is running (docker logs open-webui) and port 3000 is free.

user account

Using Open WebUI: Chatting and Exploring Features

With Open WebUI running, let’s dive into chatting with Llama 3.1 and exploring its awesome features, which make it a huge upgrade over the terminal.

1. Start Chatting:

  • In Open WebUI, select llama3.1:8b from the top-left model selector (it should appear since you pulled it).
  • Click “New Chat” in the sidebar.
  • Enter the same prompt: “Tell me a dad joke about computers.”
  • Hit Enter. You’ll get a response like: “Why did the computer go to art school? Because it wanted to learn to draw a better byte!”
chat interface

The interface is clean, with your prompt and response saved automatically in the chat history.

2. Save and Organize Chats: In the left sidebar, click the pin icon to save the chat. Rename it (e.g., “Dad Jokes”) for easy access. You can archive or delete chats via the sidebar, keeping your experiments organized—way better than terminal scrolling!

3. Store Prompts: Save the dad joke prompt for reuse:

  • Go to Settings > Prompts.
  • Click “New Prompt,” name it “Dad Joke,” and paste: “Tell me a dad joke about computers.”
  • Save. Now you can apply it in any chat with one click.

4. Upload a Document for RAG: Add context to your chats:

  • Click the “#” icon in the chat input to open the document library.
  • Upload a text file (e.g., a Spring Boot 3.2 guide).
  • Ask: “How do I use the REST Client in Spring Boot 3.2?” Llama 3.1 will reference the doc, giving a code snippet like RestClient.create().get().uri("/users").retrieve().

I tested this with a Python tutorial PDF, and Open WebUI nailed context-aware answers, unlike the terminal’s basic responses.

5. Explore More Features:

  • Switch Models: Use the model selector to try Mistral or other models you’ve pulled (ollama pull mistral).
  • Customize Responses: Click “Chat Control” to adjust tone (e.g., “funny”) or length.
  • Admin Tools: In Settings > Admin, manage users or restrict model access (great for teams).
change models

Documenting Your APIs with APIdog

Using Open WebUI to interact with Ollama’s API and want to document your setup? APIdog is a fantastic tool for creating interactive API documentation. Its sleek interface and self-hosting options make it ideal for sharing your AI projects—check it out!

apidog documentation

Troubleshooting and Tips

  • Connection Issues: If Open WebUI can’t find Ollama, ensure ollama serve is running and port 11434 is open. Check Docker logs: docker logs open-webui.
  • Port Conflicts: If port 3000 is taken, stop the container (docker stop open-webui), remove it (docker rm open-webui), and rerun the docker run command with a new port (e.g., -p 3001:8080).
  • Slow Responses: Use a GPU with Ollama’s :cuda tags or smaller models like Mistral for speed.
  • Community: Join Open WebUI’s GitHub Discussions or Discord for support and ideas.
How to Download and Use Ollama to Run LLMs Locally
The world of Artificial Intelligence (AI) is evolving at breakneck speed, with Large Language Models (LLMs) like ChatGPT, Claude, and Gemini capturing imaginations worldwide. These powerful tools can write code, draft emails, answer complex questions, and even generate creative content. However, usi…
New to Ollama? Check this out to help you get started!

Why Choose Open WebUI?

Open WebUI transforms Ollama from a clunky terminal tool into a powerful, user-friendly platform:

  • Intuitive Interface: The browser-based dashboard is perfect for beginners and pros.
  • Organization: Saved chats and prompts keep your work tidy, unlike terminal logs.
  • Context Awareness: Document uploads enable RAG for smarter answers.
  • Privacy: Runs locally, keeping your data secure.

After testing both the terminal and Open WebUI, I’m sold on the GUI’s ease and features. It’s like upgrading from a flip phone to a smartphone!

Wrapping Up: Your Open WebUI Adventure Awaits

You’ve gone from terminal chats to a full-blown Open WebUI setup with Ollama, making LLM interactions smooth and fun! With Llama 3.1, saved chats, and document uploads, you’re ready to explore AI like never before. Try new models, store more prompts, or document your APIs with APIdog. Share your Open WebUI wins on the Open WebUI GitHub—I’m excited to see what you create! Happy AI tinkering!

button

How to Use Devstral with Cursor and Windsurf via Openrouter APITutorials

How to Use Devstral with Cursor and Windsurf via Openrouter API

Learn how to integrate Devstral, the open-source AI coding model, with Cursor and Windsurf using the Openrouter API.

Ashley Innocent

May 22, 2025

How to Run Devstral Locally with OllamaTutorials

How to Run Devstral Locally with Ollama

Learn how to run Devstral, Mistral AI’s open-source coding model, locally with Ollama.

Ashley Innocent

May 22, 2025

Complete Guide on API Integration Testing (Out-of-box Code Available)Tutorials

Complete Guide on API Integration Testing (Out-of-box Code Available)

Learn how API integration testing ensures seamless interactions between APIs. And how to perform API integration testing.

Oliver Kingsley

May 20, 2025