Offline OCR archive — project plan
Plan as of 2 December 2026
Summary
We propose a self-hosted document archive that turns about 20 years of scanned paper into searchable, tagged PDF/A files, installed on the customer's own server and working with no internet connection.
- Base: Paperless-ngx (open source, GPL-3.0) with the Tesseract OCR engine and its German language model. It keeps every original, adds a text layer, and gives staff full-text search in a web browser.
- Optional second pass: PaddleOCR-VL (Apache-2.0), a small AI model for the pages Tesseract reads badly: tables, faded scans, handwriting.
- Offline by design: every program, language file and AI model is packed into the installer. Nothing is downloaded at runtime and updates arrive as an offline bundle.
- Decided by measurement: a pilot on about 200 of the customer's real pages sets the accuracy, the speed and the hardware before the full quote.
Requirements and constraints
The system must run entirely inside the customer's network, read German reliably, and keep the archive legally usable.
| Requirement | What it means for the build |
|---|---|
| Installed in-house | Runs on one server owned by the customer, as Docker containers. No cloud service, no subscription. |
| Works offline | All container images, Tesseract language data and AI models are shipped on the install media. Paperless-ngx's optional cloud OCR (Azure) and cloud AI stay off; its AI features, if wanted, run locally through Ollama. |
| German documents | Paperless-ngx ships German Tesseract data by default, so nothing is downloaded. OCR language set to deu+eng (the default is English only). |
| Data protection (DSGVO) | Documents never leave the server. Access by named user accounts, with permissions per document, tag or group. |
| Originals kept | Paperless-ngx stores the unaltered original next to the searchable PDF/A copy. |
| Paper destroyed after scanning? | Only if the customer wants it ("ersetzendes Scannen"). Then the scanning process must follow GoBD, and the BSI guideline TR-03138 RESISCAN (v1.5, 21.11.2024) is the reference. A written process document (Verfahrensdokumentation) is needed; their tax adviser should sign it off. |
User logins: the server is offline, so it cannot use an online sign-in service. Staff sign in with local accounts, or through the customer's own directory if they have one (Paperless-ngx supports OpenID Connect and reverse-proxy sign-in).
Open questions for the customer
These answers set the price and the hardware; we need them before the pilot.
- Volume: how many pages, roughly (number of folders or boxes is enough)?
- Scan state: already scanned? If yes: file format, resolution (dpi), colour or black-and-white, one file per document or one per batch? If no: scan in-house or use a scanning service?
- Content: typed letters and invoices, forms, tables, drawings? What share is handwritten?
- Languages: German only, or also English, French or others?
- Goal: search the archive, or also extract data (dates, amounts, customer numbers) into a spreadsheet or their ERP / accounting software?
- Paper: keep it after scanning, or destroy it (ersetzendes Scannen, see above)?
- Users: how many people, which departments, who may see what? An existing user directory (Active Directory, LDAP)?
- Hardware: spare server or virtual machine available? CPU, RAM, disk, GPU? Existing backup system?
- Ongoing use: archive only the old documents, or also new mail and scans every day?
- Support: who runs it after go-live, and how are updates delivered to an offline machine (USB, internal file share)?
Proposed solution
Paperless-ngx does the OCR, the filing and the search; PaddleOCR-VL is added only if the pilot shows Tesseract misses too much.
Scans enter through a watched folder, staff reach the archive from their browsers, and nothing crosses the building's network boundary except the hand-carried off-site backup.
- Paperless-ngx, version pinned at install (latest today: v3.5.1, 18 Nov 2026), runs as Docker containers. Tesseract reads each page and Paperless-ngx stores the original next to a searchable PDF/A copy.
- Automatic filing: Paperless-ngx learns tags, senders and document types from the documents staff file by hand, then suggests them for new ones.
- PaddleOCR-VL (optional): our own small script picks the documents whose text is poor, has PaddleOCR-VL re-read them, and writes the better text back through Paperless-ngx's API (
PATCH /api/documents/{id}/). Search then uses the better text. The PDF/A file keeps Tesseract's text layer, and the original is never changed. - What we build ourselves: the offline install bundle, the PaddleOCR-VL script, the backup job and the checks. Everything else is unmodified open-source software.
Phases
Six phases, each closed by a gate; the pilot is the go/no-go point where accuracy, speed and the fixed price are agreed.
Durations are set after discovery, because they depend on the page count and scan quality, which we don't know yet. The pilot runs on the customer's premises, or on sample pages they send us under a data-processing agreement (AVV, DSGVO Art. 28).
Hardware sizing
One Linux server is enough; the figures below are a starting point and the pilot replaces them with measured ones.
| Part | Starting point | Confirmed by |
|---|---|---|
| Operating system | Debian or Ubuntu LTS with Docker | — |
| CPU | 8 cores or more: Tesseract OCR runs on the CPU, one page per core at a time | Pilot: seconds per page × page count = bulk run time |
| RAM | 32 GB | Pilot: peak memory during the run |
| Disk | Pages × measured MB per page × 2 (original + PDF/A copy) + database and search index + 50 % headroom | Pilot: MB per page on the customer's own scans |
| GPU (only if PaddleOCR-VL is used) | NVIDIA card with compute capability 8.0 or higher (RTX 30/40/50 series, A10, A100), as PaddleOCR recommends; older cards are "prone to timeouts or OOM" with its fast engine | Pilot: pages per minute with and without the GPU |
| Backup | A second disk or NAS in the building, plus an off-site copy rotated by hand | — |
If the pilot shows Tesseract is good enough, the GPU is dropped and the server costs less.
Running it offline
The server never reaches the internet; everything it needs arrives on install or update media that we build and test first.
- Install bundle: container images saved as files, the Docker Compose file, the configuration, Tesseract language data and (if used) the offline PaddleOCR-VL image with its model files. One script installs it all from a USB disk.
- No downloads at runtime: PaddleOCR downloads its models on first run unless local model folders are set, so the bundle sets them. Install acceptance includes a full test with the network cable unplugged.
- Updates: two or three times a year, or for a security fix, we build a new bundle, test it on a copy of the setup, and deliver it on USB or an internal file share. Each update starts with a backup.
- Backups: Paperless-ngx's own
document_exporterwrites all documents, metadata and settings to a folder and can update an existing export, so nightly incremental copies to the NAS are simple. An export only restores into the same Paperless-ngx version, so each backup records the version number. - Health checks: the built-in
document_sanity_checkerchecks every original and archive file against its stored checksum. It runs weekly and a restore is rehearsed once a year. - Audit trail: Paperless-ngx's audit log records every change made to a document.
Risks
The biggest risk is poor scans; the pilot exists to find that out before money is committed.
| Risk | Effect | What we do |
|---|---|---|
| Poor or faded scans, low resolution | Words misread, so documents can't be found | Measure the error rate in the pilot; re-scan the worst batches at 300 dpi; send those pages through PaddleOCR-VL |
| Handwriting | Tesseract reads little of it | Measure in the pilot; PaddleOCR-VL claims handwriting support, but it is unproven on German until tested |
| Volume bigger than expected | Bulk run takes weeks | Bulk run speed measured in the pilot; run in batches overnight and at weekends; add CPU cores if needed |
| Paper destroyed without a compliant process | Documents lose their value as tax evidence | Keep paper until a Verfahrensdokumentation is signed off by the tax adviser |
| Offline server falls behind on security fixes | Known vulnerabilities stay open | No internet exposure; scheduled update bundles; access only from the office network |
| Disk failure | Archive lost | Nightly export to a NAS, off-site copy, yearly restore test |
| Licences | Legal exposure for the customer | Only tools whose code and models allow commercial use: Paperless-ngx (GPL-3.0), Tesseract and PaddleOCR (Apache-2.0). Surya / Marker are excluded because their models restrict commercial use |
Sources
All checked on 2 December 2026.
- Paperless-ngx repository (licence GPL-3.0) and releases (v3.5.1, 18 Nov 2026)
- Paperless-ngx docs in the repository: features, configuration (OCR languages, OIDC, local AI), usage (permissions), administration (backups, sanity checker), API
- Tesseract releases (5.5.5; licence Apache-2.0)
- PaddleOCR repository (licence Apache-2.0) and PaddleOCR-VL guide (GPU needs, offline image, local model folders)
- BSI TR-03138 RESISCAN v1.5 and its legal notes, Anwendungshinweis R
- Surya model licence and Datalab pricing (why Surya / Marker are excluded)