Ollama Docker: run a local model server
The simplest way to download and run open-weight LLMs locally behind an API.
Quick answer
Ollama is the simplest way to download and run open-weight LLMs locally behind an API, listed under Local model runtimes. A typical small-business use: keep sensitive prompts on your own hardware instead of a cloud API. In our own test (Ollama 0.40.8, Docker, Oct 22, 2026) it used about 85 MiB of RAM at idle and up to 1.9 GiB while working (running llama3.2:1b on CPU). That is our measurement, not an official figure. The project publishes no official RAM figure. With headroom added to the RAM we measured, a Hetzner Cloud CPX22 (2 vCPU, 4 GB) at about €16.99/month should be enough. That is our estimate from the test, not the project's (server only, excl. VAT). License: MIT, which allows internal business use.
Last updated · facts verified against official docs on · sources
Activity data comes from GitHub and was last refreshed Dec 6, 2026.
What is Ollama?
Ollama pulls and runs open models such as Llama, Qwen, Gemma and Mistral with one command and serves them on a local HTTP API that many other tools in this directory support. It runs on CPU or on NVIDIA, AMD and Apple GPUs.
Where it fits in a 10–200 person business
- Keep sensitive prompts on your own hardware instead of a cloud API
- Local model back-end for Open WebUI, AnythingLLM, Dify or n8n
- Offline or air-gapped AI for regulated work
These use cases are our editorial suggestions, not claims made by the project.
Can a business use Ollama? (license)
| License | MIT |
|---|---|
| Type | Permissive: MIT / Apache-2.0: use, modify and sell with few obligations. |
| Internal business use | Allowed under the license text |
| What to watch | Permissive. Internal and commercial use allowed. Individual models have their own licenses. |
This is a plain-English summary of the license text, not legal advice. Third-party models you run with it have their own licenses.
Data & compliance: does Ollama phone home?
| Telemetry (usage data sent to the vendor) | Not documented |
|---|---|
| Other calls home by default (updates, marketplaces, default cloud services) | Yes, by default Prompts to local models stay on your machine, but Ollama's cloud features (cloud models, web search) stay available unless you turn them off; the macOS and Windows apps download updates automatically. How to turn it off: Set OLLAMA_NO_CLOUD=1 (or disable_ollama_cloud in ~/.ollama/server.json). Source: docs.ollama.com/faq |
| Single sign-on (OIDC / SAML / LDAP) | Not documented |
| Audit log | Not documented |
| Role-based access control (RBAC) | Not documented |
| Data residency / GDPR notes from the project | Documented The FAQ says Ollama does not see your prompts or data when you run models locally; cloud-hosted models are processed by Ollama. Source: docs.ollama.com/faq |
Checked against the project's own docs and repository on . "Not documented" means we could not find the answer in official sources; it does not mean the feature is missing or that no data is sent. Third-party services you connect (model APIs, vector databases, search engines) have their own data policies. Compare all apps.
What hardware does Ollama need?
The project does not publish a minimum CPU/RAM figure, so we leave the official value blank rather than guess.
Our measurement measured: 85 MiB RAM at idle, 1.9 GiB while working (Ollama 0.40.8, Oct 22, 2026). Full test results.
GPU: NVIDIA GPUs need compute capability 5.0+ and driver 550+ (570+ for compute capability 5.0–6.2). CPU-only also works.
Memory needs depend on the model you load, not on Ollama itself.
Source: docs.ollama.com/gpu
Tested by SelfHostMap
Measured, not officialWe deployed Ollama 0.40.8 ourselves on using the official Docker instructions, and measured what it actually used. Your numbers will vary with your data, users and hardware. How we test.
| Version / image | ollama/ollama:latest → Ollama 0.40.8 (sha256:2b8eecdb85aa…) |
|---|---|
| Test machine | Intel Xeon (Sapphire Rapids class, AVX-512 + AMX), 8 vCPU, 16 GB RAM (shared), GPU: none (CPU only). Debian 13 (trixie), Linux 6.12, Docker Engine 29.9.2. Container capped at 2.4 GiB. |
| RAM at idle measured | 85 MiB · 2 minutes after start, no model loaded. |
| RAM while working measured | 1.9 GiB · Peak while answering one prompt with llama3.2:1b (Q8_0) on CPU. With qwen2.5:0.5b it was 734 MiB. |
| Image size | 3.37 GB download, 8.41 GB on disk once unpacked |
| Data on disk after test | 1.70 GB · Both test models together; Ollama itself stores almost nothing else. |
| Time to first start | 0.8 s with the image already downloaded · From docker run until the API answered "Ollama is running". No model loaded yet. Including the image download: 49.4 s (download took 48.6 s on our datacenter connection; yours depends on your network). |
CPU-only inference measured
| Model | Model file | RAM while answering | Generation speed | Prompt reading | Load time |
|---|---|---|---|---|---|
qwen2.5:0.5b Q4_K_M | 398 MB | 734 MiB | 121.1 tokens/s | 602 tokens/s | 1.29 s |
llama3.2:1b Q8_0 | 1.32 GB | 1.9 GiB | 42.5 tokens/s | 505 tokens/s | 2.3 s |
One prompt per model ("Explain in about 150 words what a reverse proxy is..."), temperature 0, default 4,096-token context, all 8 vCPUs. Token speed scales with CPU cores and CPU type, so a 2–4 vCPU server will be noticeably slower.
Cost based on our test: 1.9 GiB working RAM × 1.5 + 512 MiB for the OS and Docker ≈ 3.4 GiB → Hetzner Cloud CPX22 (2 vCPU, 4 GB) at about €16.99/month our estimate. The project itself publishes no RAM figure.
What we ran into
- The image is large even for CPU-only use
The ollama/ollama image was a 3.37 GB download and 8.4 GB on disk, because it bundles GPU libraries.
Fix: Leave at least 10 GB of disk for the image plus your models.
- ollama pull failed on our test network (caused by our test network)
Our test VM's DNS returns private "fake" IPs (198.18.x.x) through an egress proxy, and Ollama refuses to follow a download redirect to a non-public address. A normal VPS should not hit this; networks behind a proxy or VPN tool in fake-IP DNS mode may.
Error: max retries exceeded: Get "https://…r2.cloudflarestorage.com/…": redirect target not allowed: …r2.cloudflarestorage.com resolves to non-public 198.18.0.1Fix: Use normal DNS for the server. We worked around it by downloading the same registry files with curl, checking their SHA-256, and placing them in the models folder.
- Models stay in RAM for 5 minutes after the last request
The server config shows OLLAMA_KEEP_ALIVE 5m0s. RAM went back to 93 MiB only after we unloaded the model.
Fix: Set OLLAMA_KEEP_ALIVE (or keep_alive per request) lower if the server also runs other apps, or higher to avoid reload delays.
- Ollama respects the container memory limit
With --memory 2500m the startup log reported the CPU device as total="2.4 GiB" available="2.3 GiB", so it plans model loading inside the cap.
Fix: Give the container enough memory for the largest model you plan to run, plus some headroom.
Exact command we ran
docker run -d --memory 2500m -v ollama:/root/.ollama -p 11434:11434 \
--name ollama ollama/ollama:latest Official docs command (CPU only) plus a 2.5 GB memory cap.
Ollama has no web UI; see the Open WebUI test for a chat front-end running on top of it.
How much does it cost to host Ollama per month?
The project publishes no official RAM figure, so there is no official-spec estimate. Instead we use the RAM we measured in our own test:
| Based on our test our estimate | 1.9 GiB working RAM × 1.5 + 512 MiB ≈ 3.4 GiB → CPX22 (2 vCPU, 4 GB, 80 GB disk) €16.99/mo |
|---|
How we got this: the cheapest Hetzner Cloud Regular Performance (shared AMD vCPU) plan with at least that much RAM, using prices read from www.hetzner.com/cloud/regular-performance on 2026-11-30. "From" monthly price cap shown by Hetzner, excluding VAT. Prices vary by location. Covers the server only; it excludes LLM API usage, backups, extra storage, GPUs and your time. The headroom covers the OS, Docker and spikes; heavier workflows, more users or bigger models need more. Method.
How to deploy Ollama
The recorded Docker command is the CPU route. For NVIDIA or AMD acceleration, follow the GPU-specific commands in the official Docker source below; choose hardware for the model as well as the runtime.
Method: Docker (or install script)
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
# Linux native: curl -fsSL https://ollama.com/install.sh | sh From the official instructions: docs.ollama.com/docker. Always check the source for the current version before you run it.
Known gotchas when self-hosting Ollama
Alternatives in Local model runtimes
- llama.cpp Lightweight C/C++ engine that runs quantized open models on CPU or GPU, with an OpenAI-compatible server. Compare llama.cpp vs Ollama
- vLLM High-throughput LLM inference server for GPUs with an OpenAI-compatible API. Compare Ollama vs vLLM
- LocalAI OpenAI-compatible API for LLMs, vision, voice and images on any hardware. Compare LocalAI vs Ollama
- TextGen (text-generation-webui) Local LLM app (formerly text-generation-webui) with a browser UI, OpenAI/Anthropic-compatible API and LoRA training. Compare Ollama vs TextGen (text-generation-webui)
- SGLang Fast serving engine for LLMs and multimodal models on GPU servers, with an OpenAI-style API. Compare Ollama vs SGLang
- llamafile Mozilla.ai's single-file executables that bundle an open LLM with llama.cpp and run on most OSes with no install. Compare llamafile vs Ollama
- KTransformers CPU and GPU inference kernels with a model-serving CLI and SGLang integration. Compare KTransformers vs Ollama
- TensorRT LLM NVIDIA GPU inference toolkit with an OpenAI-compatible serving command. Compare Ollama vs TensorRT LLM
- Xinference Model-serving platform for LLM, embedding, rerank, speech and image models behind one OpenAI-compatible API. Compare Ollama vs Xinference
- llama-swap Hot-swap proxy that runs many local AI servers behind one OpenAI- and Anthropic-compatible API. Compare llama-swap vs Ollama
- Lemonade Local OpenAI-compatible server for chat, speech and image models on CPU, GPU or AMD NPU. Compare Lemonade vs Ollama
- GPUStack GPU cluster manager that deploys vLLM, SGLang and other engines behind an OpenAI-compatible API. Compare GPUStack vs Ollama
- Text Embeddings Inference Hugging Face's production server for open embedding, re-ranking and classification models. Compare Ollama vs Text Embeddings Inference
- Harbor (local LLM stack) One CLI to start a pre-wired local AI stack, such as Open WebUI with llama.cpp, Ollama or vLLM, plus 50+ services. Compare Harbor (local LLM stack) vs Ollama
- RamaLama Run and serve AI models as OCI containers with Podman or Docker, using an image matched to your GPU. Compare Ollama vs RamaLama
- Infinity High-throughput REST server for embeddings, reranking and classification models. Compare Infinity vs Ollama
Plan your deployment
Use these guides to check the model, hardware and operating decisions alongside the app comparison.
Ollama FAQ
How much RAM does Ollama need?
Ollama does not publish an official RAM figure. Memory needs depend on the model you load, not on Ollama itself. In our own test (Ollama 0.40.8, Docker, Oct 22, 2026) it used about 85 MiB of RAM at idle and up to 1.9 GiB while working (running llama3.2:1b on CPU). That is our measurement, not an official figure.
Does Ollama need a GPU?
NVIDIA GPUs need compute capability 5.0+ and driver 550+ (570+ for compute capability 5.0–6.2). CPU-only also works.
How much does it cost to self-host Ollama?
The software is free to download. The project publishes no official RAM figure. With headroom added to the RAM we measured, a Hetzner Cloud CPX22 (2 vCPU, 4 GB) at about €16.99/month should be enough. That is our estimate from the test, not the project's (server only, excl. VAT).
Is Ollama free for commercial use?
Ollama is licensed under MIT (Permissive). Internal business use is allowed under the license text. Permissive. Internal and commercial use allowed. Individual models have their own licenses. This is a summary, not legal advice.
What are common problems when self-hosting Ollama?
Older NVIDIA cards (compute capability 5.0–6.2) need driver 570 or newer. The NVIDIA Docker path requires the NVIDIA Container Toolkit and configured Docker runtime. Use the documented GPU container command to enable GPU access.
What went wrong when SelfHostMap deployed Ollama?
In our test of Ollama 0.40.8 on Oct 22, 2026: The image is large even for CPU-only use. Leave at least 10 GB of disk for the image plus your models. Models stay in RAM for 5 minutes after the last request. Set OLLAMA_KEEP_ALIVE (or keep_alive per request) lower if the server also runs other apps, or higher to avoid reload delays. Ollama respects the container memory limit. Give the container enough memory for the largest model you plan to run, plus some headroom.
How fast is Ollama on a CPU-only server?
In our test on 8 vCPU with no GPU: qwen2.5:0.5b (Q4_K_M, 398 MB file) generated about 121.1 tokens/s and used 734 MiB of RAM; llama3.2:1b (Q8_0, 1321 MB file) generated about 42.5 tokens/s and used 1.9 GiB of RAM. Fewer or slower cores will be slower. These are our measurements, not official figures.
Is Ollama still maintained?
Yes, it is actively developed. Last commit: Dec 4, 2026. Latest release: v0.40.21 (Dec 4, 2026). Checked Dec 6, 2026.
How do I install Ollama?
The official method is Docker (or install script). The exact commands are in the "How to deploy" section above and in the official instructions: https://docs.ollama.com/docker
What are self-hosted alternatives to Ollama?
Other apps in Local model runtimes: llama.cpp, vLLM, LocalAI, TextGen (text-generation-webui), SGLang, llamafile, KTransformers, TensorRT LLM, Xinference, llama-swap, Lemonade, GPUStack, Text Embeddings Inference, Harbor (local LLM stack), RamaLama, Infinity.
Sources
- GitHub repository: github.com/ollama/ollama
- Official documentation, Deploy instructions, Gotcha 2: docs.ollama.com/docker
- License text: github.com/ollama/ollama/blob/main/LICENSE
- Hardware requirements, Gotcha 1: docs.ollama.com/gpu
- Hetzner Cloud pricing (cost estimate): www.hetzner.com/cloud/regular-performance
- GitHub stars, commits and releases: GitHub REST API, fetched
Facts on this page were checked against the project's own repository and docs on 2026-11-17. Spotted something out of date? Tell us.