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
- A model is a file. When you use ChatGPT, the model runs on the company's servers. An "open-weights" model is one whose file you're allowed to download. It's usually a few gigabytes, and it holds everything the model learned. Once it's on your disk, you can use it offline.
- A runner loads that file and answers you. The model file can't do anything by itself. A program like Ollama or LM Studio loads it into your computer's memory and produces the replies. Loading a model means copying it into memory (RAM or graphics memory), so the model has to fit.
- GGUF and MLX are file formats. GGUF is the most common format for local models and works on Windows, Mac and Linux (it's what the llama.cpp engine uses). MLX is Apple's format for Macs with M-series chips and is often faster on those Macs. LM Studio runs both. Ollama handles the format for you, so you just type a model name.
- Quantization makes models smaller. It stores each number in the model with less precision, for example 4 bits instead of 16. A 4-bit version (often labeled Q4) is about a quarter of the size and loses only a little quality. That's why one model has several downloads of different sizes. Start with Q4 and go bigger if you have room.
- RAM vs VRAM. VRAM is the memory on a graphics card (GPU), and models run fastest there. On a Mac with an M-series chip, memory is shared, so a 32GB Mac can give most of that to the model. A simple rule: the download size of the model, plus a few GB to spare, has to fit in your GPU memory (or your Mac's memory) to run quickly.
- Why speed differs. If the whole model fits in VRAM, replies stream quickly. If part of it spills into regular RAM, it still works but runs much slower. Bigger models are smarter but slower. Longer conversations (the "context window") also use extra memory. In Ollama, the command
ollama psshows "100% GPU" when the model fits fully (Ollama FAQ).
The three tools and how they fit together
- Ollama is the engine. A free app for Mac, Windows and Linux that downloads and runs models. It runs quietly in the background and offers a local address,
http://localhost:11434, that other apps connect to. You mostly use it by typing short commands, and it also has a simple chat window. - Open WebUI is the ChatGPT-style screen. A free, self-hosted website that runs on your computer and looks like ChatGPT: chat history, file uploads, multiple users. It has no models of its own. It sits on top of Ollama (or any OpenAI-compatible service) and gives it a polished interface you open in your browser.
- LM Studio is the all-in-one desktop app. It finds, downloads and runs models and gives you a chat window, all in one app with no commands. It can also switch on a local server (port
1234by default) so other apps can use its models. LM Studio now ships with Bionic, its built-in agent.
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
| Ollama | LM Studio | Open WebUI | |
|---|---|---|---|
| What it is | Model engine (runs models) | All-in-one desktop app (engine + chat + server) | Browser chat interface (needs an engine) |
| Who it's for | Anyone connecting agents or coding tools to local models | Beginners who want everything point-and-click | People who want a ChatGPT-like experience, or to share one setup with others |
| Operating systems | macOS, Windows, Linux | macOS 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) |
| Ease | Easy: install, then one command per model | Easiest: no commands needed | Moderate: one Docker command, then point-and-click |
| Cost | Free for local models. Optional cloud plans from $20/mo | Free for local models. Optional Bionic+ cloud plan $20/mo | Free, self-hosted |
| Interface | Commands, plus a simple chat app | Full desktop app | Web page at localhost:3000 |
| API server | Always 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 formats | Its own library (handled for you) | GGUF and MLX (Mac) | Whatever the engine runs |
| Best use | Powering VS Code, Continue, OpenClaw, Hermes and other agents | Trying models and private chat on one computer | Daily 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?
- "I just want to try a local AI, no commands." Use LM Studio.
- "I want an agent or VS Code to use a local model." Use Ollama. Most agent tools on this site have built-in Ollama support. LM Studio's server also works with any tool that accepts an OpenAI-compatible address.
- "I want something that feels like ChatGPT, privately." Use Ollama plus Open WebUI.
- "I want my family or team to share one AI on one strong computer." Use Ollama plus Open WebUI on that computer. Open WebUI has user accounts and an admin.
- "I have a Mac with an M-series chip and want the most speed." Try LM Studio with an MLX model.
- "I have an Intel Mac." LM Studio doesn't support it; use Ollama.
Hardware tiers: what you can run
| Your computer | What to expect | Starter model (Ollama) |
|---|---|---|
| 8GB laptop | Small models for chat, summaries and simple questions. Agent tasks will be slow. | gemma4:e2b |
| 16GB laptop or Mac | Good everyday chat and writing; light coding help. | gemma4:e4b |
| 24GB to 32GB Mac, or a 24GB GPU | Strong models that handle agent and coding work well. | gemma4:26b |
| 64GB+ Mac, or multiple GPUs | The 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
- 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.
- Open Terminal (Mac: press Cmd+Space, type Terminal, press Enter) or PowerShell (Windows: open Start, type PowerShell, press Enter).
- Type
ollama run gemma4:e2band press Enter (on 16GB, usegemma4:e4b). You should see a download progress bar, then a>>>prompt. - Type a question and press Enter. The answer appears below, generated entirely on your computer. Type
/byeto exit. - 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
- 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.
- 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.
- 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.
- 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.
- Type a message and press Enter. Everything runs on your computer, and it works offline once the model is downloaded.
- To let other apps use it: open the Developer tab and switch on Start server. Its address is
http://localhost:1234/v1by 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.
- Set up Ollama first (steps above) and download at least one model.
- 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.
- Create a secret key (it keeps you logged in after updates). In Terminal, type
openssl rand -hex 32and copy the long result. On Windows without openssl, any long random string of letters and numbers works. - Paste this command, replacing
your-secret-keywith 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. - Wait a minute, then open
http://localhost:3000in 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. - 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:
- Ollama:
http://localhost:11434(OpenAI-compatible form:http://localhost:11434/v1) - LM Studio:
http://localhost:1234/v1(after you switch on the server)
| Agent | Easiest local setup | Source |
|---|---|---|
| VS Code Chat | Install the official Ollama extension and pick an Ollama model in the chat model picker | Ollama: VS Code |
| Continue | Choose "Autodetect" with Ollama running, or add Ollama models in its config | Continue: Ollama guide |
| OpenClaw | Ollama: 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 provider | OpenClaw: Ollama, OpenClaw: LM Studio |
| Hermes Agent | Run ollama launch hermes-desktop, or use its own Local Models screen. Any OpenAI-compatible server, such as LM Studio, works as a custom endpoint | Hermes: 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
- With a downloaded local model, your prompts and answers are processed on your machine. Ollama states that it doesn't see your prompts or data when you run locally.
- Ollama and LM Studio also sell optional cloud models. Those requests do leave your computer. To make Ollama local-only, set
OLLAMA_NO_CLOUD=1(see the Ollama FAQ). - By default Ollama only listens on your own computer (127.0.0.1). Don't expose it or Open WebUI to the internet without reading the official hardening guidance.
- Open WebUI stores chats and accounts in its own storage on your computer. A standard install still checks GitHub for updates, which you can switch off.
Troubleshooting
- Very slow replies: the model doesn't fit in GPU memory. Use a smaller model or a lower quantization (Q4).
- "Out of memory" or a model won't load: close other heavy apps, pick a smaller model, or reduce the context length.
- An app can't connect to Ollama: make sure the llama icon is showing, then run
ollama listin a terminal. If it lists your models, Ollama is running and the app should usehttp://localhost:11434. - An app can't connect to LM Studio: the server is off by default. Switch on Start server in the Developer tab and load a model.
- Agent writes code-like text instead of acting: the model doesn't support tool calling, or the address is wrong (OpenClaw wants Ollama's address without
/v1). - Open WebUI logs you out after every update: you didn't set a fixed
WEBUI_SECRET_KEY. Recreate the container with one.
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.