Self Hosting 6 min read

OpenWebUI Setup Guide (2026): Install with Docker & Ollama

Suresh S Suresh S
OpenWebUI Setup Guide (2026): Install with Docker & Ollama

OpenWebUI has become one of the most popular self-hosted AI interfaces for interacting with large language models. Whether you’re running Ollama, connecting to the OpenAI API, or hosting your own models, OpenWebUI provides a clean, modern web interface with powerful features such as chat history, document uploads, Retrieval-Augmented Generation (RAG), user management, and multi-model support.

Unlike many cloud-based AI platforms, OpenWebUI gives you complete control over your data, making it an excellent choice for developers, businesses, and privacy-conscious users.

In this guide, you’ll learn how to:

  • Install OpenWebUI using Docker
  • Deploy OpenWebUI with Docker Compose
  • Connect OpenWebUI to Ollama
  • Configure your first administrator account
  • Secure your installation for production
  • Update OpenWebUI safely
  • Back up your data
  • Troubleshoot common installation problems

Let’s get started.

Why Use OpenWebUI?

OpenWebUI offers a modern interface for managing and interacting with AI models without relying entirely on cloud services.

Some of its key features include:

  • Support for Ollama, OpenAI, and compatible APIs
  • Built-in Retrieval-Augmented Generation (RAG)
  • Multiple user accounts and role management
  • File uploads for AI-assisted document analysis
  • Chat history and conversation management
  • Responsive interface for desktop and mobile
  • Local deployment for improved privacy

Docker Compose and OpenWebUI architecture diagram

Prerequisites

Before installing OpenWebUI, make sure your system meets the following requirements.

Minimum Requirements

  • Quad-core CPU
  • 8 GB or more RAM
  • SSD storage
  • Ollama installed (optional but recommended)

Supported operating systems include:

  • Ubuntu
  • Debian
  • Fedora
  • Windows 11
  • macOS

Install OpenWebUI Using Docker

Docker is the fastest and easiest way to install OpenWebUI.

Step 1: Pull the Docker Image

docker pull ghcr.io/open-webui/open-webui:main

Step 2: Start OpenWebUI

docker run -d \
-p 3000:8080 \
--name openwebui \
-v openwebui:/app/backend/data \
--restart unless-stopped \
ghcr.io/open-webui/open-webui:main

Docker will download the image and start the container automatically.

Step 3: Access the Dashboard

Open your browser and visit:

http://localhost:3000

The first user you create becomes the administrator.

OpenWebUI login screen

Install OpenWebUI Using Docker Compose

Docker Compose is recommended because it makes updates and maintenance much easier.

Create a file named docker-compose.yml and paste the following configuration:

services:
  openwebui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: openwebui
    ports:
      - "3000:8080"
    volumes:
      - openwebui-data:/app/backend/data
    restart: unless-stopped

volumes:
  openwebui-data:

Start the application:

docker compose up -d

Verify the container:

docker ps

Terminal output showing OpenWebUI starting up

Connect OpenWebUI with Ollama

Running Ollama locally allows OpenWebUI to use models such as Llama 3, Mistral, Gemma, Phi, DeepSeek, and Qwen.

First, start Ollama:

ollama serve

Download a model. Example:

ollama pull llama3

Now run OpenWebUI with the Ollama environment variable:

docker run -d \
-p 3000:8080 \
-e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
-v openwebui:/app/backend/data \
ghcr.io/open-webui/open-webui:main

Linux users may need to replace host.docker.internal with the local IP address of the Ollama server.

First-Time Configuration

After opening OpenWebUI, create your administrator account by configuring a Username, Password, and Email address.

After logging in, navigate to Settings → Models. You should now see your Ollama models automatically. If not, verify the Ollama connection under Settings → Connections.

The main OpenWebUI chat interface

Using OpenAI Instead of Ollama

If you prefer cloud-hosted AI models, navigate to Settings → Connections and add your OpenAI API Key. Then select GPT models directly from the interface.

