Open WebUI with Docker and Ollama: 2026 Installation Guide

Open WebUI Interface Running Locally
Open WebUI: the interface that turns your computer into a personal AI assistant
date: · 9 min
author: Matteo
series: Local AI/ part 2/3

Run models like DeepSeek on your own computer, with Ollama and Open WebUI.

  1. DeepSeek R1 Locally with Ollama: A Mac Guide (2026)
  2. Open WebUI with Docker and Ollama: 2026 Installation Guide
  3. QwQ-32B Locally with Ollama: Tests, Limits and Comparisons
the whole guide >

Updated October 2026 for Open WebUI v0.12: new commands with WEBUI_SECRET_KEY, the :slim image, Docker Compose, installing on Windows with WSL, and the new Watchtower for updates.

If you’re here after reading my guide on running DeepSeek locally, or you’re simply wondering whether there’s a more convenient, functional and elegant way to interact with your local AI than the terminal, the answer is yes, and it’s called Open WebUI.

What Is Open WebUI

Open WebUI is the natural next step in using local AI models. It’s a modern, elegant web interface that turns the terminal experience into something much closer to ChatGPT or Claude, with one fundamental advantage: everything stays on your computer. No more worrying about the privacy of your data or pricey monthly subscriptions. You can juggle multiple conversations, analyze documents and even generate images, all locally and for free.

And if one day you need a bigger model than your laptop can handle, Open WebUI also connects to the APIs of OpenAI, Anthropic or any compatible service: same interface, and you decide model by model what stays local and what doesn’t.

Before You Start

Open WebUI itself is lightweight: the real weight comes from the models. To run a local model comfortably you need at least 16GB of RAM (although I personally managed to run it on an 8GB MacBook Air M2, with small models), and an NVIDIA GPU or an Apple Silicon Mac helps a lot. On the disk side, the standard Docker image is about a 1.6GB download, plus whatever the models take.

You’ll need:

  • Docker (Docker Desktop on Mac and Windows, or Docker Engine on Linux; on a Mac, OrbStack works great too)
  • Ollama with at least one model downloaded, if you want to use local models

If you’ve already installed Docker and Ollama by following my previous guide, you’re already halfway there.

The secret key (don’t skip this step)

Compared to the first version of this guide there’s something new: all the official commands now pass the WEBUI_SECRET_KEY variable, the key Open WebUI uses to sign sessions. If you don’t set it, every time the container is recreated (after an update, for example) you get kicked out and have to log in again. Generate one and keep it somewhere safe:

openssl rand -hex 32

In the commands below, replace your-secret-key with the result. And always use the same one.

6 Ways to Install Open WebUI with Docker (and Two Without)

How you install Open WebUI changes slightly depending on your setup. If Ollama is running on your computer, use this command:

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

You don’t need to tell it where Ollama is: the image looks for it on its own at http://host.docker.internal:11434, which is your computer.

If Ollama runs on another server instead, change the command to point to the right URL:

docker run -d -p 3000:8080 \
    -e OLLAMA_BASE_URL=https://your-server.com \
    -v open-webui:/app/backend/data \
    -e WEBUI_SECRET_KEY=your-secret-key \
    --name open-webui \
    --restart always \
    ghcr.io/open-webui/open-webui:main

For those with an NVIDIA GPU who want to put it to work (the :cuda image is now built for CUDA 12.8; if your drivers are older there’s :cuda126):

docker run -d -p 3000:8080 --gpus all \
    --add-host=host.docker.internal:host-gateway \
    -v open-webui:/app/backend/data \
    -e WEBUI_SECRET_KEY=your-secret-key \
    --name open-webui \
    --restart always \
    ghcr.io/open-webui/open-webui:cuda

There’s also an all-in-one image that bundles both Open WebUI and Ollama. With a GPU:

docker run -d -p 3000:8080 --gpus=all \
    -v ollama:/root/.ollama \
    -v open-webui:/app/backend/data \
    -e WEBUI_SECRET_KEY=your-secret-key \
    --name open-webui \
    --restart always \
    ghcr.io/open-webui/open-webui:ollama

Or without a GPU:

docker run -d -p 3000:8080 \
    -v ollama:/root/.ollama \
    -v open-webui:/app/backend/data \
    -e WEBUI_SECRET_KEY=your-secret-key \
    --name open-webui \
    --restart always \
    ghcr.io/open-webui/open-webui:ollama

Finally, the most interesting addition if you only use models through APIs (OpenAI, Anthropic, OpenRouter and the like): the :slim image. It’s about a 196MB download instead of 1.6GB, because it leaves out the local models for embeddings, speech-to-text and document extraction. Chat works exactly the same; just change :main to :slim in the first command. If you want to upload documents and have them analyzed locally, stick with :main.

With Docker Compose

If you prefer keeping the configuration in a file (that’s how I do everything these days), create a docker-compose.yml:

services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    ports:
      - "3000:8080"
    volumes:
      - open-webui:/app/backend/data
    extra_hosts:
      - host.docker.internal:host-gateway
    environment:
      - WEBUI_SECRET_KEY=your-secret-key
    restart: unless-stopped

volumes:
  open-webui:

And start it with:

docker compose up -d

On Windows with WSL

