AI & Local LLM • 2026-10-29 • 3 min read
Private AI with a Local LLM, Orchestrated from n8n and Guarded in Rust
A complete architecture that sends no data to a third party: a Rust masking proxy, local inference, and n8n workflows connecting it to the systems you already run.

Every company we talk to wants the same three things from a language model — summarise these documents, triage these tickets, answer questions about our own material — and cannot send any of the underlying data to a public API. Sometimes that is regulation. More often it is a contract with their own customers that says the data stays put.
The architecture below has no step where confidential text leaves infrastructure you control.
The three pieces
[Internal app] -> [llm-guard-rs :8080] -> [vLLM or Ollama :11434]
^
[n8n orchestrator]The inference server runs on a GPU instance in a private subnet. No public address, no egress to the internet beyond your package mirror.
The gateway is a Rust service that every request passes through. It masks personal data, enforces per-tenant quotas, caps context length, logs who asked what — without storing the prompt — and is the only thing allowed to reach the inference port.
n8n connects the gateway to the systems the work actually lives in: a ticket queue, a document store, a CRM, Postgres. It is the part that would otherwise be a thousand lines of bespoke integration code per system.
Why a gateway rather than calling the model directly
Because the model is a parser you do not control, and treating it as a trusted component ends badly. The gateway is where the boring, necessary controls live:
- PII masking before the prompt is assembled — see the masking proxy
- A hard token budget per tenant per day, so one enthusiastic workflow cannot consume the GPU
- Prompt and response size limits, which are also a denial-of-service control
- Structural separation of instructions from retrieved content, the foundation of any prompt-injection defence
- Audit records that say a request happened, from which tenant, with what token count — and never the content
Centralising these means a new workflow inherits them instead of reimplementing them.
What n8n is good at here
n8n earns its place because the glue is where the time goes. Watching a mailbox, fetching an attachment, extracting text, calling the gateway, writing the result back to a ticket and notifying a channel is six integrations and perhaps twenty minutes of work in n8n. The same thing in application code is a service to deploy, monitor and keep up to date.
The caveat is that n8n must not be internet-facing — see our ECS hardening notes for how the webhook endpoint is separated from the workers that hold the credentials.
Hardware, roughly
A single 24 GB card runs a quantised 8B-class model comfortably for a department: sub-second first token, several concurrent users. A 70B-class model at useful quality wants 2x48 GB and starts being a capital decision rather than an experiment. Start on the small model and measure whether quality is the thing blocking adoption — it usually is not. Retrieval quality is.
What this does not solve
Local inference removes the data-transfer problem. It does not remove the need to evaluate output, to keep a human in the loop on anything consequential, or to tell users plainly that a model wrote it. Those are product decisions, and no deployment topology makes them for you.