Note of 7 November 2026: this article's thesis no longer holds for this site
The article uses this site's architecture as proof of three facts: "no third-party processor is involved", "the model is served locally", "no outbound call to a cloud AI provider". They were true until the 23 October 2026 deploy (generation with Ollama on the VPS). They are not true today: text generation goes through OpenRouter, free plan, which is a third-party provider; with data_collection: "deny" on every request, but without ZDR (not obtainable on that plan) and without in-region EU routing. Semantic search and the vector index stay on the VPS. What remains valid is the reasoning: the shape of an architecture with local inference, its advantages and its operating costs, and the distinction between architectural fact and legal assessment. Statements about the site describe that configuration, not the current one. A move to local models on the VPS has been decided (7 November 2026) but is not active yet. The article is due for a rewrite.
A law firm that moves its clients' documents — case files, contracts, correspondence, discovery material — into a proprietary practice-management or document-management platform is making an architectural choice before it's a product choice: what format those documents live in, who can index and process them, and above all what shape they come out in if the firm decides to switch vendors. This article describes an on-prem reference architecture for a legal document workload — the same shape that hosts this very site in production — from the angle of that question: what's a verifiable architectural fact (where the indexed documents live, in what format, who can access them, what ends up in the logs) and what instead stays a contractual and professional determination that no technical description can replace — starting with the most sensitive question: whether, and under what conditions, a legaltech vendor lets you take your own data back out. This article does not answer that question on behalf of any specific vendor. Not because the answer doesn't exist, but because it depends on the contract signed with that vendor and on the professional rules of the firm's jurisdiction — it's given by the client's own counsel, not an architecture article. What we offer here is the line between the two, kept sharp, and an analysis of how an architecture designed from the start not to raise the problem actually works.
Level: managing partner / IT lead at a law firm. Whoever is evaluating whether a firm's documents can stay on-prem instead of living inside a proprietary legaltech platform needs to know exactly what an architecture can prove on its own and what has to go through a contract and a legal review instead. This article draws that line on the real case I use for my own production stack — not a law-firm deployment, but the same reference architecture that would serve a legal document workload.
Why a legaltech walled garden makes the question urgent without being its object
"Walled garden" is the name given to a platform that, by construction, makes it easy to get in and expensive to get out: the data lives in a format and on infrastructure the vendor controls, and moving it elsewhere takes work the vendor has no incentive to make simple. Practice-management platforms (Clio, for instance), document-management platforms (iManage, NetDocuments), e-discovery platforms (Relativity), and contract-lifecycle-management platforms (Ironclad) are, by construction — not by a debatable choice made by any one of them in particular, but by how the SaaS model itself works — platforms where the vendor hosts the infrastructure and the client doesn't operate it. This isn't a judgment on the quality of any of these platforms, which offer search, drafting, and collaboration tooling that's hard to replicate from scratch: it's a description of their architectural shape. The portability question isn't about how good a vendor's full-text search tool is: it's about what happens the day the firm wants to leave, or the vendor changes its terms, its price, or shuts down. Answering "we use an AI platform for legal research" to a question about data portability is the same shortcut that leads to a cost comparison without measured numbers — it looks like an answer and isn't.
What an architecture can say, and what it can't
An architecture can describe facts verifiable through code and configuration: where indexing runs, what format the indexed documents are written in, which network calls leave the perimeter, what ends up in the logs. It can't determine whether a specific contract with a vendor allows export, under what conditions, at what cost or timeline — that's a contractual reading that depends on the terms signed with that vendor and on the professional rules of the jurisdiction, and goes beyond what a technical description can observe on its own. For this architecture, the verifiable facts are these five:
- No client document leaves the client's infrastructure. Indexing, vector search, and generation all happen inside the same perimeter that hosts the documents.
- No third-party processor is involved in indexing or generation. No outbound call to a cloud AI provider — see this same project's stack constraint, which explicitly excludes providers such as OpenAI, Anthropic, or Cloudflare Workers AI.
- The model was served locally until 23 October 2026. Inference ran with Ollama on the same machine that hosts the rest of the stack. Today text generation goes through OpenRouter (free plan,
data_collection: "deny"on every request), a third-party provider; semantic search and the index stay on the VPS. - Logs contain no document content. The ML service records operational metrics (latency, outcome, request size), not the text of the indexed document or the generated response.
- Indexed documents are plain text and JSON files readable without proprietary software. No closed binary format that requires the vendor's own application to open: it's the same architecture this site itself uses, where every article lives as an HTML+JSON pair in a folder, not in an opaque database.
This article can explain why the portability question arises and which architectural facts are relevant to answering it. It cannot, and should not, provide the answer in the client's own counsel's place, on the specific contract they signed or on how to meet their professional obligations for file retention.
The portability question: why only the client's own counsel can answer it
In the European Union, data portability has an explicit legal basis: Article 20 of Regulation (EU) 2016/679 (GDPR) grants the data subject "the right to receive the personal data concerning him or her... in a structured, commonly used and machine-readable format" and to transmit it to another controller — text verified on 2026-08-05 directly on eur-lex.europa.eu (CELEX 32016R0679). It's a real right, in force since 25 May 2018, but it covers personal data provided by the data subject, not an entire case file: the lawyer's own work product, correspondence with opposing parties, and court filings fall outside that article's scope. In the United States — the market this article is written for — there's no generally applicable federal equivalent for a law firm's documents: no rule requires a legaltech vendor to return data in a specific format within a set timeframe. There, portability is something the vendor contract decides — the exit clauses, the export formats it provides for, any migration costs — together with the jurisdiction's professional-responsibility rules on client-file ownership and retention, which generally treat much of the file as belonging to the client, but whose application to a specific case stays a judgment call for the client's own counsel, not something an architecture can settle. An architecture can reduce the number of vendors involved in the document flow (here: zero, for indexing and generation) and use open formats from day one, which is a fact relevant to that assessment. But determining what the specific contract allows, and what the specific professional-responsibility rules require, remains a judgment that depends on the documents signed and the jurisdiction — not on how well-designed the architecture hosting the data is.
What we can actually measure today on the same production machine
This section contains no estimates: every value was measured on the production machine on August 3, 2026, with read-only commands, the same measurement scorecard that feeds the rest of this series. These are single measurements (n=1 per condition), not a legal benchmark: they should not be read as a performance guarantee or as qualification for any specific use case.
- Generation latency, model already warm: 5.7-7.2 seconds for a short response (40-60 tokens), roughly 8-10 tokens per second — measured on 2026-08-03 on the production machine, CPU-only inference.
- First model load: roughly 13 additional seconds when the model isn't already resident in memory — a one-time cost after a period of inactivity, always to be read together with the warm figure.
- Ollama RAM footprint: roughly 19 MB at idle, 5.29 GB with the llama3.1:8b model loaded in memory — measured on 2026-08-03. The footprint isn't permanent: the model unloads after a period of inactivity.
- RAM available on the machine: 30 GiB total, 19 GiB still available even with the model loaded — measured on 2026-08-03.
- RediSearch vector index: 5.73 MB for 2,580 documents (1,290 articles in two languages) — measured on 2026-08-03: it's the order of magnitude that makes an on-prem RAG practical for a document archive comparable in size to a mid-sized law firm's, without dedicated infrastructure.
- Machine specs: 16 vCPU Intel Xeon (Skylake), 30 GiB RAM, average load of 1-3% after 65 days of continuous uptime — measured on 2026-08-03.
Declared trade-off: what you gain, what you give up keeping documents in-house
Keeping documents inside the client's perimeter doesn't eliminate the work a proprietary legaltech platform does: it shifts it. You gain control over the format (text and JSON, not a proprietary database) and one fewer vendor whose renewal you negotiate or whose price increase you absorb with little leverage, because the exit cost is low from day one. In exchange, you give up everything a mature platform builds over years: refined full-text search tooling over datasets of millions of documents, e-discovery workflows with a certified chain of custody, redundancy and backups run by a dedicated team, integrations with tools a firm already uses. Building an equivalent of a mature legaltech vendor's search and document management from scratch is a real engineering investment, not a free lunch: security patches, access control, monitoring, and backups stay with whoever runs the client's infrastructure, and an in-house semantic search engine needs ongoing maintenance that a SaaS subscription bundles into the price. On the technical side, a local 8-billion-parameter model remains a real ceiling for complex legal reasoning over long or multi-jurisdictional documents: for work that exceeds that ceiling, this same architecture might not be the right fit, and it's more honest to say so here than to find out after already migrating an entire archive.
What we're not showing, and why
This article doesn't show a real law-firm deployment, because none exists: the production stack behind these measurements serves semantic search over this site's own content, not a client's case files or legal documents. What we can state is how the same architectural shape — local indexing, on-prem inference, open formats, no third-party processor, logs without sensitive content — would apply to a legal document archive, without pretending we've already done it. The difference between "this architecture can host that kind of workload" and "this architecture has already been validated for that workload" is exactly the line the rest of this article tries to keep sharp.
Where this fits into data sovereignty
This article is the legaltech-domain reading of the broader question covered in the data sovereignty reference architecture: where an organization's sensitive data actually live and who can touch them. The infrastructure described here is the same one: no data leaves the client's perimeter, no third-party processor is involved, controlled degradation if the local service doesn't respond. Here the claim boundary matters just as much as in a regulated sector, because a portability claim about a specific vendor, published and later contradicted by that vendor's own contract, survives in caches and in AI assistants' citations long after it's been corrected — which is why this article makes no claims about any specific vendor's contract, only about its own architecture.
FAQ
Does this architecture solve the legaltech walled-garden problem?
Answer: We describe what the architecture does — no document leaves the client's perimeter, open formats, no third-party processor involved. Whether these facts are sufficient for the client's specific project, and how to handle migrating away from an existing vendor, is a determination for their own counsel, not this article.
Do legaltech vendors prevent you from exporting your own data?
Answer: It depends on the contract signed with that specific vendor — this article makes no claims about any particular vendor. It describes instead how an architecture works when it uses open formats from the start, by construction, reducing the problem at the root rather than having to negotiate an exit later.
Is data portability a legal requirement?
Answer: In the EU, Article 20 of the GDPR codifies it as a right, but only for personal data provided by the data subject, not an entire case file. In the US there's no generally applicable federal equivalent: it's a contractual and professional-responsibility question the client's own counsel has to evaluate case by case.
What can we say with certainty about the infrastructure today?
Answer: The architectural figures measured on 2026-08-03 on the production machine: generation latency of 5.7-7.2 seconds warm, RAM footprint of 19 MB at idle and 5.29 GB with the model loaded, a vector index of 5.73 MB for 2,580 documents, a machine with 16 vCPU and 30 GiB RAM at 1-3% load.
Why don't you show a real law-firm case?
Answer: Because none exists: the stack measured here serves search over this site's content, not legal documents. We describe how the same architectural shape would apply to a legal document archive, not a deployment we haven't done.
Commenti
Caricamento commenti...
Sign in to comment