On Windows, the easiest route is Docker inside WSL 2:

  1. Install WSL by following the official Microsoft guide.
  2. Install Docker Desktop, choosing the WSL 2 backend during setup.
  3. In Docker Desktop, go to Settings > Resources > WSL Integration and enable your distribution.
  4. Open your WSL distribution’s terminal (not PowerShell, not Command Prompt) and run the same standard command shown above.

The most common mistake is running the docker commands from PowerShell: they need to run inside WSL. And if you really don’t want Docker, on Windows you can use the uv installation below or the Open WebUI desktop app.

Without Docker: pip or uv

For those who prefer Python, there’s the pip installation. Mind the version: Open WebUI supports Python 3.11 and 3.12; 3.13 isn’t supported yet.

pip install open-webui
open-webui serve

Even more convenient, if you use uv, which fetches the right Python version for you:

DATA_DIR=~/.open-webui uvx --python 3.11 open-webui@latest serve

Either way, Open WebUI answers on http://localhost:8080. On Linux without an NVIDIA GPU, it’s worth installing the CPU build of PyTorch first, so you don’t download gigabytes of CUDA libraries you’ll never use:

pip install torch --index-url https://download.pytorch.org/whl/cpu

First Launch and Setup

Once the installation is done, open your favorite browser and go to http://localhost:3000 (or http://localhost:8080 if you’re not using Docker). The first thing you’ll need to do is create an admin account. Don’t worry, everything stays on your computer: you can even use a fake email if you like. After creating the account you’ll land on this screen (the screenshots come from the first version of this guide: the interface has changed a bit since then, but the essentials are the same):

Screenshot of the Open WebUI login page

After logging in, you can choose which models to use. If you followed my DeepSeek guide, you should already see the model available in the list.

Screenshot of the Open WebUI page after login

If you use Open WebUI on your own and the login feels unnecessary, there’s single-user mode: add -e WEBUI_AUTH=False to the docker run command. Think it over first, though: once it’s on, you can’t switch back to multi-user mode.

The Features You’ll Fall in Love With

One of the most interesting things about Open WebUI is its ability to analyze documents. Picture having 100 pages of technical documentation and needing to find one specific answer. Instead of reading the whole thing, you can upload it to Open WebUI and let the AI do the heavy lifting for you.

Screenshot of the Knowledge Base section

You can also create custom models that combine different base models with your knowledge bases. It’s like having a specialized assistant for every kind of task. And the best part? You can run multiple conversations at once, organize them into folders and even share them with your colleagues (locally, of course).

Stay Up to Date

Open WebUI ships updates often, so it’s worth keeping up. The easiest way is still Watchtower, but watch out: the old containrrr/watchtower is no longer maintained, and the official docs now use the nickfedor/watchtower fork:

docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock nickfedor/watchtower --run-once open-webui

If you’d rather do it by hand, your data lives in the open-webui volume and survives the container being recreated:

docker rm -f open-webui
docker pull ghcr.io/open-webui/open-webui:main
# then run the same docker run command as before, with the same WEBUI_SECRET_KEY

With Docker Compose, docker compose pull and docker compose up -d are all you need; with pip, pip install -U open-webui.

One detail many people miss: :main (and its alias :latest) is a “rolling” image, rebuilt on every change to the main branch, not necessarily the latest stable release. If you want something reproducible, use a version tag such as :v0.12.0 and bump it yourself when you decide to.

When Things Don’t Go to Plan

If you run into connection problems, the first thing to check is that Ollama is running (use ollama list in the terminal). If everything looks fine but Open WebUI still won’t work, check the logs with docker logs open-webui.

Two classics:

  • Open WebUI doesn’t see your Ollama models. Make sure you started the container with --add-host=host.docker.internal:host-gateway. On Linux, Ollama also listens only on 127.0.0.1 by default: to reach it from the container, start it with OLLAMA_HOST=0.0.0.0.
  • You get logged out after every update or restart. WEBUI_SECRET_KEY is missing, or you’re changing it on every start. Set it once and leave it alone.

In the worst case, you can always do a full reset: remove the container (docker rm -f open-webui), delete the data volume (docker volume rm open-webui) and reinstall. It’s like factory-resetting your phone: it fixes a lot of problems, but you lose all your chats and settings.

The Future Is Local (and Open Source)

Open WebUI proves we no longer have to choose between advanced features and privacy. With AI models getting more efficient and interfaces more sophisticated, solutions like this are no longer just an interesting alternative but a practical, sensible choice.

The community keeps shipping new features at a brisk pace: built-in image generation, code analysis, voice chat, connections to external providers and agents. And the release pace shows no sign of slowing down.

Is It Worth Trying?

Absolutely. Open WebUI completely transforms the experience of using local AI models. It’s no longer about tinkering with the terminal (although that has its charm), but about having a professional, intuitive tool that anyone can use.

If you’re still reading and haven’t tried installing it yet, I suggest you do it now. In the time it took you to read this article, you could already have set it up and started using it. And if you run into trouble, well, you know where to find me!

P.S. If you think this is interesting, wait until you see what I have in store for the next article in the series. Spoiler: it involves artificial intelligence, a bit of Docker magic, and maybe some cursing in ancient Aramaic when things don’t work the way they should!


Useful Resources:

Copied