Ollama is easy to start and full of deployment gotchas: context windows truncating, models landing in system memory instead of VRAM, model files eating the wrong disk, queues filling up. This page walks the official FAQ by theme — treat it as a troubleshooting handbook [1].
Upgrades and the config entry point
macOS and Windows clients auto-download updates — apply with Restart to update from the taskbar or menubar item, or install manually; on Linux, re-running the install script upgrades in place [1]:
curl -fsSL https://ollama.com/install.sh | shAll server configuration runs through environment variables, set differently per platform [1]. macOS apps use launchctl followed by an app restart [1]:
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"Linux systemd services take Environment lines under [Service] via systemctl edit ollama.service, then daemon-reload and restart; Windows edits user environment variables through system settings [1].
Context windows
The default context window is only 4096 tokens — long conversations and documents truncating usually trace back here. Three ways to change it: OLLAMA_CONTEXT_LENGTH for the global default, /set parameter num_ctx inside ollama run for a session, and the options.num_ctx field for a single API call [1]:
OLLAMA_CONTEXT_LENGTH=8192 ollama servecurl http://localhost:11434/api/generate -d '{
"model": "llama3.2",
"prompt": "Why is the sky blue?",
"options": {
"num_ctx": 4096
}
}'Raising the context directly raises VRAM use — the concurrency knobs below scale memory by context length, so both dials must be read together.
Load state and VRAM
One command shows what is loaded and where it lives [1]:
ollama psReading the Processor column: 100% GPU means the model sits entirely in VRAM; 100% CPU means system memory; a mixed value like 48%/52% CPU/GPU means the model overflowed VRAM and part of it landed in memory — a state where speed visibly drops, answerable only by a smaller model or bigger cards [1].
Two switches save VRAM. Flash Attention cuts memory sharply as context grows, enables automatically when the backend and devices support it, and OLLAMA_FLASH_ATTENTION=1 or 0 forces it [1]. With Flash Attention on, the KV cache can be quantized: OLLAMA_KV_CACHE_TYPE=q8_0 halves cache memory with a very small precision loss (the recommended non-f16 choice), q4_0 takes about a quarter with a medium loss that shows at high context; f16 is the default. Quality impact varies by model — high-GQA models like Qwen2 suffer more — so experiment for the balance [1].
Where models live and how to move them
Model files sit at ~/.ollama/models on macOS, /usr/share/ollama/.ollama/models on Linux, and the user profile's .ollama\models on Windows. Dozens of gigabytes later, OLLAMA_MODELS points at a bigger disk [1]. On Linux's standard install, remember permissions: chown the new directory to the ollama user or the service cannot write there [1].
Ports and networking
The service binds 127.0.0.1:11434 by default; OLLAMA_HOST opens it to the network [1]. Three exposure patterns: an Nginx reverse proxy with proxy_pass and a Host header, ngrok, or Cloudflare Tunnel [1]. Cross-origin requests from 127.0.0.1 and 0.0.0.0 are allowed by default; OLLAMA_ORIGINS adds more, and browser extensions need their patterns such as chrome-extension://*, moz-extension://*, and safari-web-extension://* listed explicitly [1].
Proxies and tunnels are different problems: model downloads ride HTTPS, so constrained networks set HTTPS_PROXY — never HTTP_PROXY, which Ollama ignores for pulls and which can break client connections; the proxy certificate must install as a system certificate, which in Docker means a custom image [1].
Privacy has a clear official answer: local runs expose nothing; cloud-model traffic is processed but never stored, logged, or trained on; only basic account info and limited usage metadata are collected [1]. To switch the cloud surface off entirely — giving up cloud models and web search — write disable_ollama_cloud into ~/.ollama/server.json or set OLLAMA_NO_CLOUD=1, restart, and the logs confirm with Ollama cloud disabled: true [1].
Memory: preload and unload
Slow responses often mean the model was just unloaded and the next request reloads it. Preloading is an empty request — both /api/generate and /api/chat accept it, and the CLI does the same with an empty prompt [1]. Models stay in memory 5 minutes by default; ollama stop unloads immediately; the keep_alive parameter takes a duration string (10m, 24h), seconds (3600), any negative number (stay loaded), or 0 (unload right after answering); OLLAMA_KEEP_ALIVE sets the global default and the API parameter wins over it [1]:
curl http://localhost:11434/api/generate -d '{"model": "llama3.2", "keep_alive": -1}'A full queue returns 503 overloaded; OLLAMA_MAX_QUEUE (default 512) raises the ceiling before the server starts [1].
The two layers of concurrency
Concurrency works at two levels [1]: multiple models can load simultaneously given memory, and each model may process parallel requests when memory allowed at load time. Under memory pressure, new requests queue while older models unload to make room, processed in order; GPU inference additionally requires a new model to fit entirely in VRAM before concurrent loads [1].
Three knobs coordinate: OLLAMA_MAX_LOADED_MODELS caps concurrent models (default 3 x GPU count, or 3 for CPU); OLLAMA_NUM_PARALLEL caps per-model parallel requests (default 1) with RAM scaling by parallel count times context length; OLLAMA_MAX_QUEUE caps the queue [1]. The critical interaction: parallelism multiplies context — a 2K context with 4 parallel requests allocates an 8K context — so on tight VRAM the two knobs cannot both max out. Windows Radeon cards currently default to one loaded model due to ROCm v5.7 VRAM-reporting limits [1].
Multi-GPU loading prefers a single card when the model fits — fewer transfers across the PCI bus means the best inference performance — otherwise the model spreads across all available GPUs [1].
Quick hits
The remaining items in brief: Docker GPU acceleration needs the nvidia-container-toolkit and works on Linux and Windows (WSL2) — macOS Docker Desktop lacks GPU passthrough [1]. Slow WSL2 networking on Windows 10 fixes by disabling Large Send Offload Version 2 (IPv4 and IPv6) on the vEthernet (WSL) adapter [1]. The official VS Code extension brings local models into VS Code Chat [1]. The public key id_ed25519.pub — for pushing models, pulling private ones, and running cloud models — lives at platform-specific paths and binds through ollama signin or a web paste [1]. And disabling autostart happens in Task Manager's Startup apps on Windows or Settings > Login Items on macOS, persisting across upgrades unless uninstalled [1].
Adapted from the Local FAQ section of the Ollama documentation[1], released under the MIT License.
Sources
- 1Local FAQ | Ollama docsOllama docs (MIT)
Cite this page: Ollama FAQ: model paths, ports and memory. TellWorld, https://www.tellworld.net/practice/practice-ollama-faq. Updated 2026-11-14