EN
My account

Your privacy, your call. No advertising cookies. May we count your visit in aggregate (Cloudflare, no cookies) and remember where you came from? If you reject, we won’t measure your visit. · Cookies · Privacy

Privacy settings

Choose what we measure and what we keep in this browser. We never sell or share your data.

Essential

Remember your theme, language, saved items and this choice. Without them the site cannot work the way you ask.

Always on

Keeps the source of your first and latest visit for 90 days (utm parameters and referring site). It only leaves your browser if you subscribe to the newsletter.

Cloudflare Web Analytics counts visits in aggregate: page, referring site, country, browser and load times. No cookies, no identifiers and no profiling; nothing is stored in your browser. It only loads if you accept it. If you reject it or switch it off, it does not load (or stops loading from the next page) and we do not count your Telegram clicks either.

Cookies · Privacy

Configurations · Level intermediate

Configuration: Ollama local-only, private and with more context

In 30 seconds

Copyable recipes to turn off Ollama’s cloud features, keep it reachable only from your computer, increase the context and store models on another disk.

Start with:

By Cognenza editorial team · Updated · 3 min read · Sources cited

In this guide · 9
  1. What it’s for
  2. 1. Turn off cloud features
  3. 2. Keep it on your computer only
  4. 3. More context for long documents
  5. 4. Store models on another disk
  6. How to set variables on your system
  7. Precautions
  8. Frequently asked questions
  9. Sources

What it’s for

Ollama runs models on your computer, but it also offers cloud features. These recipes, taken from its official documentation, make sure everything stays on your computer and adapt Ollama to long documents.

1. Turn off cloud features

Create or edit the file ~/.ollama/server.json:

{
  "disable_ollama_cloud": true
}

Or, alternatively, set the environment variable:

OLLAMA_NO_CLOUD=1

2. Keep it on your computer only

By default Ollama listens on 127.0.0.1:11434, that is, only on your computer. Don’t set OLLAMA_HOST=0.0.0.0 unless you know how to protect access from your network.

3. More context for long documents

OLLAMA_CONTEXT_LENGTH=8192 ollama serve

The default context is 4096 tokens. More context means more memory; check with:

ollama ps

4. Store models on another disk

OLLAMA_MODELS=/path/to/another/disk/ollama-models

How to set variables on your system

How to set variables on your system
SystemHow
WindowsQuit Ollama, search for “environment variables” in Settings, add the variable for your account and reopen Ollama
macOSlaunchctl setenv NAME value and restart the Ollama app
LinuxEdit the service with systemctl edit ollama.service, add Environment="NAME=value" and restart

Precautions

  • After changing anything, restart Ollama so it takes effect.
  • If an external app uses your Ollama, check its privacy settings too.

Key concept: quantisation lets a model use less memory and run on modest computers.

Frequently asked questions

What exactly does turning off the cloud do?

According to the official documentation, it disables Ollama’s cloud models and web search, so you only use local models.

Why shouldn’t I use 0.0.0.0?

OLLAMA_HOST=0.0.0.0 makes Ollama accept connections from other computers on your network. Without extra protection, anyone with access could use it. If only you use it on your computer, you don’t need it.

How much context should I set?

The default is 4096 tokens. Raise it only as much as you need: more context requires more memory. With ollama ps you can see the context and whether the model fits on the graphics card.

Glossary · Configurations

Keep reading

Next step · Tools

Ollama: getting-started guide

A beginner’s guide to Ollama: what it is, memory requirements, installation on Windows, Mac and Linux, first model, local-only mode, privacy and limits, from the official documentation.

Sources

Source titles are translated by Cognenza. Links go to the official page in your language when there is one; otherwise, to the English or Spanish original.

  1. FAQ (official documentation) — Ollama
  2. Quickstart (official documentation) — Ollama

Change log

Change log
  • : First published.

Educational content, prepared with the help of AI tools, with sources cited. It is not a substitute for professional advice. Tools change fast: if you spot something out of date, write to us at contacto@cognenza.com. How we work.

Found this guide useful? A new guide in your inbox every Tuesday

Every Tuesday, 5 minutes: AI news with sources, a tool with its prompt and a guide. Free, with one-click unsubscribe. What is inside and a sample issue