All posts
Self-Hosted·7 min read·Updated 18 Sept 2026

Self-Hosted LLM Guide (2026): Run Your Own ChatGPT with Ollama and Open WebUI

Quick answer
To self-host an LLM, install Ollama, pull an open-weight model that fits your memory with ollama run, then start Open WebUI in Docker on port 3000 for a ChatGPT-style interface. Everything runs on your machine, no data leaves it, and Open WebUI can serve several users with separate accounts.

Set up a self-hosted LLM in under 30 minutes: install Ollama, pull a model sized for your RAM, and run Open WebUI in Docker for a private ChatGPT-style interface your team can share.

Piyush Jangir
Verified author

Founder of StackPicks. Self-taught builder shipping open-source dev tools, marketing, and curator content since 2019. Based in Mumbai, India. Available on GitHub and LinkedIn.

7 min read
Self-Hosted LLM Guide (2026): Run Your Own ChatGPT with Ollama and Open WebUI

Short version: Ollama runs the model; Open WebUI gives it a ChatGPT-style interface. Two commands and one model download get you a private assistant on your own hardware. Commands below are copied from each project's README, checked on 18 September 2026.

Self-hosted LLM setup: Ollama plus Open WebUI in three steps

Step 1: Install Ollama

On macOS and Windows, download the app from ollama.com. On Linux:

curl -fsSL https://ollama.com/install.sh | sh

Ollama serves models on localhost:11434, with an API other tools can call.

Step 2: Pull a model that fits your memory

ollama run gemma4

That is the example in Ollama's own README. Choose the model by the memory you have, not by leaderboard: roughly 16GB handles a 7-8B model and 32GB a 30B-class model. Our guide to the best open-source LLMs to run locally covers which to pick.

Step 3: Run Open WebUI

Open WebUI runs in Docker and connects to Ollama on the host:

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

Open http://localhost:3000. The first account you create becomes the administrator.

Which Open WebUI Docker image to use

Variants worth knowing

  1. NVIDIA GPU: use the :cuda image with --gpus all.
  2. Everything in one container: the :ollama image bundles Ollama itself.
  3. Ollama on another machine: set OLLAMA_BASE_URL to its address.
  4. Add a hosted model too: pass OPENAI_API_KEY for an OpenAI-compatible provider.

Before you share it

Keep it on your local network, or put it behind HTTPS and your own authentication before exposing it to the internet. And remember that anything sent to a connected hosted provider leaves your network; keep sensitive work on the local models.

Frequently asked questions

Is a self-hosted LLM as good as ChatGPT?+

Not for the hardest tasks. Open-weight models that fit on a laptop or single GPU are very capable for drafting, summarising, answering questions over your documents and routine coding, but they trail frontier hosted models on complex reasoning and large multi-step work. Many teams self-host for private, everyday tasks and keep a hosted model for the hard ones.

How much does it cost to self-host an LLM?+

The software is free: Ollama is MIT-licensed and Open WebUI is free to run. The cost is hardware and electricity. A Mac with enough unified memory, or a PC with a mid-range GPU, handles 7B to 30B-class models for a small team. Cloud GPU rental is the alternative if you do not want to buy hardware, billed by the hour.

Can I use Open WebUI with ChatGPT or Claude as well?+

Yes. Open WebUI connects to any OpenAI-compatible endpoint, so you can add a hosted provider alongside your local Ollama models and switch per conversation. Its README includes a Docker command that takes an OPENAI_API_KEY. That lets a team use local models for private material and a hosted model when it genuinely needs more capability.

Is self-hosting an LLM private?+

The model runs on your hardware and prompts do not leave it, which is the main reason to do this. Privacy still depends on setup: if you expose Open WebUI to the internet, secure it with accounts and HTTPS, and if you also connect hosted providers, prompts sent to them leave your network. Keep sensitive work on the local models only.

Does Open WebUI support multiple users?+

Yes. It has user accounts, with the first account created becoming the administrator, and chat history is kept per user. That makes it practical for a small team or family on one server. For larger deployments, look at its role and permission settings and put it behind your organisation's authentication and HTTPS.

More in Self-Hosted

Self-Hosted LLM Guide (2026): Run Your Own ChatGPT with Ollama and Open WebUI — StackPicks — StackPicks