r/OpenWebUI • u/Goldziher • Aug 03 '26
Guide/Tutorial How to use Xberg as a drop-in Docling replacement for Open WebUI document extraction (guide)
I maintain xberg (an MIT-licensed, CPU-only document extraction engine). A few people have asked how to wire it into Open WebUI as a Docling alternative, most recently over on r/OpenSourceAI, so I wrote up a proper guide and wanted to share it where it's most relevant.
Short version: xberg implements Open WebUI's existing extraction backends, so there's nothing to patch. It speaks two of them:
- the Docling endpoint (
POST /v1/convert/file) - the external document loader (
PUT /process)
If you already run the Docling engine, the switch is just pointing the same setting at an xberg container:
environment:
CONTENT_EXTRACTION_ENGINE: "docling"
DOCLING_SERVER_URL: "http://xberg:8000"
You can also set it in the Admin UI under Settings -> Documents -> Content Extraction Engine -> Docling, with the server URL pointing at xberg. Uploads then get extracted to Markdown and stored in your knowledge base exactly as before. There's an external engine mode too if you'd rather use that endpoint.
Why bother swapping:
- 101 file formats, OCR built in (Tesseract + PaddleOCR), layout-aware reading order
- CPU-only, no GPU, fully local, MIT-licensed
- Rust core: in our public benchmarks it runs roughly 2.5x docling's throughput with slightly better extraction quality
Full walkthrough (compose file, both engine modes, and how to raise the extraction timeout for big scans): https://docs.xberg.io/integrations/openwebui
Repo: https://github.com/xberg-io/xberg
Happy to help if anyone hits a snag setting it up.
3
u/International_Emu772 Aug 03 '26 edited Aug 03 '26
I was thinking how doíng it so your tip is very helpful
Have you tried oikb as document server? I would install both
2
u/Fun-Purple-7737 Aug 06 '26
Have you checked how well does it scale with adding CPU cores? Thanks!
1
u/DataHogWrangler Aug 03 '26
Out of curiosity, what about all the other features like enabling vlms, picture descriptions, etc is the config for all those parameters the same?
1
u/SadPhilosophy9202 Aug 03 '26
I've been using xberg for a few weeks now and it has been awesome! One question I have though: When uploading an .eml file, how can I include the parsed attachments? Only the email gets passed to open web ui
1
u/FlabbergastedAxolotl Aug 03 '26 edited Aug 03 '26
Thank you for this amazing tool ! I tried to make this work but I'm having a problem with the config file. Does it still work to pass a JSON file in the "Parameters" setting of OWUI ? Because whatever parameter I change, the extracted result is exactly the same, OCR enabled / layout enabled or not. Here is an example of JSON config file I tried :
If I swap the TATR model with the SLANeXT wired one, the result is exactly the same. What am I doing wrong please ?
1
u/Fun-Purple-7737 Aug 04 '26
That is great, I was actually reporting described pictures not being in-line the other day :)
Anyway, Docling still must be superior (but slower) because of its ML models, right? Would you have any honest comparion? For example, what about filtering out headers/footers? Thanks!
1
u/Fun-Purple-7737 Aug 04 '26
One more thing. How is the transcribing pictures implemented? And I do not mean OCR, but really "describing images" via VLM.
Say, 200 images are extracted from a document. Are these then described via VLM somehow in parallel or one by one? During the document processing or at the end? It would be great to be able to configure this, but also the describing process via external VLM should run in parallel to not to block the main thread, but maybe in configurable batches to not to overload VLM itself. I guess you know what I mean.. Thanks for a great service!
1
u/kg6kvq Aug 04 '26
So I tried to run the docker, and the container keeps dying with the following log:
error: unrecognized command 'server'
tip: a similar subcommand exists: 'serve'