Setting up docling-serve¶
docling-serve is the server that does the conversion. The plugin talks to it over HTTP, using these endpoints:
| Endpoint | Used for |
|---|---|
GET /health |
Test Connection, and a check before every batch |
POST /v1/convert/file |
Conversion on the sync endpoint (the default) |
POST /v1/convert/file/async |
Submitting a conversion on the async endpoint |
GET /v1/status/poll/{task} |
Checking an async conversion |
GET /v1/result/{task} |
Downloading a finished async conversion |
GET /v1/capabilities |
Choosing the request field for remote vision APIs |
Install¶
Pick one. They all give you a docling-serve the plugin can use.
Needs Python 3.10+ and uv.
uv tool install "docling-serve[ui]" # one-time install
docling-serve run # leave this terminal open
Needs Python 3.10+ and pipx.
pipx install "docling-serve[ui]" # one-time install
docling-serve run
No Python needed.
# CPU only (any host)
docker run -p 5001:5001 \
-e DOCLING_SERVE_ENABLE_UI=true \
quay.io/docling-project/docling-serve:latest
# NVIDIA GPUs (CUDA)
docker run --gpus all -p 5001:5001 \
-e DOCLING_SERVE_ENABLE_UI=true \
quay.io/docling-project/docling-serve-cu128:latest
On Apple Silicon Macs, the docling-serve[ui] install includes mlx-vlm,
which speeds up VLM models.
Check that it runs¶
Open http://localhost:5001/ui for docling-serve's own playground, or run:
curl http://localhost:5001/health # → {"status":"ok"}
The plugin's Test Connection treats only that exact {"status":"ok"} body
as success.
First conversion downloads models¶
The first conversion downloads the models from Hugging Face. Expect 2–10 minutes for the standard pipeline and much longer (several GB) for VLM presets. Later conversions are fast. The Zotero progress window looks stuck while this happens.
Set a Hugging Face token before starting the server so the download isn't rate-limited:
export HF_TOKEN=hf_yourTokenHere # from https://huggingface.co/settings/tokens
docling-serve run
Server settings that matter to the plugin¶
These are docling-serve environment variables, set where you start the server. The plugin can't change them.
| Variable | Default | Why it matters |
|---|---|---|
DOCLING_SERVE_MAX_SYNC_WAIT |
120 s | The sync endpoint gives up after this and answers HTTP 504. Time spent queued counts. Use the async endpoint for long conversions. |
DOCLING_SERVE_ENG_LOC_NUM_WORKERS |
2 | How many conversions the server runs at once. Raise it to make Parallel conversions above 2 useful. |
DOCLING_SERVE_ENABLE_REMOTE_SERVICES |
off | Required for remote vision APIs. |
DOCLING_SERVE_ALLOW_CUSTOM_PICTURE_DESCRIPTION_CONFIG |
off | Lets the plugin use the newer remote vision field. See Remote vision APIs. |
DOCLING_SERVE_DEBUG_ERROR_DETAILS |
off | docling-serve hides the cause of a failed conversion unless this is on. Turn it on while you debug. |
HF_TOKEN |
unset | Avoids rate limits on model downloads. |
PYTORCH_ENABLE_MPS_FALLBACK |
unset | Workaround for an Apple Silicon error. See Troubleshooting. |
Don't use --workers for parallelism
--workers (or UVICORN_WORKERS) starts several server processes, each
with its own in-memory task list. An async status check can then reach a
process that never saw the task, and the conversion fails with
Poll HTTP 404. Use DOCLING_SERVE_ENG_LOC_NUM_WORKERS instead:
DOCLING_SERVE_ENG_LOC_NUM_WORKERS=4 docling-serve run
Running the server on another machine¶
Set Server URL to that machine's address. If docling-serve sits behind a
reverse proxy at a sub-path, include the path:
http://host:9292/upstream/docling-serve.
If the server needs a credential, set Auth in the plugin's preferences:
| Auth scheme | Header the plugin sends |
|---|---|
| None | nothing (default) |
| Bearer token | Authorization: Bearer <token> |
| Basic auth | Authorization: Basic <base64(user:password)> |
| Custom header | <Header name>: <Header value> |
The header goes with every request, including /health. The secret is kept
in Zotero's login manager, not in plain-text prefs. Use HTTPS for a server
that isn't on your own machine, since over plain HTTP the header can be read
by anyone on the network path. See
SECURITY.md.
No cancel, by design¶
docling-serve has no API to cancel a conversion (docling-serve#447) and doesn't notice when a client disconnects (#401). So the plugin has no Cancel button: it couldn't stop the server's work, only hide it.
- A plugin timeout stops the plugin waiting. The server keeps converting.
- Closing the progress window or quitting Zotero doesn't stop the server.
- Tools → Docling: Stop after the PDFs in progress stops a batch from sending more PDFs. PDFs already sent still finish and are attached.
- The only way to stop work the server has already started is to restart docling-serve.