pull/this/repo
RoundupAI agent skills#local-ai#self-hosting#how-to#open-source

Self-hosted LLM: how to run AI models on your own computer

By Pull This RepoPosted 5 min read

Short answer

To run a self-hosted LLM, install Ollama, which is MIT licensed, with its one-line installer, then run a model such as ollama run gemma4. Add Open WebUI for a ChatGPT-style chat page in your browser. For more control use llama.cpp. LM Studio is a free desktop app, but it is not open source.

RoundupSelf-hosted LLM: how to run AI models on your own computer

A self-hosted LLM is a large language model that runs on your own computer or server instead of a company's cloud. Your prompts never leave the machine, there is no subscription, and it keeps working offline. The easiest way in is Ollama, an MIT licensed runner, plus Open WebUI for a chat window. This guide covers how to install both, when to use llama.cpp or LM Studio instead, and which open-weight models to try, with every command and number read from the projects' own pages on 22 November 2026.

Which tools do you need for a self-hosted LLM?

ToolWhat it doesLicenceStars on 22 Nov 2026Latest release
Ollamadownloads and runs models, with an API on port 11434MIT187,845v0.40.17 (10 Nov 2026)
Open WebUIChatGPT-style chat page for Ollama and other APIsOpen WebUI License (BSD-3 based, with a branding clause)159,258v0.13.4 (17 Nov 2026)
llama.cppthe C/C++ inference engine many tools build onMIT136,063v1.0.0 (13 Nov 2026)
LM Studiodesktop app with a model browserfree, own terms of use, not open sourcenot on GitHub0.4.28 listed for Windows

For most people: Ollama to run models, Open WebUI to chat with them. Use llama.cpp if you want the engine itself, and LM Studio if you want a point-and-click app and do not mind closed source.

How do you install Ollama?

Ollama's README gives one command per system.

On macOS or Linux:

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

On Windows, in PowerShell:

powershell
irm https://ollama.com/install.ps1 | iex

There are also manual downloads (a .dmg and OllamaSetup.exe) and an official Docker image, ollama/ollama. Ollama's docs list macOS Sonoma (v14) or newer, and Windows 10 22H2 or newer, Home or Pro. On Windows the install needs no administrator rights and at least 4 GB of disk for the program, plus space for models, which the docs say can be tens to hundreds of GB.

Then pull and chat with a model:

terminal
ollama run gemma4

The first run downloads the model. After that, Ollama also serves a local REST API at http://localhost:11434, which is how other apps, including agents, talk to it.

How do you add a chat interface with Open WebUI?

Open WebUI gives you a ChatGPT-style chat page in your browser that talks to Ollama or any OpenAI-compatible API. The official quick start uses Docker:

terminal
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

Swap your-secret-key for the output of openssl rand -hex 32. Open http://localhost:3000 and create the first account, which becomes the administrator. Its README also lists a Python route:

terminal
pip install open-webui
open-webui serve

That one uses Python 3.12 and opens on http://localhost:8080. There is a :ollama image tag that bundles Ollama inside the same container, and --gpus all gives Nvidia cards to it if you have the Nvidia Container Toolkit.

One licence point: Open WebUI's licence forbids removing its branding on deployments with more than 50 users in any 30 day period, unless you have written permission or an enterprise licence. For a home setup that never matters.

When should you use llama.cpp instead?

llama.cpp is the engine underneath much of local AI, and it reached v1.0.0 on 13 November 2026. Use it directly if you want fine control over settings or a small footprint on a server. The README's quick start:

terminal
curl -LsSf https://llama.app/install.sh | sh

On Windows PowerShell, irm https://llama.app/install.ps1 | iex. Then download and run a model straight from Hugging Face, or start an OpenAI-compatible API server:

terminal
llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF

Pre-built binaries, Docker images and build-from-source guides are on the GitHub page. llama.cpp runs models in the GGUF format.

Is LM Studio open source?

No. LM Studio's download page lists it for macOS, Windows and Linux at a price of zero, "available under the terms of use", and it says the app runs on llama.cpp and MLX under the hood. The engines are open source; the app is not. It is a fine choice if you want a polished app, but if open source matters to you, use Ollama or llama.cpp.

What are the best self-hosted LLM models to try?

These open-weight families all run in Ollama. Licences come from each model's Hugging Face card or Ollama page; sizes are Ollama download sizes. Ollama's pages give no official RAM figure except for gpt-oss.

