Self-Hosted AI Agents Don’t Automatically Mean Private
I believed that running AI agents locally meant my data stayed private. I was wrong. After running a self-hosted agent with access to my codebase, notes, and private configs for months, I noticed something unsettling: the agent was making outbound connections I had not authorized. Not to my server — to the model provider’s API, yes, but also to telemetry endpoints, update checkers, and in one case, a CDN domain I had never configured.
This is the uncomfortable truth about self-hosted AI agents: they are not automatically private. They are only as isolated as their configuration allows them to be. The moment you connect an agent to the internet — even for model inference — you open a channel that can leak data in ways you did not anticipate.
Where the Leaks Happen
Most self-hosted AI setups focus on the model and the inference server. That is the easy part. The hard part is the network topology around it. When you run a local agent that calls an API endpoint, every request passes through your network stack. DNS queries, TLS handshakes, HTTP headers — all of them carry metadata. The model provider sees your IP, your request patterns, and potentially your prompt content depending on their privacy policy. Even if the provider is trustworthy, the intermediate network — your ISP, your router, your corporate firewall — sees everything.
I ran tcpdump on my local machine while the agent was working and was shocked by the volume of outbound traffic. Health checks to unknown domains, certificate revocation list checks, telemetry pings from the model runtime itself. None of these were documented. None of them were opt-in. They were just there, running silently in the background.
What I Actually Did
After that discovery, I spent two weeks locking down the agent’s network access. Here is what worked:
- I moved the model inference to a completely isolated VLAN with no outbound internet access. The agent can only reach the local model server on a private subnet.
- I set up a local proxy that logs and filters all outbound requests. Anything not explicitly whitelisted is dropped at the firewall level.
- I replaced the community-quantized model with a fully local inference stack using llama.cpp with no network calls whatsoever.
- I disabled all telemetry in the model runtime configuration. This required editing config files that were not documented — another red flag for any tool that claims to respect your privacy.
The Real Lesson
Self-hosting is not a privacy guarantee. It is a privacy lever — you pull it as far as you are willing to go. The default configuration of any self-hosted AI tool is designed for convenience, not security. If you are running AI agents on your own hardware, audit the network traffic. You will probably find surprises, just like I did.
The practical advice is simple: start with zero network access, then open only what you explicitly need. Every open port is a potential leak. Every DNS query is a potential fingerprint. Treat your self-hosted agent like any other service that touches sensitive data — with skepticism and hardening, not trust by default.
One thing I wish I had done from day one is run the agent in a container with no host network access and a read-only filesystem. That single change would have prevented the telemetry leaks entirely. The container would have had no way to reach the outside world, and any attempt to do so would have been silently dropped. It is the simplest and most effective isolation technique I have found.