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

GitHub stars189k
Forks19.4k
Latest releasev0.40.21Dec 4, 2026
Last commitDec 4, 2026
Est. server costfrom €16.99/mo based on our test

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)

LicenseMIT
TypePermissive: MIT / Apache-2.0: use, modify and sell with few obligations.
Internal business useAllowed under the license text
What to watchPermissive. 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 official

We 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 / imageollama/ollama:latest → Ollama 0.40.8 (sha256:2b8eecdb85aa…)
Test machineIntel 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 measured85 MiB · 2 minutes after start, no model loaded.
RAM while working measured1.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 size3.37 GB download, 8.41 GB on disk once unpacked
Data on disk after test1.70 GB · Both test models together; Ollama itself stores almost nothing else.
Time to first start0.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

ModelModel fileRAM while answeringGeneration speedPrompt readingLoad time
qwen2.5:0.5b Q4_K_M398 MB734 MiB121.1 tokens/s602 tokens/s1.29 s
llama3.2:1b Q8_01.32 GB1.9 GiB42.5 tokens/s505 tokens/s2.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.1

    Fix: 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 estimate1.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

  • Older NVIDIA cards (compute capability 5.0–6.2) need driver 570 or newer. source
  • The NVIDIA Docker path requires the NVIDIA Container Toolkit and configured Docker runtime. Use the documented GPU container command to enable GPU access. source

Alternatives in Local model runtimes

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

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.