DEV Community

Subhendu Das
Subhendu Das

Posted on • Originally published at bsky.app

Why your AI messages shouldn't leave your machine

Every time you send a message to ChatGPT, Claude, or Gemini through their web interface, that message travels to a data center, gets processed, logged, and stored. The AI company sees it. Their infrastructure handles it. Their policies govern it.

For casual use — "write me a haiku about coffee" — this is fine. But developers are increasingly using AI for things that matter: reviewing proprietary code, debugging production incidents, discussing architecture decisions, processing customer data. The content of these conversations is sensitive, often more sensitive than the code itself.

This is why self-hosted AI matters. Not as a philosophical stance, but as a practical engineering decision.

The privacy surface area of cloud AI

When you use a cloud AI service, your data touches:

  1. The network — Your message traverses the public internet. TLS encrypts it in transit, but it's still leaving your network.
  2. The provider's infrastructure — Load balancers, API gateways, inference servers. Each is a potential logging point.
  3. The provider's data policies — Most providers say they don't train on your data. But policies change. Companies get acquired. Regulations shift.
  4. Third-party integrations — If the AI service integrates with other tools, each integration adds surface area.
  5. Logs and monitoring — Providers log requests for debugging, billing, and abuse detection.

None of these are nefarious. They're the standard architecture of cloud services. But for sensitive workloads, each one is a risk factor.

When self-hosted AI makes sense

Your conversations contain proprietary code. If you're using Claude to review a pre-launch feature, debug a security vulnerability, or discuss architecture for a competitive product, the content is trade-secret-adjacent. Self-hosting keeps it off third-party infrastructure.

You handle regulated data. Healthcare (HIPAA), finance (SOX), legal (attorney-client privilege) — these domains have specific requirements about where data can be processed.

You're in a data-sovereignty jurisdiction. GDPR, India's DPDP Act, Brazil's LGPD — these regulations care about where data is processed and stored.

You want an audit trail you control. You know exactly what's stored, where, and for how long. You can rotate, encrypt, or delete conversation history on your own schedule.

You work with clients who ask. Enterprise clients increasingly include "where does our data go?" in vendor assessments. "It stays on our infrastructure, the only external call is to the inference API" is a clean answer.

The architecture of zero-relay AI

In a cloud AI chat:

Your device -> Internet -> Anthropic's servers -> Claude -> Anthropic's servers -> Internet -> Your device
Enter fullscreen mode Exit fullscreen mode

In a self-hosted setup like Telechat:

Your phone -> Telegram/WhatsApp API -> Your server -> Anthropic API -> Your server -> Telegram/WhatsApp API -> Your phone
Enter fullscreen mode Exit fullscreen mode

The messaging platform sees that you're sending messages to a bot, but the content is encrypted in transit. Anthropic's API sees the query content (they have to, for inference), but nothing else — no user metadata, no conversation history beyond what you send in the API call.

What self-hosting doesn't solve

The inference provider still sees your queries. Self-hosting eliminates the intermediary, not the provider. If you need the provider to not see your data, you need on-device models (Llama, Mistral), which is a different tradeoff.

Messaging platforms see metadata. Telegram knows you're messaging a bot. They don't see the AI processing, but they see the communication patterns.

Self-hosting adds responsibility. You're responsible for uptime, security patches, access control, and backup.

Telechat: Self-hosted Claude in practice

npm install -g telechatai && telechat init
Enter fullscreen mode Exit fullscreen mode

One process on your machine. Four messaging platforms. Zero cloud relay. Conversation history in local SQLite.

It also does smart model routing (saves ~60% on API costs), per-user budget caps, and has a Desktop Bridge for approving Claude's destructive actions from your phone.

The core value proposition is simple: your AI conversations stay on your infrastructure. Not because cloud is evil, but because some conversations deserve the same care you give your source code.

telechat.fyi — Self-hosted Claude AI. Your machine, your messages.

Top comments (0)