Guide · updated 2026-11-13
How to self host Open WebUI with Ollama on your own computer
Set up Open WebUI with Ollama on your own computer or a second machine, fix the cannot reach Ollama error, and keep the chat window private on your network.
Install Ollama, pull one model, then start Open WebUI in Docker with the command from its own documentation and open http://localhost:3000 in your browser. The first account you create there becomes the administrator. Setups fail in two predictable places. The first is the address Open WebUI uses to reach Ollama: inside a Docker container, localhost means the container itself, not your computer, so the address has to be host.docker.internal. The second is who else can open the page. Docker publishes the port to your whole network unless you tell it not to, and the first person to sign up gets the administrator account. The steps below cover one computer first, then a second machine, then a fix table for the connection error and a privacy checklist.
What do Open WebUI and Ollama each do?
Ollama downloads open models and runs them on your computer. It listens for requests on port 11434 and, out of the box, only accepts requests from the same computer.
Open WebUI is the chat window. It runs in your browser, keeps your chat history, handles accounts, and sends each message to a model. It does not run models itself. It talks to Ollama, or to a hosted model service if you add one.
So you install two things, and the only link between them is one web address. When that address is wrong, Open WebUI loads fine but shows no models. For a side by side of what each one does, see Ollama vs Open WebUI.
What do you need before you start?
- A Mac, Windows or Linux computer with enough memory for the model you want. The guide to how much VRAM a local model needs has the sizes.
- Ollama installed and one model pulled. The guide to running an LLM on your laptop walks through that for each system.
- Docker. Docker Desktop on Mac and Windows, or Docker Engine on Linux. Docker is the route the Open WebUI documentation puts first, and it keeps the install in one container you can remove cleanly.
- If you would rather not use Docker, Python 3.11 or 3.12. Open WebUI does not support Python 3.13.
Check that Ollama is running and has a model before you touch Open WebUI:
ollama list
If that prints at least one model, the Ollama half is done.
How do you set it up on one computer?
This is the setup where Ollama and Open WebUI live on the same machine.
Start Open WebUI with the command from the Open WebUI quick start, with one change:
docker run -d -p 127.0.0.1:3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data -e WEBUI_SECRET_KEY=change-me --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Then:
- Note the change,
127.0.0.1:in front of3000:8080. The documented command uses-p 3000:8080, and Docker then publishes the port on every network address your computer has. With the127.0.0.1prefix, only this computer can open the page. Leave it out only if you want other devices to reach it, which the privacy section covers. - Replace
change-mewith a long random string of your own and keep a copy. The quick start says to keep the same value across updates so you stay logged in. - Open
http://localhost:3000. Create your account straight away. That first account becomes the administrator, and creating it switches new sign ups off. - Pick a model from the list at the top of the chat. Open WebUI shows the models Ollama already has, so an empty list with no error usually means Ollama has no models yet.
The --add-host=host.docker.internal:host-gateway part is what lets the container find Ollama on your computer. Keep it on every system. The -v open-webui:/app/backend/data part stores your chats and settings in a Docker volume, so they survive when the container is replaced.
Without Docker. Install with Python and start the server:
pip install open-webui
open-webui serve
That version runs at http://localhost:8080 and reaches Ollama on the same computer without any extra address setting, because nothing sits between them.
One container for both. Open WebUI also publishes an image with Ollama built in, tagged ollama instead of main. It saves one install, but your models then live in a Docker volume rather than in your normal Ollama folder, so models you already downloaded are not shared with it.
How do you connect Open WebUI to Ollama on another machine?
A common layout is a desktop with a graphics card running Ollama, and a laptop or small server running Open WebUI. Two settings change.
On the machine running Ollama, make it listen on the network. Ollama only listens on 127.0.0.1 until you set OLLAMA_HOST. The Ollama FAQ gives the method for each system:
- macOS: run
launchctl setenv OLLAMA_HOST "0.0.0.0:11434", then quit and restart the Ollama app. - Linux: run
systemctl edit ollama.service, addEnvironment="OLLAMA_HOST=0.0.0.0:11434"under[Service], then runsystemctl daemon-reloadandsystemctl restart ollama. - Windows: quit Ollama, add
OLLAMA_HOSTwith the value0.0.0.0:11434to your user environment variables, then start Ollama again.
On the machine running Open WebUI, point it at the Ollama machine's local address with OLLAMA_BASE_URL, written with http:// and the port:
docker run -d -p 127.0.0.1:3000:8080 -e OLLAMA_BASE_URL=http://192.168.1.50:11434 -v open-webui:/app/backend/data -e WEBUI_SECRET_KEY=change-me --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Replace 192.168.1.50 with the address of your Ollama machine. Giving that machine a fixed address in your router's settings stops the link breaking when the address changes.
Setting OLLAMA_HOST to 0.0.0.0 means any device on your network can send requests to Ollama directly, without going through Open WebUI and its accounts. The Ollama documentation describes no sign in for that port, so on a shared network, limit it with the computer's firewall to the one machine running Open WebUI.
Why does Open WebUI say it cannot reach Ollama?
The usual cause is the address Open WebUI is using, or Ollama not listening where Open WebUI is looking. Work down this table from the top. The causes and settings come from the Open WebUI connection troubleshooting page and the Ollama FAQ.
| What you see | Likely cause | Setting to check |
|---|---|---|
| Open WebUI loads, the model list is empty, a connection error shows in settings | The address is http://localhost:11434. Inside the container, localhost is the container, not your computer | Use http://host.docker.internal:11434, and start the container with --add-host=host.docker.internal:host-gateway |
A command without --add-host works on a Mac but not on Linux | Without the flag, the name host.docker.internal may not resolve on Linux | Add the flag, or run with --network=host and OLLAMA_BASE_URL=http://127.0.0.1:11434. With host networking the page moves to http://localhost:8080 |
| Ollama is on another machine and the connection is refused | Ollama is still listening on 127.0.0.1 only | Set OLLAMA_HOST=0.0.0.0:11434 on that machine and restart Ollama |
You changed OLLAMA_BASE_URL and Open WebUI still uses the old address | An address saved in Admin Settings, Connections, is stored in Open WebUI's database and takes precedence over the environment variable | Fix the address in Admin Settings, Connections. Or start once with RESET_CONFIG_ON_START=true, which replaces saved settings with the environment values |
| Connected, no error, still no models | Ollama has no models downloaded | Run ollama list, then ollama pull a model |
| You use Podman instead of Docker | Podman uses a different name for the host | Use http://host.containers.internal:11434 |
The address has no http:// or ends in a slash | Open WebUI cannot read the address | Write it as http://name:11434 with nothing after the port |
To test the path from the Open WebUI side, open http://localhost:11434/api/tags in a browser on the Ollama machine. A page of model details in JSON means Ollama is up. If that works and Open WebUI still shows nothing, the problem is the address, and the first four rows cover it.
Who else on your network can open it?
With the commands copied as published, more people than you might expect. Docker's own port publishing documentation says a published port is open to all host addresses by default, and calls that insecure by default. On a home network that means anyone on your Wi Fi, including guests, can load the sign in page. If you have not created an account yet, the first one to do it becomes the administrator.
Run through this checklist once after setup:
- Publish to
127.0.0.1if only you use it. Use-p 127.0.0.1:3000:8080, as in the setup above. On Docker releases older than 28.0.0, devices on the same local network can still reach a port published to127.0.0.1, so update Docker too. - Create the administrator account the moment the container starts. Creating it switches new sign ups off.
- Leave new sign ups off unless you are adding people. When you turn them on, new accounts wait in a Pending state with no access until you approve them, unless the default user role has been changed to user.
- Keep Ollama on
127.0.0.1unless another machine needs it. If it does, allow only that machine through the firewall. - Do not forward the port on your router. For use away from home, Open WebUI's guide to sharing an instance points to a private network such as Tailscale, or a reverse proxy with HTTPS on your own domain.
- Turn off Community Sharing in Admin Settings, General, if you do not want chats shareable outside your install.
How do you keep both up to date?
Open WebUI in Docker. Your chats live in the open-webui volume, so the container can be replaced safely. Stop and remove it, pull the new image, then start it with the same command you used before, including the same WEBUI_SECRET_KEY:
docker rm -f open-webui
docker pull ghcr.io/open-webui/open-webui:main
The Open WebUI quick start also gives a one off Watchtower command that does the same for you.
Open WebUI with Python. Run pip install -U open-webui, then start it again with open-webui serve.
Ollama. On macOS and Windows it downloads updates by itself. Click its menu bar or taskbar icon and choose Restart to update. On Linux, run the install script again.
Models. Run ollama pull with the model's name to fetch its latest version.
Frequently asked questions
Do I need Docker to run Open WebUI?
No. pip install open-webui followed by open-webui serve runs it with Python 3.11 or 3.12, at http://localhost:8080. Docker is the documented first choice because the install stays in one container and updates are a pull and restart.
Can Open WebUI use a hosted model as well as a local one?
Yes. Add the provider's address and API key under Admin Settings, Connections. Its models then appear in the same list as your Ollama models, and you pick one per chat. Messages sent to a hosted model leave your computer and go to that provider.
Is a self hosted chat window really private?
Chats with an Ollama model stay on the machines you run, as long as the page and Ollama are not open to people you did not intend. The privacy checklist above covers that. A hosted model connection sends each message to that provider, so privacy then depends on its terms.
Can several people share one Open WebUI install?
Yes. Turn new sign ups on, have each person register, and approve them from the admin panel. Each account has its own chats. Other people reach it at your computer's local address and port, for example http://192.168.1.20:3000, which means publishing the port beyond 127.0.0.1, so keep the rest of the checklist in place.
Before you install
Open WebUI is one of several open source ways to run models on your own computer. Check the open source options for running LLMs locally first, each with one reason for and one against, scored nightly from public signals. For a general purpose chat assistant of any kind, local or hosted, see the general assistant use-case page.