A private AI assistant with exactly one way out: designing the outbound boundary 只留一个出口的私有 AI 助手:设计出站边界
“Your data never leaves your machine” is the promise every privacy-conscious buyer wants to hear, and it means nothing unless you can point to the one place data does leave and show that nothing else can. Trust doesn’t come from the reassurance. It comes from drawing the outbound boundary explicitly and designing the system so there’s exactly one door. “你的数据永远不会离开你的机器”,这是每个在意隐私的买家都想听的承诺。可除非你能指出数据确实离开的那一个地方,并证明别处都出不去,否则这句话没有意义。信任不来自安慰,而来自把出站边界画清楚,并把系统设计成只有一扇门。
2026-07-15 · updated 2026-10-09 · first published on boheastill.com最初发表于 boheastill.com
The claim and the proof are different things
Anyone can say “self-hosted and private”. It’s an easy overclaim, and a nervous buyer has heard it before, often shortly before something leaked anyway. What earns trust is the opposite approach: instead of promising data never leaves, say exactly where it leaves, why it has to, and what stops it leaving anywhere else. A vendor who volunteers the one exit has actually thought about the boundary, and that’s more convincing than any “100% private” banner.
Five controls, each an architecture decision rather than a promise
Take a buyer’s list of “non-negotiables” for a private assistant and turn each one from a feature into an enforced mechanism:
- Runs on your hardware and nowhere else. Self-hosted on your machine, the assistant has no home in anyone’s cloud, so there’s no account elsewhere to be breached or subpoenaed.
- Never on the public internet. A private mesh (Tailscale) with no inbound public port. You can reach the machine; the open internet can’t address it, so there’s nothing to port-scan.
- Your model keys, your inference. Every reasoning call uses your own API key. The model is rented per call on your account, not through a middleman who sees your data.
- Encrypted at rest and fully exportable. A local encrypted store, with export to plain formats plus the original source files at any time. Owning your data means being able to leave with all of it; lock-in is a kind of leak too.
- No silent failure. Every workflow has a heartbeat; a silent failure pings you instead of rotting quietly. A privacy system that dies without telling you is a privacy system you’ve stopped being able to trust without knowing it.
The one door: only the inference call leaves
Drawn as a data flow, the whole system has exactly one arrow pointing outward: the inference call to the model provider, made on your key. Capture, transcription, memory, the knowledge graph and every business connector read and write locally. The provider call is the single exit, and because it’s the only one, it’s the only thing you need to reason about, rate-limit and log. Everything else is contained by how the system is built, not by policy. With one door, you can actually watch it.
That’s also the honest caveat: the model call does leave the machine. So the boundary isn’t “nothing ever leaves”. It’s “only the model API you chose sees a request, on your account, and you can see every time it happens.” That kind of precision is what a real privacy design looks like, and stating it plainly is what separates it from a marketing claim.
The through-line
It's the same least-privilege approach I use everywhere else: don't grant a capability you can't account for, and make the sensitive path the narrowest and most visible part of the system rather than the vaguest. With a privacy-conscious buyer, trust isn't won by promising more. It's won by drawing the boundary precisely enough that they can check it themselves. The system I'd be proud to hand over is one where the customer can see exactly where their data goes, because it only goes to one place.
This is how I design these systems. The approach comes from years of backend work, where the boundary between the inside and outside of a system is the first thing you defend.
A worked example of this boundary design is public: Intranet-Chat-Stream, a self-hosted, database-free stream for moving text and files between your PC, phone and AI agents. A single Go binary with token auth, and nothing exposed to the public internet.
“承诺”和“证明”是两回事
谁都能说“自托管,很私密”。这种话说得太满,很容易,紧张的买家以前也听过,往往没过多久数据还是泄露了。真正能赢得信任的做法正好相反:不承诺数据永远不出去,而是讲清楚它从哪里出去、为什么必须出去、又是什么挡住了其他出口。主动说明唯一出口的供应商,才是真正考虑过边界的,这比任何“100% 私密”的标语都有说服力。
五项控制,每一项都是架构上的决定,不是口头承诺
拿一个买家给私有助手列的“不可谈判项”,把每一条从“功能”变成“被强制的机制”:
- **只在你的硬件上运行。**助手自托管在你的机器上,不放在任何人的云里,所以外面没有可以被攻破或被调取的账户。
- **不暴露在公网上。**用私有组网(Tailscale),没有任何对外开放的入站端口。你能连上这台机器,公网却找不到它,也就没有东西可以被端口扫描。
- **用你的模型密钥,走你的推理。**每次推理调用都用你自己的 API key,按次计费记在你的账户上,中间没有能看到你数据的第三方。
- **静态加密,可完整导出。**数据存在本地的加密存储里,随时可以导出成通用格式,连同原始文件。拥有数据,意味着你能带着全部数据离开;被锁定,本身也是一种泄露。
- **没有无声故障。**每个工作流都有心跳;一次无声的失败会主动提醒你,而不是安静地烂掉。一个死了却不告诉你的隐私系统,是一个你已经不能再信任、却浑然不知的隐私系统。
那唯一一扇门:只有推理调用出去
画成数据流图,整个系统只有一个箭头指向外面:用你的 key 发给模型提供方的推理调用。采集、转写、记忆、知识图谱和每一个业务连接器,都在本地读写。调用模型提供方是唯一的出口,正因为只有这一个,你只需要盯住它、给它限流、做记录。其余的部分靠系统结构本身封住,而不是靠规定。只有一扇门,才真正看得住。
这也是需要说实话的地方:模型调用确实会离开这台机器。所以边界不是“什么都不出去”,而是“只有你选定的模型 API 会收到请求,记在你的账户上,而且每一次你都看得到”。真正的隐私设计就是这么精确,把这一点直接说出来,才和营销话术区分开。
贯穿其中的那条线
这和我在其他地方用的最小权限思路一样:说不清用途的权限不给,敏感路径要做成系统里最窄、最显眼的部分,而不是最模糊的部分。面对在意隐私的买家,赢得信任靠的不是承诺更多,而是把边界画得足够清楚,让他们自己就能核实。我愿意交付的系统,是客户能清楚看到数据去了哪里的系统,因为它只去一个地方。
这就是我设计这类系统的方式。这套做法来自多年的后端工作,在那里,系统内外之间的边界是第一个要守住的地方。
这种边界设计有一个公开的实例:Intranet-Chat-Stream,一个自托管、不用数据库的通道,在你的电脑、手机和 AI agent 之间传文字和文件。一个 Go 二进制文件,token 鉴权,不向公网暴露任何东西。