External document loader for OpenWebUI with native PDF extraction and vision OCR.
193
A lightweight external document loader for OpenWebUI that extracts text from native PDFs locally and uses an OpenAI-compatible vision model only when OCR is needed.
Designed for self-hosted deployments where scanned PDFs, mixed PDFs, and normal text PDFs need to be ingested into OpenWebUI reliably without sending every page through a vision model.
OpenWebUI
|
v
Vision Extractor
|
+-- Native text page --> PyMuPDF
|
+-- Scanned/image page --> Render PNG --> Vision API
|
+-- Plain text --> Direct passthrough
|
v
Extracted text --> OpenWebUI RAG
PDF pages are evaluated individually, so a single document can contain both native-text and scanned pages.
Vision pages can be processed concurrently while the final output remains in the original page order.
| Input | Support |
|---|---|
| Native-text PDF | Yes |
| Scanned PDF | Yes |
| Mixed / hybrid PDF | Yes |
| Plain-text formats | Yes |
| Standalone images | No |
| DOCX / XLSX / PPTX | No |
In Admin Settings -> Documents:
Content Extraction Engine:
External
External Document Loader URL:
http://openwebui-vision-extractor:8080
External Document Loader API Key:
<EXTRACTOR_API_KEY>
The extractor and OpenWebUI should normally share the same Docker network.
services:
openwebui-vision-extractor:
image: rizkybs70/openwebui-vision-extractor:latest
container_name: openwebui-vision-extractor
restart: unless-stopped
environment:
EXTRACTOR_API_KEY: "change-this-token"
UPSTREAM_BASE_URL: "http://your-vision-api:port/v1"
UPSTREAM_API_KEY: "your-api-key"
UPSTREAM_MODEL: "your-vision-model"
TEXT_MIN_CHARS: "20"
VISION_CONCURRENCY: "2"
networks:
- ai
read_only: true
tmpfs:
- /tmp:size=64m
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
networks:
ai:
external: true
For production deployments, pinning a specific version is recommended instead of relying on latest.
Example:
rizkybs70/openwebui-vision-extractor:1.1.1
| Variable | Default | Purpose |
|---|---|---|
UPSTREAM_BASE_URL | configurable | OpenAI-compatible API endpoint |
UPSTREAM_MODEL | configurable | Vision model or model alias |
TEXT_MIN_CHARS | 20 | Native text detection threshold |
VISION_CONCURRENCY | 2 | Concurrent vision pages |
RENDER_DPI | 160 | PDF render resolution |
MAX_FILE_MB | 50 | Maximum upload size |
MAX_PAGES | 100 | Maximum PDF pages |
MAX_DOC_SECONDS | 900 | Document processing budget |
GET /health
Checks whether the extractor application is running.
It does not contact the upstream vision provider.
GET /ready
Checks required configuration and performs a lightweight upstream connectivity check without running vision inference.
Main document processing endpoint:
PUT /process
Authorization: Bearer <EXTRACTOR_API_KEY>
The request contains the raw document bytes and returns extracted text for OpenWebUI.
Recommended deployment:
tmpfs for temporary runtime datacap_drop: ALLno-new-privilegesLatest: 1.1.1
Image:
rizkybs70/openwebui-vision-extractor:latest
rizkybs70/openwebui-vision-extractor:1.1.1
See the versioned Docker Hub tags for previous releases.
Content type
Image
Digest
sha256:e5ae8afb7…
Size
73.6 MB
Last updated
4 days ago
docker pull rizkybs70/openwebui-vision-extractor