Learning path · Local models

Run AI models on your own computer: Ollama, LM Studio and Open WebUI

You can run a capable AI model on a laptop, with no subscription and nothing sent to the cloud. This guide explains how it works in plain English, which of the three most popular tools to use, and exactly how to set each one up.

Checked October 15, 2026 against the official docs at ollama.com, lmstudio.ai and docs.openwebui.com. Every step links to its source.

On this page: How local models work · The three tools · Comparison table · Which should you use? · Hardware tiers · Set up Ollama · Set up LM Studio · Set up Open WebUI · Connect to agents · Privacy · Troubleshooting · FAQ

How local models work, in plain English

The three tools and how they fit together

Typical combinations: LM Studio alone (simplest). Ollama alone (simplest engine for agents and coding tools). Ollama + Open WebUI (the best ChatGPT-like experience, or a shared AI for a household or team).

Comparison table

OllamaLM StudioOpen WebUI
What it isModel engine (runs models)All-in-one desktop app (engine + chat + server)Browser chat interface (needs an engine)
Who it's forAnyone connecting agents or coding tools to local modelsBeginners who want everything point-and-clickPeople who want a ChatGPT-like experience, or to share one setup with others
Operating systemsmacOS, Windows, LinuxmacOS 14+ on Apple Silicon (no Intel Macs), Windows (x64 with AVX2, or ARM), Linux (Ubuntu 20.04+)macOS, Windows, Linux (runs in Docker or Python)
EaseEasy: install, then one command per modelEasiest: no commands neededModerate: one Docker command, then point-and-click
CostFree for local models. Optional cloud plans from $20/moFree for local models. Optional Bionic+ cloud plan $20/moFree, self-hosted
InterfaceCommands, plus a simple chat appFull desktop appWeb page at localhost:3000
API serverAlways on at localhost:11434 (OpenAI-compatible at /v1)Toggle in the Developer tab, localhost:1234 (OpenAI-compatible at /v1)Connects to servers; not an engine
Model formatsIts own library (handled for you)GGUF and MLX (Mac)Whatever the engine runs
Best usePowering VS Code, Continue, OpenClaw, Hermes and other agentsTrying models and private chat on one computerDaily private chat with history, documents and multiple users

Sources: Ollama API, Ollama pricing, LM Studio system requirements, LM Studio pricing, LM Studio OpenAI compatibility, Open WebUI quick start.

Which should you use?

Hardware tiers: what you can run

Your computerWhat to expectStarter model (Ollama)
8GB laptopSmall models for chat, summaries and simple questions. Agent tasks will be slow.gemma4:e2b
16GB laptop or MacGood everyday chat and writing; light coding help.gemma4:e4b
24GB to 32GB Mac, or a 24GB GPUStrong models that handle agent and coding work well.gemma4:26b
64GB+ Mac, or multiple GPUsThe largest open models; close to cloud quality for many tasks.See the model picker

Model sizes are from the official Ollama library page. For coding, image, video and voice models by tier, see the model picker. The newsletter's weekly local model pick uses these same tiers.

Set up Ollama, step by step

  1. Go to ollama.com/download, choose macOS, Windows or Linux, and install it like any app. You should see a llama icon in your menu bar (Mac) or system tray (Windows). Ollama starts automatically when you log in.
  2. Open Terminal (Mac: press Cmd+Space, type Terminal, press Enter) or PowerShell (Windows: open Start, type PowerShell, press Enter).
  3. Type ollama run gemma4:e2b and press Enter (on 16GB, use gemma4:e4b). You should see a download progress bar, then a >>> prompt.
  4. Type a question and press Enter. The answer appears below, generated entirely on your computer. Type /bye to exit.
  5. Useful commands: ollama list (models you have), ollama ps (what's loaded and whether it's on the GPU), ollama stop gemma4:e2b (free up memory).

If it doesn't work: "command not found" means Ollama isn't running or the install didn't finish; open the Ollama app, then open a new terminal window. If replies are very slow, run ollama ps: anything other than "100% GPU" means the model is too big for your graphics memory, so pick a smaller one. Sources: Ollama quickstart, Ollama FAQ.

Set up LM Studio, step by step

  1. Check your computer: a Mac with an M-series chip on macOS 14 or newer, a Windows PC (16GB RAM recommended), or Linux (Ubuntu 20.04+). Intel Macs aren't supported.
  2. Go to lmstudio.ai, click the download button for your system and install it. You should see the app open with a sidebar on the left.
  3. Click the Discover tab (the magnifying glass). Pick one of the suggested models or search by name, for example "Gemma". Pick a size well under your computer's memory (see the hardware tiers). Click Download.
  4. Click the Chat tab, open the model loader at the top, and choose the model you downloaded. You should see a loading bar, then the model name at the top of the chat.
  5. Type a message and press Enter. Everything runs on your computer, and it works offline once the model is downloaded.
  6. To let other apps use it: open the Developer tab and switch on Start server. Its address is http://localhost:1234/v1 by default (you can change the port in Server Settings).

