Why scanned PDFs need OCR in Open WebUI knowledge bases
When a team uploads contracts, forms or archived reports that are scans, the knowledge base often answers poorly or not at all. The reason is usually not the model. Choosing how Open WebUI extracts text from scanned PDFs is both an extraction engine decision and a data handling decision. A scanned PDF is an image of a page, so it normally has no text layer for the parser to read. Whatever the extraction step produces is what gets split into chunks, embedded and retrieved, so extraction quality sets the ceiling on retrieval quality. If the text is missing, garbled or out of order, no embedding model or reranker can recover it later.
This page covers three routes. The first is the hosted Mistral OCR route, which sends page images to an external API. The second is a self-hosted extraction service that runs inside your infrastructure and is reached through Open WebUI's external extraction engine. The third is the residency trade-off between them. A hosted OCR API may be faster to start with and may need less local compute, but every scanned page leaves your network, and those pages often contain personal, financial or health data. Before you pick a route, confirm with your privacy and legal teams where the provider processes and stores documents, what the contract says about retention and training, and whether your sector rules allow that transfer. Also confirm the current Mistral OCR setup steps in the Open WebUI documentation, since the exact configuration fields and supported engines can change between releases, and check which release you run against the Open WebUI releases on GitHub page.
Treat the decision as a test, not a preference. Pick a representative sample of your scans, including poor-quality ones, run each candidate route, and review whether the cited answers are correct. Record which route processed each file so the knowledge base can be audited later. Changing the extraction engine on existing documents generally means reprocessing them, so decide before you load the full archive. The sections that follow explain the setup and the controls around each route.
How a scanned file moves from upload to searchable knowledge
The file starts as an upload in the Open WebUI knowledge base. It then goes to one of three extraction paths: the built-in parser, a self-hosted extraction service, or a hosted Mistral OCR API. Only the hosted path sends the file outside the organization's network, so that boundary is drawn separately. After extraction, the text is chunked and embedded, and the vectors are written to a vector store. The embedding model and vector store are configured separately by the operator, so check both before indexing sensitive documents.
Scanned files take one of three extraction paths, and only the hosted OCR path leaves the network.
Which extraction path fits which document set
This table compares a hosted Mistral OCR API, a self-hosted extraction service behind Open WebUI's external extraction engine, and built-in parsing for files that already contain a text layer. Read each column against your document sensitivity and your team's ability to run a service, then confirm the engine settings in the Open WebUI version you run.
| Question | Hosted Mistral OCR API | Self-hosted extraction service | Built-in parsing for text PDFs |
|---|---|---|---|
| Where page images are processed | On the OCR provider's hosted infrastructure, outside your network | Inside your own infrastructure, on hosts you select | Inside the Open WebUI container, on text already embedded in the file |
| Who operates the service | The provider operates the OCR service; you manage the API key and calls | Your platform or security team operates the extraction service and its updates | Open WebUI operators only; no separate service |
| Data residency position | Scanned pages leave your boundary and are subject to the provider's terms and regions; confirm them before use | Pages stay inside the boundary you define, subject to your own retention and logging | No page images leave the deployment; scanned pages without a text layer are not read |
| Best fit | Non-sensitive scanned material where a hosted API is approved and the team has no service to run | Sensitive scans, regulated records or air-gapped networks where image data must stay in-house | Digitally generated PDFs and Office files that already contain extractable text |
| Main operating burden | Key management, rate limits, cost per page and change control on the provider's side | Sizing, patching, model and language support, health checks and access control for the service | Low; the main risk is missing text in scans that look like text PDFs |
| Verify before choosing | Provider contract, data retention, sub-processors and regions for the account you use | Engine type, endpoint and authentication settings in your Open WebUI version | Whether your sample files extract cleanly, including tables and multi-column pages |
What a hosted OCR API means for data residency
A hosted OCR API receives the contents of every page you send it, so the provider's processing location, retention period, subprocessors and contract terms become part of your own data map. The moment a scanned contract, patient letter or account statement leaves your network for OCR, the organization is making a transfer decision, and that decision belongs to your privacy, legal and security owners, not to the team that wired up the knowledge base. Treat the OCR provider as a new processor for any document class you upload, and record it alongside the other systems that touch that data.
Those terms interact with three obligations that usually sit in different teams. Privacy obligations may require a record of processors, a lawful basis for the transfer and a way to honor deletion requests. Outbound network policy determines whether the Open WebUI server can reach the provider at all, and whether that egress is logged and allowed for this destination. Internal rules, such as a prohibition on sending regulated records outside the boundary or outside a named region, may block the workflow entirely for some collections even when the provider's terms are acceptable. Map each knowledge base to its data class before deciding which extraction path it may use, so that a hosted OCR setting is never applied globally by default.
Before any production upload, ask the provider for its current data processing terms, including processing locations, retention and deletion of submitted files, subprocessor lists, breach notification commitments and any use of submitted content for service improvement. Confirm each point in writing with your legal and security teams, and keep the version you reviewed with the change record. Where the answers do not fit a data class, the realistic alternative is a self-hosted extraction service inside your boundary, and that choice should be made before the knowledge base is populated, since moving documents later means re-running extraction on each one.
Setting up OCR for a knowledge base step by step
This sequence takes a scanned PDF workflow from an unconfirmed setup to a knowledge base that has been checked against the source pages. Each step ends with a check, so extraction problems surface before users depend on the knowledge base.
Confirm the Open WebUI version and engine options
Check which Open WebUI version your deployment runs and compare it with the release notes on the project's Open WebUI releases on GitHub page. In the admin settings, open the document extraction options and record every engine that version offers, including any external extraction engine option. Done when you have a written list of engines for this exact version, which is the input for the residency decision in the next step.
Choose the extraction route from the residency decision
Decide with your security and compliance leads whether scanned pages may leave your environment. If they may not, route extraction to a self-hosted service that your team runs inside your infrastructure. If a hosted OCR API is acceptable, confirm the provider's data handling terms, where processing happens and whether files are retained before any production document is sent. Record the decision and its owner, because it determines the engine and endpoint you configure next.
Configure engine credentials or the service endpoint
An administrator enters the credentials for a hosted OCR engine, or the URL of a self-hosted extraction service, in the admin settings for the chosen engine. Use a service account with the narrowest access the provider offers and keep the key out of shared notes. For a self-hosted service, confirm the endpoint is reachable from the Open WebUI containers and not exposed to the internet. Done when the settings save without error and a small trial document is processed successfully.
Run a test upload with representative scans
Build a test set from the documents you actually plan to ingest: clean scans, faint or skewed photocopies, pages rotated 90 degrees, mixed languages, and pages with tables or stamps. Upload them to a test knowledge base that no user relies on. Record any file that fails, times out or returns empty text, since these failures later appear as answers that are simply missing. Done when every file has a processing status and you have a list of failures to investigate.
Check extracted text against the source pages
Pick a sample of pages from each test file, including the poor-quality and rotated ones, and compare the extracted text with the scan for names, figures, dates and negations such as "not" or "no." Check that headings and table rows stay in order and that rotated pages were read in the correct orientation. Done when the sample has been reviewed field by field and you have decided whether the engine is accepted for these documents or needs a different route.
Confirm chunks appear and answers can be retrieved
Open the test knowledge base and confirm that each processed file produces chunks. Search for several facts you verified in the previous step and check that the matching chunk contains the correct text. Record the engine and version used for each knowledge base, because changing the extraction engine later requires re-processing the documents it affected. Done when every verified fact is retrievable and the engine record is stored with the knowledge base.
Security controls for OCR pipelines in Open WebUI
Scanned PDFs often contain the most sensitive text an organization holds, and OCR adds a processing step that can send that text outside your network. The cards below cover the controls that decide where scan content travels, who can reach it, and how long copies persist.
Outbound egress for hosted OCR
If you use a hosted OCR API, the Open WebUI server or extraction worker needs outbound access to that one provider endpoint and nothing else. Restrict egress at the firewall or proxy by destination, and log denied attempts. Verify that a test upload fails when the allowlist excludes the provider, so you know the rule is enforced rather than assumed.
Storage of the OCR API key
The API key for a hosted OCR service grants the ability to submit your documents under your account, so it belongs in a secrets store, not in a compose file or the admin settings page where it may be visible to other administrators. Confirm who can read the key, that it rotates on a schedule, and that it is absent from exported configuration backups.
Access to the extraction endpoint
A self-hosted extraction service should accept connections only from the Open WebUI backend, not from user workstations or the wider network. Place it on an internal network segment, require authentication on its API where the service supports it, and confirm with a request from an unapproved host that the endpoint refuses it.
Retention of scans and caches
Uploaded scans persist in Open WebUI file storage, and OCR output may persist in temporary caches or the vector store after the source file is removed. Document where each copy lives, set a deletion procedure for knowledge base files, and test that removing a file also clears its extracted text and embeddings. Ask your OCR provider for its stated retention period for submitted files.
Logs without document text
Extraction errors and debug logs can capture page text, filenames or payloads, which then spread into log aggregation systems with weaker access rules. Set log levels for the extraction path to omit content, scrub filenames where they reveal sensitive subjects, and review a sample of logs after a failed scan to confirm no document text appears.
Upload rights by knowledge base
Role-based access control in Open WebUI decides who can add files to each knowledge base, so a scanned contract batch should not be uploadable by every signed-in user. Map groups to knowledge bases, grant write access only to the teams that own the material, and verify with a test account from an unrelated group that the upload control is refused.
OCR patterns for connected and restricted networks
In a connected deployment, Open WebUI sends scanned pages over outbound HTTPS to a hosted OCR API, such as Mistral OCR, and receives extracted text back for the knowledge base. Scanned pages often contain personal, financial or health data, so the document content leaves your boundary and the provider's terms become part of your data protection position. Treat the hosted service as a data processor that needs formal approval before any production file is uploaded.
- Network path: Allow outbound HTTPS only from the Open WebUI runtime to the provider's documented endpoint, through your egress proxy where one exists, and block other destinations.
- Provider agreement: Obtain written confirmation of processing location, retention periods, whether customer content is used for model training, subprocessors and breach notice terms before rollout.
- Credential handling: Store the provider key in your secrets manager, limit who can view or change it in Open WebUI administration, and rotate it on a schedule your security team sets.
- Failure behavior: Decide what happens when the provider is slow, rate-limited or unavailable, and confirm that failed files are not silently stored without text.
- Data classification: Define which document classes may be sent to the hosted service and block the rest at the knowledge base or upload policy level.
Before go-live, test with representative scanned samples that include sensitive content, and verify in egress logs that traffic reaches only the approved endpoint. Confirm the exact endpoint, region and contract terms with the provider and your legal team, since these details can change.
In a restricted network, Open WebUI has no route to the public internet, but it can reach internal services. Extraction runs in a self-hosted service inside your boundary, so scanned pages never leave the network. The main work is placing the extraction component, approving its software and models, and making sure your own team can patch and operate it.
- Network path: Permit traffic only from Open WebUI to the internal extraction endpoint, with no default route outward, and confirm that DNS resolution for external names fails as intended.
- Extraction component: Choose a self-hosted OCR or document engine that you can run in your environment, or a custom service reached through Open WebUI's external extraction engine setting. Confirm the exact configuration keys against the version you deploy.
- Approvals: Review the software license, the provenance of container images and model weights, and vulnerability scan results, and record them under change control before deployment.
- Operations ownership: Name the team that patches the extraction service, sizes its capacity and restores it after failure, since this component is not managed by the Open WebUI project.
- Log handling: Check whether extraction logs or temporary files keep document text, and set retention and access rules to match the data classification.
Test extraction on a sample set of your own scanned documents, including skewed, low-resolution and multi-language pages, and compare results against the text a reviewer expects. Verify the network block with a test from the Open WebUI host, because a policy that exists on paper may not be enforced.
In an air-gapped site, neither Open WebUI nor the extraction service can reach external networks, so every component, model file and update arrives through a controlled import path. The air gap changes how software is delivered and verified more than how OCR works. Any fallback that calls a hosted API must be removed, not just left unused, because a failed call can expose the site's policy gap in logs.
- Offline artifacts: Move container images, OCR language data and model files on approved media, verify checksums against the values recorded at the source, and log each transfer.
- Internal registries: Host container images and packages in internal registries so installation and upgrades do not depend on public repositories.
- Outbound checks: Disable any update or telemetry checks that would attempt external connections, and confirm the firewall logs show no blocked attempts after startup.
- Hosted fallback removal: Remove hosted OCR settings and keys from the deployment so the system cannot route documents to a provider even on error.
- Upgrade path: Include the extraction service and its language data in each Open WebUI upgrade test, because a new release may need matching components.
Before acceptance, run ingestion of scanned documents with external routes cut, confirm that extraction succeeds, and check that no connection attempts to hosted services appear in logs. Ask your vendor and integrator to confirm which components phone home during installation and during normal operation.
Limits to confirm before you rely on OCR output
OCR quality and provider behavior vary by version, deployment shape and document set, so a scanned PDF that extracts well in a demo can still fail in production. The items below are the checks to run in your own environment before you rely on extracted text for retrieval.
Engine option in your version
Confirm that the Open WebUI version you plan to run exposes the content extraction engine setting you need, including the Mistral OCR option or your self-hosted service. Check the release notes for the version you deploy, since the latest supplied release is v0.12.3, published on October 16, 2026. Do not assume an option exists in an older release because a later one has it.
Open WebUI releasesShared storage for multiple replicas
With more than one replica, uploads and knowledge must be reachable from every instance, and the scaling guide requires Redis and shared file storage for this. Confirm that OCR output and source files land on shared storage, and that an external vector database replaces the default ChromaDB before you run several workers or replicas.
Scaling guideRe-processing after an engine change
Test whether existing knowledge base documents are re-extracted when you change the engine, or whether only new uploads use it. If they are not, scanned files already indexed with a weak parser keep their old text until you re-upload them. Record which behavior you observe in a pilot and write the re-indexing steps into your change procedure.
Retrieval quality on poor scans
Skewed pages, low resolution, handwriting and stamps can produce partial or misordered text that still gets indexed without an error. Run a sample of your worst scans through a question set and compare answers against the source pages. Retrieval will look correct on clean documents and degrade quietly on the rest.
Language and table validation
Check that the OCR output preserves the languages your documents use, including diacritics and right-to-left text, and that tables keep their row and column structure. Ask the provider or your extraction service vendor which languages and table formats they document, and verify both with a sample set you review by hand.
Provider rate and file size limits
A hosted OCR API can enforce request rate limits, maximum file sizes and page counts that a large batch upload will hit. Confirm the current limits in the provider's documentation and plan batch sizes, retries and queueing around them. For a self-hosted service, confirm the concurrency and memory limits you configure.
Questions teams ask before adding OCR to a knowledge base
What drives the cost and effort of OCR for scanned PDFs?
Cost follows the extraction engine, the document volume and the work to run whatever you choose. A hosted OCR API bills per usage under the provider's terms, so the cost recurs with every document you process. A self-hosted extraction service has no per-page fee, but your team or a partner pays for the hardware, deployment, patching, monitoring and capacity planning. Testing adds effort in both cases, because scanned pages vary in skew, resolution, tables and handwriting. Ask any quote to separate one-time setup from recurring usage, and to name who carries each item.
How long does an OCR pilot take, and what sets its duration?
The duration depends on how many document types you must support, how many pages you test, and how quickly the owner can approve the residency decision and access. No duration is supplied for this topic, so ask any partner or vendor for a timeline tied to a written scope. A pilot usually moves faster when it uses a fixed set of representative files and one clear success check, such as whether answers cite the right passages. It slows when scanned archives include poor-quality images or when security review of a hosted API starts late.
What does the internal team need to provide for OCR work?
Three things are needed before work starts. First, administrative access to the Open WebUI instance and the place where the extraction service or its credentials will live. Second, a test corpus of real scanned PDFs and images, including the awkward cases such as rotated pages, stamps and low-resolution scans, with any sensitive content handled under your own rules. Third, a named owner who can make the data residency decision and sign off on the document types in scope. Without that owner, pilots tend to stall at the point where a hosted service is proposed.
Can a team add OCR to Open WebUI without outside help?
Yes, if the team has someone comfortable with Docker or Kubernetes, the Open WebUI admin settings and basic document testing. The configuration itself is a matter of choosing an extraction engine and entering its connection details, so the harder part is usually the surrounding work: sizing the service, protecting credentials, testing across a varied corpus and keeping the setup working through upgrades. Teams that lack capacity for that ongoing work often bring in a partner for the build and then run the service themselves.
How should we decide between a hosted OCR API and self-hosted extraction?
Start with where your documents may go. A hosted OCR API sends file contents to an external provider, so the decision depends on your data classification, contracts and any regulatory limits on data leaving your environment. A self-hosted extraction service keeps files inside infrastructure you control, but adds operating work. Compare the quality on your own sample pages, the per-document cost at your expected volume, and the team time required to run each option. Record the decision and its reason so auditors and security reviewers can trace it.
Do we need to re-index knowledge bases after changing the OCR engine?
Usually yes for the documents affected by the change. Text extracted by one engine can differ in wording, reading order and table structure from text extracted by another, so passages and their embeddings may no longer match. Treat a change of engine as a re-ingestion event: test the affected knowledge bases, plan the processing window and confirm that old entries are removed or replaced. Check the Open WebUI documentation for the behavior of your version before you change production settings.
What should a quote for OCR work include?
A quote should state the written scope: which file types and approximate page volumes are covered, which extraction engine is used, and whether the work includes self-hosted deployment, Open WebUI configuration, testing on your corpus, documentation and handover. It should separate one-time work from recurring costs such as hosted API usage, infrastructure and support. Ask for the assumptions behind any duration, the acceptance criteria for the test set, the items the client must provide, and how changes to scope are priced. DeployOpen agrees scope, deliverables and timelines in writing before work starts.
How DeployOpen works on this
DeployOpen plans and builds the OCR path for scanned PDFs and images inside your own infrastructure, so the choice between a hosted OCR API and a self-hosted extraction service is made on written evidence. The engagement is fixed-scope, with the file types, data handling rules and knowledge base changes agreed before any build starts.
How we scope
- We inventory the scanned PDFs and images your knowledge bases must hold, including languages, scan quality and page counts.
- We document where document content may leave your network and which OCR path, hosted or self-hosted, your data rules permit.
- The written scope lists the extraction routes, test corpus, deliverables and timeline, and engagements are fixed-scope by default.
How we build
- We configure Open WebUI's document extraction settings to route scanned files to the chosen OCR engine, with fallbacks for failures.
- We deploy any self-hosted extraction service in your infrastructure with access limits, sizing notes and logging appropriate to your environment.
- We test extracted text against a sample of your scanned documents and review re-ingestion behavior for existing knowledge bases.
How we hand over
- You receive configuration records, the chosen OCR routing decision and the data flow for each document type in writing.
- Runbooks cover failure handling, credential rotation for any hosted OCR API key and steps to re-process a knowledge base.
- We walk your platform and compliance teams through the test results so they can review the setup against their own requirements.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, including review after Open WebUI version changes.
- We can re-test OCR quality when you add new scan types, languages or a different hosted or self-hosted engine.
- Support scope, response expectations and any service levels are set in the written agreement, so confirm them before signing.

