Back to stack index

AI

Ollama

Local inference runner tied to many chat UIs in our catalog.

Short answer

Ollama is a free, MIT-licensed program that downloads open-weight language models and runs them on your own computer or server behind a local HTTP API on port 11434. Most self-hosted chat apps in our directory, including Open WebUI, LibreChat, LobeChat, AnythingLLM, Jan and GPT4All, can use it as their model backend, so you install Ollama once and point the app at it. The current release is v0.40.8 from October 21, 2026. Running models locally costs nothing beyond hardware and power; a laptop with 16 GB of memory handles 7 to 8 billion parameter models, while 30 to 70 billion parameter models need a GPU with 24 GB or more or a Mac with 64 GB or more of unified memory. Ollama also sells a hosted option, Ollama Cloud, at $20 a month for Pro, $100 for Max and $500 for Team, each with included usage credit.

Latest release
v0.40.8, October 21, 2026
Ollama GitHub
License
MIT
Ollama GitHub
Default API
http://localhost:11434
Ollama docs
Ollama Cloud Pro
$20 a month with $60 of usage
Ollama

Updated October 21, 2026How we evaluate tools

Official site

Directory projects (7)

  • Ollama

    Simple CLI and API for pulling and serving open models on your machine.

  • Open WebUI

    Full-featured web UI for Ollama and OpenAI-compatible backends.

  • Jan

    Offline-first desktop client for downloading and chatting with local models.

  • GPT4All

    Desktop runner for open weights on CPU-first hardware.

  • LobeChat

    Modern chat shell for running and comparing multiple models locally or via API.

  • LibreChat

    Multi-model chat UI with plugins, agents, and self-hosted deployment.

  • AnythingLLM

    Document chat and workspaces with optional vector DB and multi-user mode.

Ollama in open-source AI tools: how chat apps run local models in 2026

What Ollama does

Ollama packages three jobs into one program: it downloads models from its library, stores them on disk in a compressed format, and serves them over an HTTP API. You type ollama run llama3.2 or ollama pull qwen3, and a minute later the model is answering questions in your terminal. Behind the scenes it uses the llama.cpp inference engine with GGUF model files, picks your GPU automatically (NVIDIA, AMD, Apple Silicon or Vulkan), and loads and unloads models as requests arrive.

That last point matters for open-source apps. Ollama keeps a model in memory for five minutes after the last request by default, then frees the memory. A chat app with several users can send requests to different models, and Ollama handles the loading without the app needing to know anything about GPUs.

Ollama 0.30, released June 5, 2026, added wider GGUF compatibility through llama.cpp, faster NVIDIA performance of up to 20% by the project's own measure, and Vulkan by default, which helps AMD and Intel GPUs. The October 2026 releases continue on a weekly cadence.

Which directory projects use it

ProjectHow it uses Ollama
Open WebUIStarted life as "Ollama WebUI" and remains the most common front end for it
LibreChatAdds Ollama as a custom endpoint in its config file
LobeChatBuilt-in Ollama provider with model list sync
AnythingLLMOllama as both chat model and embedding model for document chat
JanRuns its own engine but can connect to an Ollama server
GPT4AllRuns models itself; often compared with Ollama for desktop use

The pattern is the same in each: the app stores users, chats and documents, and Ollama does the model work. Because the API is shared, you can run several of these apps against one Ollama server.

Hardware sizing

Models are usually run in 4-bit quantized form (labelled Q4_K_M in the library), which cuts memory use to roughly 0.6 GB per billion parameters plus overhead for the context window.

Model sizeExample modelsMemory needed (4-bit)Typical hardware
1 to 4BLlama 3.2 3B, Gemma 3 4B4 to 8 GBAny recent laptop
7 to 9BLlama 3.1 8B, Qwen3 8B8 to 12 GB16 GB laptop, Apple M-series
12 to 14BGemma 3 12B, Qwen3 14B12 to 16 GB32 GB Mac or 16 GB GPU
27 to 32BGemma 3 27B, Qwen3 32B20 to 24 GB24 GB GPU or 48 GB Mac
70BLlama 3.3 70B40 to 48 GBTwo 24 GB GPUs or 64 GB Mac

Speed depends on memory bandwidth more than raw compute. An Apple M-series Max chip or an RTX 4090 produces tokens several times faster than a laptop CPU. If a model does not fit in GPU memory, Ollama splits it between GPU and system RAM, which works but slows output sharply.