If it doesn't work: if a model fails to load, it's too big for your memory; choose a smaller download (a lower Q number) or reduce the context length in the load settings. On an 8GB Mac, stick to small models and short chats. Sources: LM Studio: get started, LM Studio: local server, LM Studio: offline operation.

Set up Open WebUI on top of Ollama, step by step

What Docker is, simply: Docker runs an app inside a sealed box (a "container") with everything it needs already packed in, so you don't have to install its parts yourself. Open WebUI's official docs recommend Docker for most people. You install Docker Desktop once, paste one command, and Open WebUI appears as a web page on your computer.

  1. Set up Ollama first (steps above) and download at least one model.
  2. Install Docker Desktop for your system and open it. You should see the Docker whale icon in your menu bar or system tray, and Docker Desktop saying the engine is running. On Windows, choose the "WSL 2" option when the installer asks.
  3. Create a secret key (it keeps you logged in after updates). In Terminal, type openssl rand -hex 32 and copy the long result. On Windows without openssl, any long random string of letters and numbers works.
  4. Paste this command, replacing your-secret-key with your key, and press Enter:
    docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data -e WEBUI_SECRET_KEY=your-secret-key --name open-webui --restart always ghcr.io/open-webui/open-webui:main
    In plain English: start Open WebUI in the background, show it on port 3000, let it reach Ollama on your computer, save your chats in a storage area called "open-webui", and restart it automatically after a reboot. The first download is about 1.6GB.
  5. Wait a minute, then open http://localhost:3000 in your browser. You should see "Get started with Open WebUI" and a Create Admin Account button. The first account becomes the administrator, and it's stored only on your computer.
  6. Click New Chat, choose your Ollama model in the selector, type a message and press Enter. You can drop a file into the chat to ask questions about it.

No Docker? Open WebUI also installs with Python 3.11 (pip install open-webui, then open-webui serve; it opens at http://localhost:8080), and there's a desktop app. For the simplest path, LM Studio needs neither.

If it doesn't work: page won't load? Run docker logs -f open-webui and wait for "Application startup complete". Port 3000 taken? Change the first number in -p 3000:8080. No models in the list? Go to your avatar, then Settings → Admin → Connections and check the Ollama connection is http://host.docker.internal:11434; if Ollama runs on Linux, it may need to listen on all addresses. Sources: Open WebUI quick start.

Connect your local models to agents

Agents and coding tools talk to a local runner through a local web address, called an API endpoint. The two to remember:

AgentEasiest local setupSource
VS Code ChatInstall the official Ollama extension and pick an Ollama model in the chat model pickerOllama: VS Code
ContinueChoose "Autodetect" with Ollama running, or add Ollama models in its configContinue: Ollama guide
OpenClawOllama: choose Ollama, then "Local only" during onboarding (address http://127.0.0.1:11434, no /v1). LM Studio: start the server on port 1234 and pick the LM Studio providerOpenClaw: Ollama, OpenClaw: LM Studio
Hermes AgentRun ollama launch hermes-desktop, or use its own Local Models screen. Any OpenAI-compatible server, such as LM Studio, works as a custom endpointHermes: local models

Full click-by-click steps for each agent are in Local AI agents: OpenClaw, Hermes Desktop and VS Code. Agents need a model that supports tool calling and a context window of at least 64K tokens. Ollama's default is 4,096, so raise it in Ollama's settings (context length).

Privacy: what stays on your computer

Troubleshooting

FAQ

Is a local model as good as ChatGPT or Claude? The biggest open models come close on many tasks, but the ones that fit on a laptop are noticeably weaker at hard reasoning and long agent tasks. They're excellent for private chat, summaries, drafting and simple coding.

Do I need a graphics card? No. Macs with M-series chips run models well with shared memory. On Windows and Linux, a GPU with enough VRAM makes a big speed difference; without one, small models still run on the processor, just slower.

Can I use Ollama and LM Studio at the same time? Yes. They use different ports (11434 and 1234). Each needs its own copy of a model, and both use memory when loaded.

Does it work offline? Yes, once a model is downloaded, all three work without internet.

Where are Ollama's models stored? On Mac in ~/.ollama/models, on Windows in C:\Users\your-name\.ollama\models.

Is it really free? Running local models in all three tools costs nothing. You only pay if you choose their optional cloud plans.

Keep going