
With Ollama and Open WebUI you can build a self-hosted AI environment on Linux that looks and feels like familiar AI chats. Ollama handles running and managing the language models. Open WebUI provides a modern web interface with chat history, model management, and additional AI features.
Here's what's interesting: if you use exclusively local models, requests can be processed directly on your own hardware. You don't necessarily need an external AI service for every question.
This guide walks you step by step through installing Open WebUI with Ollama on Linux and building your own local ChatGPT alternative.
What are Ollama and Open WebUI?
First, let's separate two things.
Ollama: the engine behind local AI
Put simply, Ollama is the runtime for your AI models. Among other things, Ollama handles:
- downloading models
- starting Large Language Models
- CPU and GPU usage
- model management
- a local API
- communication with other applications
The Ollama API runs locally on port 11434 by default. You can already use Ollama directly from the terminal, for example with ollama run gemma3. That works — but it's not particularly comfortable yet. That's exactly where Open WebUI comes in. For a full walkthrough of installing Ollama on Linux, setting up GPU support, and using the API, see Install Ollama on Linux: Run AI Locally (Read article).
Open WebUI: the graphical interface
Open WebUI is a self-hosted AI platform with a web interface. Among other things, it connects directly to Ollama and can use the models available there. Besides normal chat conversations, Open WebUI now supports numerous additional features such as model management, knowledge bases, tools, and connections to various external AI providers. For a broader look at how AI systems connect to tools and external services in a controlled way, see How MCP Connects AI Systems to Tools and Data (Read article) — relevant once you extend Open WebUI with such tool connections later on.
Simplified, the architecture looks like this:
Browser
|
v
Open WebUI
|
v
Ollama API
|
v
Local AI model
|
v
CPU / GPU / RAM
Ollama is the AI engine — Open WebUI is the cockpit.
Is Open WebUI + Ollama really a ChatGPT alternative?
Sort of. For the user, the combination can feel similar to ChatGPT: a chat window, chat history, multiple models, files and knowledge, system instructions, user management, extensions, and tools.
Technically, though, it is not a local clone of ChatGPT. ChatGPT is a complete AI service from OpenAI with its own models, its own infrastructure, and additional services. With Open WebUI + Ollama, you decide yourself which model gets used. The quality of your local AI therefore depends heavily on factors such as the model used, model size, quantization, available RAM, GPU and VRAM, context size, the prompt, and the task at hand. In exchange, you get far more control over your own infrastructure.
Why run AI locally?
Local AI is no longer just an experiment for developers.
1. More control over your data
With locally run Ollama models, prompts and responses are processed locally. Ollama explicitly states that for locally run models, prompts and data are not sent to Ollama; cloud models are a separate matter.
That can be interesting for internal documents, source code, company knowledge, IT documentation, logs, training material, private notes, and testing and development.
That said: local doesn't automatically mean compliant with privacy law or secure. Access rights, user accounts, backups, model licenses, and sensitive data still need to be administered properly.
2. No conventional per-request costs
With locally run models, you don't need an external API call for every single request. Instead, you pay indirectly through hardware, electricity, storage, administration, and possibly a GPU. That can be attractive, especially for frequent internal requests.
3. Choose your own models
You're not locked into a single model. Ollama manages various models, and Open WebUI can then expose them in its model selector through the Ollama connection. That lets you use different models for general questions, programming, summarization, analysis, and translation, for example.
4. AI on your own network
Open WebUI isn't limited to a single machine. It can, for example, run centrally on a Linux server and then be made available to multiple users inside a protected network. That effectively creates an internal AI chat for your own organization.
Requirements for Open WebUI and Ollama
This guide works well with Ubuntu, Debian, Linux Mint, or another current Linux distribution with Docker. You'll also need Ollama, Docker, enough system memory, enough free storage for models, and optionally an NVIDIA or AMD GPU.
A GPU is not strictly required. CPUs can run local models too. Larger models, however, benefit considerably from suitable GPU hardware.
Step 1: Install Ollama on Linux
If Ollama is already installed, you can skip this section. The official Linux installation currently uses:
curl -fsSL https://ollama.com/install.sh | sh
ollama -v
The official Ollama documentation still lists this installation method for Linux. On production or otherwise protected systems, always review installation scripts before running them with administrative rights.
Check the Ollama service
sudo systemctl status ollama
sudo systemctl start ollama
sudo systemctl enable ollama
The systemd integration is meant for permanent Linux operation. For a full step-by-step guide including GPU support, the API, and local-only mode, see Install Ollama on Linux: Run AI Locally (Read article).
Step 2: Install your first local AI model
Let's first test whether Ollama works at all:
ollama run gemma3
Alternatively, you can just download models first:
ollama pull gemma3
You can then check the available models:
ollama list
Which models suit you best mainly depends on your hardware and use case. A smaller model is often the better choice to get started.
Step 3: Install Open WebUI with Docker
Open WebUI supports several installation methods. The official documentation recommends Docker for most users. Python and Kubernetes variants also exist alongside it.
The standard Open WebUI container image is ghcr.io/open-webui/open-webui:main. Inside the container, the web interface runs on port 8080.
Option A: Ollama runs directly on the Linux host
For a local Linux machine, an especially useful option is Docker's host network. This lets Open WebUI reach Ollama through its local address without necessarily exposing Ollama across the whole LAN.
docker run -d \
--network=host \
-v open-webui:/app/backend/data \
-e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main
This option is also documented by Open WebUI as a solution for communication between Docker and an Ollama instance running on the host. You then reach Open WebUI at http://localhost:8080 — or, from your local network, through the server's IP address, provided your firewall and network access are configured accordingly.
Option B: Run Open WebUI on port 3000
The classic Docker installation looks like this:
docker run -d \
-p 3000:8080 \
-v open-webui:/app/backend/data \
--name open-webui \
ghcr.io/open-webui/open-webui:main
You then reach Open WebUI at http://localhost:3000. The open-webui Docker volume stores data persistently, so chat history and settings survive a normal container swap.
Step 4: Connect Ollama with Open WebUI
Open WebUI tries to detect an existing Ollama installation automatically. You can also manage the connection through the admin area: Admin Settings → Connections → Ollama. There you can manage Ollama instances and connect models.
If Ollama runs outside the Open WebUI container, you can use an address such as:
http://host.docker.internal:11434
With host networking, on the other hand, use:
http://127.0.0.1:11434
Problem: Open WebUI can't find Ollama
This is one of the most common issues with this setup. The usual cause is Docker network isolation. Inside a container, localhost initially refers to the container itself — not automatically to your Linux host. That quickly leads to messages such as Connection refused, or simply no models showing up. Open WebUI's official troubleshooting documentation explicitly calls out this networking issue.
Solution 1: Use the host network
--network=host
Then:
OLLAMA_BASE_URL=http://127.0.0.1:11434
For a purely local Linux install, this is often the simplest fix.
Solution 2: Use host.docker.internal
Open WebUI officially documents host.docker.internal mainly for Docker Desktop on macOS and Windows. On Linux, you can additionally wire up a host gateway so the same name resolves correctly:
--add-host=host.docker.internal:host-gateway
Open WebUI can then reach Ollama through http://host.docker.internal:11434.
Don't expose Ollama to the network unnecessarily
By default, Ollama binds to 127.0.0.1:11434. That's sensible from a security standpoint. The local Ollama API does not require authentication on localhost:11434. So don't simply set OLLAMA_HOST=0.0.0.0 without additional protection and then expose port 11434 publicly. That could let other reachable systems talk to the API. Port 11434 does not belong unprotected on the internet.
Step 5: Open Open WebUI
After the container starts successfully:
docker ps
You should see a container named open-webui. Then open, for example, http://SERVER-IP:8080, or http://SERVER-IP:3000 with the classic port mapping. The web interface appears.
The first user who registers on a new Open WebUI instance becomes the administrator. Subsequent registrations can be controlled by the admin area, or initially treated as pending.
Welcome to your own local AI
After logging in, your Ollama model should appear in the model selector. Pick, for example, the model you installed earlier and type: Explain Docker so that even a beginner understands it.
The request now flows: browser → Open WebUI → Ollama → local model → response. That's your own AI chat, up and running.
Matching product in my shop · German-language edition
MCP Server Practical Guide 2026
This German-language guide explores how to connect AI systems like Open WebUI to tools, data, and internal systems in a controlled way — including least privilege, security, and server administration.
Does the AI really run entirely locally?
That depends on how you configure your system. Ollama now supports both local models and optional cloud models. Cloud models don't run on your machine; they're processed through Ollama's cloud infrastructure.
If you deliberately want local-only operation, you can turn off cloud features. For example, via:
sudo systemctl edit ollama
Then:
[Service]
Environment="OLLAMA_NO_CLOUD=1"
Afterward:
sudo systemctl daemon-reload
sudo systemctl restart ollama
Ollama explicitly documents OLLAMA_NO_CLOUD=1 as a way to disable cloud models and cloud features. That reduces the risk of accidentally selecting a cloud model.
How secure is Open WebUI?
This is where things get important. As long as Open WebUI only runs on your machine or inside a protected LAN, the situation is relatively manageable.
As soon as you want to make Open WebUI reachable from the internet, you should treat it like any other internal web application. The Open WebUI documentation explicitly recommends protection such as a VPN, zero-trust access, a reverse proxy, IP allowlisting, rate limiting, and HTTPS for security-critical installations. Open WebUI shouldn't simply be placed on the internet with an open port. For a broader look at why you should critically question AI output and system access before acting on it unchecked, see Prompt Injection Explained: How Attackers Hijack AI Agents (Read article) — relevant once Open WebUI starts touching external content through tools or knowledge bases.
Run Open WebUI with HTTPS
For a production server, an architecture like this works well:
Internet
|
v
HTTPS
|
v
Nginx / HAProxy / Caddy
|
v
Open WebUI
|
v
Ollama
|
v
Local model
Open WebUI's documentation supports reverse-proxy scenarios with Nginx, Caddy, HAProxy, and private networks and tunneling systems, among others. HTTPS protects chat data, credentials, and uploaded files in transit.
Watch out for WebSockets
Open WebUI uses WebSockets for various real-time features and streaming. If you run Open WebUI behind Nginx, HAProxy, or another reverse proxy, you need to make sure WebSocket connections are forwarded correctly — in particular through properly set Upgrade and Connection headers and proxy_http_version 1.1 on Nginx.
If responses suddenly hang or the interface behaves oddly, check the WebSocket upgrade headers, the proxy configuration, CORS, and the HTTP version between proxy and backend. This matters especially on professional server installations.
Update Open WebUI
Updating containers is fairly simple. First:
docker rm -f open-webui
Then pull the current image:
docker pull ghcr.io/open-webui/open-webui:main
Then start the container again with the same parameters. Data stays in the open-webui volume and survives the container swap.
For production environments, the documentation also recommends pinning a specific version instead of using the floating :main tag. That makes deployments and rollbacks more reproducible.
Update Ollama
On Linux, you currently update Ollama by re-running the installation script:
curl -fsSL https://ollama.com/install.sh | sh
That matches the official Linux guide. Then:
ollama -v
sudo systemctl status ollama
Troubleshooting Ollama
If Ollama doesn't start:
sudo systemctl status ollama
For more detailed logs:
journalctl -e -u ollama
Ollama also documents this journalctl command for diagnosing the systemd service. For a structured way to analyze such error messages with ChatGPT, see Debug systemd Errors with ChatGPT: Using systemctl and journalctl the Right Way (Read article).
Matching product in my shop · German-language edition
AI in the Machine Room — or the Bible of Common Pitfalls
This German-language guide shows how to use AI tools safely for Linux and server administration, interpret log messages correctly, and avoid typical pitfalls when self-hosting.
Who is Open WebUI + Ollama for?
Individuals
Great for experimenting with local AI without necessarily needing a cloud provider for every conversation.
Developers
Local models can be used for programming, testing, prototyping, APIs, and automation. If you also want to use AI-assisted coding tools directly in the terminal, see Install and Use Codex CLI on Linux (Read article).
Administrators
Local AI systems get interesting for log analysis, documentation search, shell explanations, internal knowledge bases, and support. Of course, passwords, secrets, production credentials, and sensitive logs shouldn't be handed to a local AI unchecked either.
Businesses
A centralized Open WebUI installation can serve as an internal AI platform. Besides individual users, Open WebUI also supports more extensive user and team features. That lets an organization build its own AI infrastructure instead of having every employee use various AI services individually.
Open WebUI + Ollama vs. ChatGPT
| Feature | Open WebUI + Ollama | ChatGPT |
|---|---|---|
| Local models | Yes | No, not as a normal ChatGPT service |
| Own hardware | Yes | No |
| Offline operation | Possible with local models | No |
| Free choice of model | Many local models | OpenAI models |
| Web interface | Yes | Yes |
| Own server | Yes | No |
| Administration | Self-managed | Handled by provider |
| Hardware required | Yes | No |
| Maintenance | Self-managed | Provider |
| Cloud optional | Yes | Standard |
The two systems follow different concepts. ChatGPT is a finished cloud AI service. Open WebUI + Ollama is a self-operated AI platform.
Which one is better?
It depends on the use case. Cloud AI is especially practical if you want to start immediately, don't want to run your own hardware, need very capable models, and don't want to deal with updates and servers.
Local AI is interesting if you want more control over your data, already have your own infrastructure, want to work offline, want to test models, want to offer internal AI services, and want to reduce cloud dependencies.
In many professional environments, a deliberately chosen hybrid approach — rather than purely local or purely cloud — will likely be the interesting long-term option.
Your own AI has gotten easier
Just a few years ago, running a Large Language Model locally was a project for specialists. Today, getting started basically takes Linux, Ollama, Open WebUI, and a suitable model.
That turns an ordinary Linux machine into a surprisingly capable local AI workstation. And a Linux server can become a central internal AI platform.
Conclusion: Open WebUI and Ollama make local AI practical
Open WebUI and Ollama are currently one of the most interesting combinations for anyone who wants to run generative AI on their own Linux hardware.
Ollama takes care of the models. Open WebUI provides the comfortable interface. Docker simplifies installation and updates. And with suitable network and security configuration, you can build far more than a small AI experiment out of this.
If you start with only local models, you can run a personal AI assistant on your own machine. If you want to go further later, you can turn it into an internal AI platform with multiple users, knowledge bases, APIs, and additional tools.
Local AI no longer has to mean complicated research — it's increasingly becoming ordinary IT infrastructure.
FAQ: Open WebUI and Ollama on Linux
What is Open WebUI?
Open WebUI is a self-hosted web platform for AI models. Among other things, it can connect directly to Ollama and OpenAI-compatible APIs.
What is Ollama?
Ollama is a runtime that lets you run various AI language models locally and use them through a CLI or API.
Can I run my own ChatGPT alternative with Ollama?
Yes. Combined with an interface like Open WebUI, you get a chat system whose interaction model resembles familiar AI chats. It does not automatically use the same models or features as ChatGPT, though.
Do I need a GPU for Ollama?
No. Local models can also run on the CPU. A suitable GPU can speed up execution significantly, though.
Does Open WebUI run entirely locally?
Open WebUI itself can run entirely on your own infrastructure. Whether the AI processing also stays local depends on the model and providers you configure.
Can I use Ollama without internet access?
Already downloaded local models can be used offline. Downloads, updates, and cloud features require an internet connection. Cloud features can be disabled with OLLAMA_NO_CLOUD=1.
Which port does Ollama use?
Ollama uses port 11434 by default and binds to 127.0.0.1.
Which port does Open WebUI use?
Inside the official Docker container, Open WebUI uses port 8080. This is commonly published as port 3000 on the host.
Related topics
Install Ollama on Linux: Run AI Locally (Read article)
How MCP Connects AI Systems to Tools and Data (Read article)
Prompt Injection Explained: How Attackers Hijack AI Agents (Read article)
Install and Use Codex CLI on Linux (Read article)
Debug systemd Errors with ChatGPT: Using systemctl and journalctl the Right Way (Read article)
Sources and currency: Article status: August 2026. The technical review relied in particular on the current official documentation from Ollama and Open WebUI, including guidance on Docker installation, network connectivity between container and host, HTTPS reverse-proxy operation, and WebSocket configuration.