Model familyLicenceOllama tags and download sizeNotes from the model page
Gemma 4 (Google DeepMind)Apache 2.0e2b 4.6 to 7.5 GB, e4b 6.6 to 9.5 GB, 26b 16 to 19 GB, 31b 19 to 20 GBsmall tags designed for laptops; text and image input
Qwen 3.5Apache 2.00.8b 1.2 GB, 4b 3.3 to 4.0 GB, 9b 6.6 to 7.6 GB, 27b 17 to 20 GB, 122b 81 GBwidest size range here
gpt-ossApache 2.020b 14 GB, 120b 65 GB20b runs with as little as 16 GB of memory; 120b fits a single 80 GB GPU
DeepSeek-R1MIT (distills keep Qwen or Llama terms)1.5b 1.1 GB, 8b 5.2 GB, 14b 9.0 GB, 32b 20 GB, 671b 404 GBreasoning model
Llama 3.1 (Meta)Llama 3.1 Community License8b 4.9 GB, 70b 43 GB, 405b 243 GBcustom licence with its own conditions

A simple rule from those numbers: the model file has to fit in memory with room left for your system. On a 16 GB laptop, start with a tag under about 8 GB, such as qwen3.5:4b or gemma4:e4b. If you have a GPU, the more of the model that fits in its VRAM, the faster it runs.

Can a self-hosted LLM power an agent?

Yes. Ollama's API is what most self-hosted agents connect to for local models. See our roundup of self-hosted AI agents for OpenClaw, OpenHands and n8n's starter kit. If you just want a free chat app and do not care where it runs, our list of free ChatGPT alternatives covers hosted options too. For a dedicated box to run it on, our guide to installing Proxmox turns a spare PC into a home server.

What is the catch?

  • Smaller than the cloud. The models that fit on normal hardware are smaller than the biggest hosted ones, so expect more mistakes on hard tasks.
  • Speed depends on hardware. Without a GPU, or on a large model, answers come slowly.
  • Disk fills up. Each model is a multi-gigabyte download. Remove ones you no longer use with ollama rm.
  • Cloud tags are not local. Ollama lists cloud tags, such as gemma4:cloud, that run on its servers. Skip them if privacy is the point.
  • Licences vary. Apache 2.0 and MIT models are simple. Llama's licence has its own rules, so read it before commercial use.

Pull it. Stash it.

Questions people ask

What is the best self-hosted LLM?

There is no single best one; it depends on your memory. Gemma 4, Qwen 3.5 and gpt-oss are Apache 2.0 licensed open-weight families with sizes from about 1 GB to over 60 GB on Ollama. Start with a small tag, check the speed, then move up if your machine copes.

How much RAM do I need to run an LLM locally?

Roughly enough to hold the model file, plus room for your system. Ollama's library lists download sizes for each tag, and gpt-oss's page says its 20B model runs on systems with as little as 16 GB of memory. Most model pages give no official RAM figure, so test with smaller tags first.

Is Ollama free and open source?

Yes. The ollama/ollama repository is MIT licensed and runs models on macOS, Windows and Linux at no cost. Ollama also offers optional cloud models, marked with a cloud tag, which run on its servers rather than on your machine.

Is LM Studio open source?

No. LM Studio is a free download for macOS, Windows and Linux, offered under its own terms of use, but the app's source code is not published under an open source licence. It uses llama.cpp and MLX under the hood, which are open source.

Does a self-hosted LLM send my data anywhere?

Not when the model runs locally. The prompts and answers stay on your machine. The exception is any cloud model tag or web search tool you turn on, which sends your request out, so check what each model or plugin does.

Sources

  1. 1ollama/ollama
  2. 2Ollama library: gemma4 (read 2026-11-22)
  3. 3Ollama library: qwen3.5 (read 2026-11-22)
  4. 4Ollama library: gpt-oss (read 2026-11-22)
  5. 5Ollama library: llama3.1 (read 2026-11-22)
  6. 6Ollama library: deepseek-r1 (read 2026-11-22)
  7. 7open-webui/open-webui
  8. 8Open WebUI docs: Quick Start (read 2026-11-22)
  9. 9ggml-org/llama.cpp
  10. 10LM Studio download page (read 2026-11-22)
  11. 11Hugging Face model cards: Gemma 4, Qwen 3.5, Llama 3.1 (read 2026-11-22)

Get tomorrow's repo in your feed

One free, open source repo a day as a short video, shown working, with the catch named. Pull it. Stash it.