Open WebUI with Docker Compose
Open WebUI needs no external database and no bundled model. It keeps everything β accounts, chats, uploaded documents and the vector index β in /app/backend/data, and it talks to whatever model backend you point it at: a local Ollama server through OLLAMA_BASE_URL, or any OpenAI-compatible API through OPENAI_API_BASE_URL and OPENAI_API_KEY.
Before using the one-click template, here is a minimal Docker Compose example for self-hosting Open WebUI.
If you're new to Docker Compose, check out our guide on how to self-host a Docker Compose app. More stacks are in our Docker Compose library.
Self-host Open WebUI with Docker Compose (minimal)β
services:
open-webui:
image: ghcr.io/open-webui/open-webui:main
ports:
- "8080:8080"
environment:
# point at an OpenAI-compatible API...
OPENAI_API_BASE_URL: https://api.openai.com/v1
OPENAI_API_KEY: sk-changeme
# ...or at your own Ollama server instead
# OLLAMA_BASE_URL: http://ollama:11434
volumes:
- open-webui:/app/backend/data
volumes:
open-webui:
Open WebUI is memory-hungry: the built-in retrieval features load an embedding model into the container. Give it at least 2 GB of RAM before adding documents.
Deploy Open WebUI on Hostim.dev (one-click)β
Open WebUI is a self-hosted chat interface for large language models. It runs in the browser, supports multiple users with roles, keeps chat history on your own server, and can query local models over Ollama or hosted models over any OpenAI-compatible endpoint. With Hostim.dev you get it with a persistent volume, a domain and HTTPS in one click.
π€ Your own chat UI, your own history β the model provider is your choice.
Guest project runs for 1 hour. Log in to save and extend to 5 days.
Why host Open WebUI on Hostim.dev?β
- One-click Docker deployment
- Persistent volume at
/app/backend/datafor accounts, chats and documents - Automatic HTTPS and domain
- Real-time logs and metrics
- Scale the plan up when retrieval or many users make it heavier
What's includedβ
| Resource | Details |
|---|---|
| App | ghcr.io/open-webui/open-webui:main image |
| Volume | /app/backend/data |
| Domain | Free *.hostim.dev subdomain |
| SSL | Let's Encrypt (auto-enabled) |
| Port | 8080 |
How to Deployβ
- Go to your Hostim.dev dashboard.
- Click Create Project β Use a Template.
- Select OpenWebUI.
- Choose a resource plan β this app is resource-intensive, so pick a larger one if it feels unstable.
- Deploy.
First steps after deployβ
- Create the first account. The first user to sign up becomes the administrator, so do this immediately after the deploy finishes.
- Connect a model backend. Under Settings β Connections, add an OpenAI-compatible API key and base URL, or the address of your Ollama server. Without one, the interface loads with no models to pick.
- Close signups under Admin Panel β Settings if the instance is only for you.
Frequently asked questions
Does Open WebUI need a separate database?
No. Open WebUI stores accounts, chat history, uploaded documents and its vector index in /app/backend/data, using an embedded database. PostgreSQL can be configured for larger installations, but a single container with one persistent volume is a complete deployment.
What is the minimal docker-compose.yml for Open WebUI?
One service running ghcr.io/open-webui/open-webui:main with port 8080 published and a named volume mounted at /app/backend/data. Add either OLLAMA_BASE_URL for a local Ollama server or OPENAI_API_BASE_URL plus OPENAI_API_KEY for a hosted OpenAI-compatible API.
Does Open WebUI include a model?
No. Open WebUI is only the interface. It needs a model backend: an Ollama server running the models locally, or any OpenAI-compatible API endpoint with a key. Until one is connected, the interface starts but the model list is empty.
Can Open WebUI run without Ollama?
Yes. Set OPENAI_API_BASE_URL and OPENAI_API_KEY to any OpenAI-compatible provider and Open WebUI uses that instead. Ollama is one supported backend, not a requirement, which is what makes it practical to run the interface on a small server.
How much RAM does Open WebUI need?
At least 2 GB for the interface itself, because the built-in retrieval features load an embedding model inside the container. Running the language models locally needs far more and should happen on a separate Ollama host, not in the same container.
Where does Open WebUI store chat history?
In /app/backend/data, inside the embedded database. Uploaded documents and the vector index for retrieval live in the same directory. That one volume holds all state, so losing it loses every account and conversation.
How do I back up Open WebUI?
Copy the /app/backend/data volume. It contains the database, the uploaded files and the vector index. There is nothing of value outside it, so a snapshot of that volume is a complete backup.
How do I update Open WebUI?
Run docker compose pull and then docker compose up -d to move to the newest image. On Hostim, redeploy the app. Migrations run on boot and the /app/backend/data volume is untouched, so accounts and chats are kept.
Alternativesβ
- LibreChat β multi-provider chat UI with plugins
- AnythingLLM β document-centric chat with built-in RAG workspaces
- Lobe Chat β lightweight chat interface with a plugin store
Source + Docsβ
- GitHub: https://github.com/open-webui/open-webui
- Documentation: https://docs.openwebui.com
Looking for something else? Browse all templates β