Why running AI locally is a security decision, not just a hobby
Running an AI model on your own hardware is usually pitched as a hobby or a cost play. After twenty years in IT systems work, I read it differently: it's a data-control decision. Every prompt you send a cloud AI leaves your network, lands on someone else's infrastructure, and lives under their retention policy — which most people have never read. A local model changes that equation completely. But it cuts both ways: researchers recently found 175,000 home and business AI servers sitting openly reachable on the internet with zero authentication, because local-AI tools ship with none. Local is more private and a new thing you're now responsible for securing. This article covers both halves honestly.
TL;DR
- Cloud AI means your prompts leave your network. What happens next depends on the provider and your account type — business API traffic is typically deleted within days and not used for training, while consumer chat accounts may default to 5-year retention and training use unless you opt out. ⏱️ verified 2026-07-03
- A local model sends nothing anywhere. Prompts, documents, and outputs stay on your hardware. For sensitive material — client data, health questions, anything under NDA — that's the entire argument.
- Local is not automatically secure. Ollama, the most popular local-AI server, has no built-in authentication; researchers found ~175,000 instances exposed to the public internet across 130 countries, and attackers are actively using them. ⏱️ verified 2026-07-03
- Model files are a supply chain. Most malicious models found on public hubs abuse an older file format (pickle) that can execute code when loaded; the modern formats (safetensors, GGUF) don't run code at load. Know which one you're downloading.
- Ten minutes of basic network hygiene — keep the server on localhost, never port-forward it, verify model sources — removes most of the real risk.
What actually leaves my network when I use cloud AI?
The direct answer: your entire prompt, everything you paste into it, and the response — transmitted to the provider and processed on their servers. The question that matters is what happens after, and it splits sharply by account type (Anthropic API data retention docs, Anthropic consumer terms update, ⏱️ verified 2026-07-03):
| Path | Typical handling |
|---|---|
| Business API traffic (e.g., Anthropic API) | Deleted automatically within days (Anthropic: ~7 for standard API use); not used for training |
| OpenAI business/API offerings | Not used for training by default |
| Consumer chat accounts (free/paid apps) | Anthropic's 2025 consumer terms: training use is the default unless you opt out, with retention up to 5 years for opted-in accounts |
Notice the pattern: the strongest protections sit on the business tiers. The consumer chat app most people use is the tier with the longest retention and the training default. None of this is hidden — it's in the policies — but "the policy allows it" and "I understood I agreed to it" are different things.
The practical rule I give people: treat anything typed into a consumer cloud AI as data you've shared with a company, handled according to terms that can change. For most everyday use, that's a fine trade. For client records, medical details, legal drafts, security findings, or anything contractually protected — it usually isn't.
What does running the model locally actually change?
One thing, completely: the data path. A local model — Ollama or llama.cpp running a downloaded model on your own GPU — processes your prompt on your hardware. Nothing is transmitted, retained, or reviewed anywhere. Pull the network cable and it keeps working; it's the rare setup where "air-gapped AI" is a real option, not a metaphor. For anyone handling data they're obligated to protect, that's not a hobbyist nicety — it's the difference between "sent to a third party" and "never left the building" on a compliance form.
What it does not change: the model can still be wrong, still reflects whatever it was trained on, and still deserves the same skepticism as any AI output. Local buys you privacy, not accuracy.
If local is private, what's the catch?
The catch is that you just became the security team. The cloud provider's auth, patching, and monitoring are gone — replaced by whatever you set up. And the ecosystem's defaults are friendlier than they are safe. The clearest evidence, from research published this January (The Hacker News, Cisco's Shodan case study, ⏱️ verified 2026-07-03):
- Researchers mapped roughly 175,000 publicly exposed Ollama servers across 130 countries. Ollama's API listens on a predictable port (11434) and ships with no native authentication — if it's reachable, anyone can use it.
- Nearly half advertised tool-calling ability — meaning some accepted instructions that could reach further into the owner's systems.
- This isn't theoretical: tens of thousands of documented attack sessions hit these endpoints over a three-month window, including a criminal operation reselling access to strangers' GPUs.
Read those as claim → reality: "it's on my home server, so it's private" is only true if it stays on your home server. Every one of those 175,000 owners believed they were running private AI. The exposure usually comes from one well-meaning step: someone wants to reach their AI from their phone, sets the server to listen on all interfaces or port-forwards it through their router, and skips the authentication step that the software never asked them for.
What about the models themselves — can a downloaded model be malicious?
Yes, in a specific and avoidable way. Model files are software artifacts from a public hub, which makes them a supply chain — and security research on Hugging Face (the main model hub) found that ~95% of malicious models discovered were pickle-based (JFrog research, supply-chain measurement study, ⏱️ verified 2026-07-03). Pickle is an older Python storage format that can execute code the moment the file loads — a backdoor delivery mechanism dressed as a model. Hub scanning catches some but not all; researchers have demonstrated evasion techniques that slipped past the "unsafe" flags.
The good news for hobbyists: the formats you'll actually use mostly sidestep this. Safetensors was designed to hold only raw model data — no executable code — and GGUF (the format Ollama and llama.cpp use) contains no executable code by design. One nuance added after publication: the loader programs that read GGUF files can have bugs of their own, and in late May 2026 memory-safety flaws were disclosed in llama.cpp's GGUF parser — since patched (see the correction note at the bottom). So the working rules are: prefer these formats, download from the original publisher's official page rather than a stranger's re-upload, be suspicious of any model that requires "just run this script first" — and keep Ollama/LM Studio updated, because parser fixes ship inside app updates.
What should I actually do? (the ten-minute checklist)
The realistic threat model for a home AI server is short, and so is the fix list:
- Leave the server on localhost. Ollama's default (
127.0.0.1) is correct — it means only the machine itself can reach it. Don't set it to0.0.0.0(all interfaces) without a reason and a plan. - Never port-forward the AI server through your router. This is the single step that put most of those 175,000 servers on the map.
- Want phone access? Use a private tunnel, not exposure. Tools like Tailscale or WireGuard give your own devices access over an encrypted private network while the server stays invisible to the internet.
- If other machines on your LAN need it, add an authenticating layer. A reverse proxy with a password/token in front of the API turns "anyone who can reach it" into "anyone with the key."
- Verify model downloads: official publisher page, safetensors or GGUF format, no side-scripts.
- Patch the stack like any other service. Local-AI servers get CVEs (security-fix advisories) like all software — an unpatched, internet-exposed instance is the worst of both worlds.
None of this requires a security background. It's the same discipline as not exposing a home NAS to the internet — applied to a new kind of service that arrived without a lock on the door.
When this won't help
- If your data isn't sensitive, cloud is often the better tool. Frontier cloud models are more capable than anything that fits on a home GPU. For general questions and non-confidential work, the privacy trade may not be worth the capability gap — and business/API tiers with no-training defaults are a legitimate middle ground.
- Local doesn't sanitize the model's behavior. A locally-run model can still produce wrong, biased, or fabricated output. The security win is about where your data goes, not what the model says.
- This checklist covers the home/homelab case, not an enterprise one. If you're deploying local AI for a business with real compliance obligations, you need actual access control, logging, and review — the ten-minute version is the floor, not the standard.
- A compromised computer defeats all of it. If the machine running your "private" model has malware on it, the privacy argument is already lost. Local AI inherits the security of the box it runs on.
FAQ
Is my data used to train AI if I use ChatGPT or Claude? It depends on the tier. Business and API traffic is generally not used for training by default. Consumer chat accounts vary — Anthropic's 2025 terms made training use the default for consumer users unless they opt out. Check the data controls in your account settings; the setting exists in both major apps.
Does running AI locally mean it works with no internet? Yes — after the one-time model download, inference runs entirely offline. That's the strongest version of the privacy argument, and it's testable: disconnect and try it.
Is Ollama safe to use? On its default settings, on a healthy machine — yes, it listens only on localhost where nothing outside the machine can reach it. It becomes unsafe when reconfigured to listen publicly or port-forwarded, because it ships with no authentication. Private tunnel for remote access, always.
Can a downloaded AI model contain a virus? The dominant risk is older pickle-format files, which can execute code when loaded — that's how most malicious models found on public hubs worked. Safetensors and GGUF, the formats used by mainstream local tools, don't execute code at load by design — though loader bugs have been found and patched (see the correction below), so keep the app that loads them updated. Stick to those formats, from the original publisher.
Do I need to be a security professional to run local AI safely? No. The realistic risks are covered by defaults-plus-discipline: keep the server on localhost, never port-forward it, use a private tunnel for remote access, and download models from official sources. That's setup hygiene, not a career.
Correction — 2026-07-05
The original version of this post (published 2026-07-03) stated that GGUF "has no known code-execution-at-load vector." That claim was accurate against what had been publicly disclosed when it was written, but it was already out of date: in late May 2026, security researchers disclosed a cluster of memory-safety vulnerabilities in llama.cpp's GGUF parser — the loader used by Ollama, LM Studio, and most local-AI tools — in which a maliciously crafted model file can trigger integer overflows and corrupt memory before inference begins. One was catalogued as an RCE-class flaw (CVE-2026-33298). The llama.cpp project published fixes in its security advisories.
The GGUF format still contains no executable code; these were bugs in programs that read it. The practical takeaway added throughout this post: treat your model runtime as security-relevant software and keep it updated. Sources: llama.cpp security advisories, GHSA-96jg-mvhq-q7q7, SentinelOne: CVE-2026-33298. A full plain-language walkthrough of model-file safety is coming as its own post.
Published 2026-07-03 · corrected 2026-07-05 (GGUF loader vulnerabilities — see correction note above). Time-sensitive: provider data-retention and training policies change — re-check the linked policy pages before relying on them; the exposed-server counts reflect research published January 2026.
Sources (verified 2026-07-03): provider data handling — Anthropic API and data retention, Anthropic consumer terms update, TechCrunch on the consumer opt-out change; exposed local servers — The Hacker News: 175,000 exposed Ollama servers, Cisco: Detecting exposed LLM servers (Shodan case study); model supply chain — JFrog: malicious Hugging Face ML models, arXiv: AI/ML supply chain attacks in Hugging Face models.