Setting it up for a chat app

  1. Install Ollama from ollama.com or with curl -fsSL https://ollama.com/install.sh | sh on Linux.
  2. Pull a model: ollama pull llama3.1:8b.
  3. If the chat app runs in Docker, Ollama on the host is reachable at http://host.docker.internal:11434 on Mac and Windows. On Linux, set OLLAMA_HOST=0.0.0.0 so Ollama listens beyond localhost, and use the host's IP address.
  4. In Open WebUI, set OLLAMA_BASE_URL. In LibreChat, add an endpoint with baseURL: http://host.docker.internal:11434/v1. In AnythingLLM, pick Ollama in the LLM settings screen.
  5. Pull an embedding model such as nomic-embed-text if the app will index documents.

The single most common problem is the Docker networking step. If the app reports "connection refused", Ollama is listening only on 127.0.0.1 inside the host, and the container cannot see it.

Settings worth knowing

VariableWhat it changes
OLLAMA_HOSTAddress and port Ollama listens on
OLLAMA_KEEP_ALIVEHow long a model stays in memory after a request
OLLAMA_NUM_PARALLELHow many requests one model serves at once
OLLAMA_MAX_LOADED_MODELSHow many models can be loaded at the same time
OLLAMA_CONTEXT_LENGTHDefault context window for models
OLLAMA_MODELSFolder where model files are stored

Context length is a frequent surprise. Ollama's default context window is smaller than many models support, so a long document can be cut off without an error. Raise it in the request, in a Modelfile, or with the environment variable, and expect memory use to grow with it.

Security

Ollama has no built-in authentication. Anyone who can reach port 11434 can run models, pull new ones and delete existing ones. Researchers have found thousands of Ollama servers exposed to the internet. Keep it bound to localhost or a private network, put a reverse proxy with authentication in front if remote access is needed, or use a VPN such as Tailscale. Chat apps like Open WebUI add their own user accounts, but those protect the app, not the Ollama port behind it.

Ollama Cloud

Ollama now offers hosted models through the same API and CLI, useful for models too large for your hardware. Plans as listed on ollama.com in October 2026:

PlanPriceIncluded usage
Free$0Local use unlimited, limited cloud
Pro$20 a month$60 of cloud usage
Max$100 a month$300 of cloud usage
Team$500 a month$1,000 shared

Usage beyond the included amount is billed per token at rates that vary by model. For a self-hosted app this gives a fallback: small models on your own GPU, large ones in the cloud, both through one endpoint.

When Ollama is the wrong choice

Ollama is built for a single machine and modest concurrency. If you are serving dozens of simultaneous users or need maximum throughput, a dedicated inference server such as vLLM or SGLang batches requests far more efficiently on data-center GPUs. If you need image generation, speech recognition and text models behind one OpenAI-style API, LocalAI covers more model types. And if you want the best answers rather than privacy, a hosted API such as Anthropic or OpenAI still beats any model that fits on a laptop.

Costs compared with hosted APIs

A local model costs electricity and the hardware you already own. A gaming PC drawing 400 watts for eight hours a day uses about 96 kWh a month, around $15 to $30 depending on local rates. That is cheap for heavy use, but local 8B models answer complex questions less well than current hosted models. Many teams run a small local model for private documents and routine drafting, and send harder tasks to a hosted API through a gateway such as LiteLLM.

Related: Ollama terminal guide, LocalAI stack, Hugging Face stack, Open WebUI, Stack index.

Frequently asked questions

What is Ollama used for in open-source AI apps?

It is the model runtime. Chat interfaces such as Open WebUI and LibreChat handle conversations, users and documents, and send each prompt to Ollama, which loads the model into memory and returns the reply. Separating the two lets you swap either part.

How much memory do I need to run Ollama?

A rough guide for 4-bit quantized models: 8 GB of RAM for 3 to 4 billion parameters, 16 GB for 7 to 8 billion, 32 GB for 14 billion, and 24 GB of GPU memory or 48 to 64 GB of Mac unified memory for 30 to 70 billion. Long context windows add more memory on top.

Is Ollama compatible with the OpenAI API?

Yes. Ollama exposes an OpenAI-compatible endpoint at /v1, so tools written for OpenAI can point at http://localhost:11434/v1 with any placeholder API key. Its native API at /api/chat and /api/generate offers a few extra options such as keep-alive control.

Is Ollama free for commercial use?

The Ollama software is MIT-licensed and free for commercial use. Each model has its own license, though. Llama, Gemma and Qwen models come with their own terms, so check the model card before shipping a product built on one.

Should I use Ollama or LocalAI?

Ollama is easier to install and has the largest model library and app support. LocalAI covers more model types in one server, including image generation, speech and embeddings, and exposes OpenAI and Anthropic-style endpoints. Many people start with Ollama and move to LocalAI or vLLM when they need more.

Sources

  1. Ollama on GitHub
  2. Ollama pricing
  3. Ollama API docs
  4. Open WebUI docs