OpenWebUI also supports many OpenAI-compatible APIs, allowing you to connect to self-hosted or third-party providers.

Secure Your OpenWebUI Installation

If OpenWebUI is accessible over the internet, securing it should be a priority.

Use HTTPS

Place OpenWebUI behind a reverse proxy such as Nginx or Traefik and install an SSL certificate.

Protect Administrator Accounts

Use strong passwords, multi-user permissions, and unique administrator credentials. Avoid sharing the administrator account.

Store Data Persistently

Always mount a Docker volume as shown in the Docker Compose configuration:

volumes:
  - openwebui-data:/app/backend/data

Without persistent storage, your conversations and settings will be lost if the container is removed.

Keep Containers Updated

Regularly pull the latest image and restart the service:

docker pull ghcr.io/open-webui/open-webui:main
docker compose up -d

Backup OpenWebUI

Backing up your data ensures you can recover conversations and settings. Create a backup of the Docker volume:

docker run --rm \
-v openwebui-data:/data \
-v $(pwd):/backup \
alpine \
tar czf /backup/openwebui-backup.tar.gz /data

Store backups in a secure location.

Update OpenWebUI

Updating OpenWebUI takes only a few commands:

docker compose down
docker pull ghcr.io/open-webui/open-webui:main
docker compose up -d

Your persistent data remains intact if stored in a Docker volume.

Common Problems and Solutions

OpenWebUI Cannot Connect to Ollama

Ensure Ollama is running (ollama serve) and verify http://localhost:11434 is accessible.

Port 3000 Already in Use

Change the port mapping in docker-compose.yml:

ports:
  - "8080:8080"

Then open http://localhost:8080.

Docker Container Keeps Restarting

Check the logs using docker logs openwebui. Most startup issues are caused by incorrect environment variables or missing permissions.

Models Are Missing

Confirm Ollama has downloaded at least one model (ollama list). If the list is empty, download a model (ollama pull llama3).

Best Practices

To keep your installation secure and reliable:

  • Use Docker volumes for persistent storage.
  • Keep Docker and OpenWebUI updated.
  • Back up your data regularly.
  • Use HTTPS if exposing OpenWebUI to the internet.
  • Monitor container logs for errors.
  • Limit administrator access to trusted users.

Frequently Asked Questions

Is OpenWebUI free?

Yes. OpenWebUI is an open-source project and can be used free of charge.

Can I use OpenWebUI without Ollama?

Yes. You can connect OpenWebUI to OpenAI-compatible APIs or other supported AI providers.

Does OpenWebUI support Windows?

Yes. It runs on Windows through Docker Desktop.

Can I install OpenWebUI without Docker?

Yes, but Docker is the recommended installation method because it simplifies deployment and updates.

How much RAM does OpenWebUI need?

OpenWebUI itself requires relatively little memory, but the total RAM needed depends on the AI model you run. A system with at least 8 GB of RAM is recommended for a smoother experience.


You may also like:

Conclusion

OpenWebUI is one of the best open-source interfaces for interacting with modern AI models. With Docker and Docker Compose, deployment is straightforward, while integration with Ollama enables a fully local and privacy-focused AI environment.

By following this guide, you’ve learned how to install OpenWebUI, connect it to AI models, secure your deployment, update the application, and maintain reliable backups. As your needs grow, you can expand your setup with reverse proxies, additional AI providers, and advanced configurations while keeping your data under your control.

Whether you’re experimenting with local AI or deploying an internal assistant for your organization, OpenWebUI provides a flexible and powerful foundation for self-hosted AI workflows.

Suresh S

Written by Suresh S

Systems Engineer & Tech Educator with 8+ years of experience in Linux Administration, Cloud Computing, and Cybersecurity. Founder of FreeTechLearner, dedicated to creating practical tutorials that help students and professionals build real-world skills.

Share this post:

Discussion

Loading comments...