OCRmyPDF

Command-line tool and Docker image that adds a searchable OCR text layer to scanned PDFs, with a watched-folder service.

Active Document processing MPL-2.0

Quick answer

OCRmyPDF is a command-line tool and Docker image that adds a searchable OCR text layer to scanned PDFs, with a watched-folder service, listed under Document processing. A typical small-business use: make a scanner's output folder searchable by OCRing every new PDF automatically. The project publishes no official RAM figure, so we do not estimate a monthly server cost. License: MPL-2.0, which allows internal business use.

Last updated · facts verified against official docs on · sources

GitHub stars35.2k
Forks2.4k
Latest releasev17.13.0Sep 28, 2026
Last commitOct 25, 2026
Est. server cost—

Activity data comes from GitHub and was last refreshed Nov 1, 2026.

What is OCRmyPDF?

OCRmyPDF adds an OCR text layer to scanned PDFs (or images) so they can be searched and copied, and by default writes a PDF/A file for long-term archiving. It uses the Tesseract OCR engine with more than 100 languages, can deskew and rotate pages, optimizes images and spreads work across all CPU cores. It is a command-line program; the Docker image also ships a watcher service that OCRs every PDF dropped into an input folder. Plugins can swap Tesseract for other engines such as EasyOCR or PaddleOCR.

Where it fits in a 10–200 person business

  • Make a scanner's output folder searchable by OCRing every new PDF automatically
  • Convert archived paper invoices and contracts into searchable PDF/A files
  • Add an OCR step to a document pipeline or script before indexing files for RAG

These use cases are our editorial suggestions, not claims made by the project.

Can a business use OCRmyPDF? (license)

LicenseMPL-2.0
TypeCopyleft (GPL): Free to use; distributing modified versions requires sharing source.
Internal business useAllowed under the license text
What to watchFree for internal and commercial use. MPL-2.0 is file-level copyleft: if you distribute modified OCRmyPDF files, you must release those files' source under MPL-2.0. The demo web service is AGPL-3.0, and Ghostscript, which OCRmyPDF can use, is AGPL-licensed.

This is a plain-English summary of the license text, not legal advice. Third-party models you run with it have their own licenses.

Data & compliance: does OCRmyPDF phone home?

Telemetry (usage data sent to the vendor) Not documented
Other calls home by default (updates, marketplaces, default cloud services) Not documented
Single sign-on (OIDC / SAML / LDAP) Not applicable

A command-line program and folder watcher with no user accounts; the demo web service has no authentication.

Source: ocrmypdf.readthedocs.io/en/latest/docker.html

Audit log Not documented
Role-based access control (RBAC) Not documented
Data residency / GDPR notes from the project Not documented

Checked against the project's own docs and repository on . "Not documented" means we could not find the answer in official sources; it does not mean the feature is missing or that no data is sent. Third-party services you connect (model APIs, vector databases, search engines) have their own data policies. Compare all apps.

What hardware does OCRmyPDF need?

The project does not publish a minimum CPU/RAM figure, so we leave the official value blank rather than guess.

GPU: No. Tesseract runs on CPU; the optional EasyOCR plugin is the one that recommends a GPU.

No server minimum is published. The performance page gives a rule of thumb of about 15 bytes per pixel of the largest page per concurrent job: a letter-size page scanned at 600 dpi peaks at roughly 500 MB with --jobs 1 and roughly 2 GB with --jobs 4. For temporary storage, allow about 100 MB per page being processed.

Source: ocrmypdf.readthedocs.io/en/latest/performance.html

How much does it cost to host OCRmyPDF per month?

The project publishes no RAM figure we could verify, so we do not estimate a cost.

How to deploy OCRmyPDF

Method: Docker (watched-folder service)

docker run \
    --volume <path to files to convert>:/input \
    --volume <path to store results>:/output \
    --volume <path to store processed originals>:/processed \
    --env OCR_OUTPUT_STRUCTURE=YEAR_MONTH \
    --env OCR_ON_SUCCESS_ARCHIVE=1 \
    --env OCR_DESKEW=1 \
    --env PYTHONUNBUFFERED=1 \
    --interactive --tty --entrypoint python3 \
    jbarlow83/ocrmypdf \
    /app/watcher.py
# One-off files: docker run --rm -i jbarlow83/ocrmypdf-alpine - - <input.pdf >output.pdf

From the official instructions: ocrmypdf.readthedocs.io/en/latest/batch.html. Always check the source for the current version before you run it.

Known gotchas when self-hosting OCRmyPDF

  • The image runs as the non-root app user (uid 1000), so it may not be able to write to bind-mounted /output and /processed folders unless you pass a --user value that matches rootful Docker, rootless Docker or Podman. source
  • The bundled web service (webservice.py) is for demonstration only: it has no authentication, no security and no protection against denial of service. Do not expose it to users. source
  • OCRmyPDF is not designed to process PDFs uploaded by untrusted users, and it uses all CPU cores and a lot of temporary disk by default. Limit --jobs or the container's resources on a shared server. source
  • The Docker image includes only English, German, Simplified Chinese, French, Portuguese and Spanish. Other languages need a custom image built on top of the official one. source

Alternatives in Document processing

OCRmyPDF FAQ

How much RAM does OCRmyPDF need?

OCRmyPDF does not publish an official RAM figure, so we do not state one. No server minimum is published. The performance page gives a rule of thumb of about 15 bytes per pixel of the largest page per concurrent job: a letter-size page scanned at 600 dpi peaks at roughly 500 MB with --jobs 1 and roughly 2 GB with --jobs 4. For temporary storage, allow about 100 MB per page being processed.

Does OCRmyPDF need a GPU?

No. Tesseract runs on CPU; the optional EasyOCR plugin is the one that recommends a GPU.

How much does it cost to self-host OCRmyPDF?

The software is free to download. The project publishes no official RAM figure, so we do not estimate a monthly server cost.

Is OCRmyPDF free for commercial use?

OCRmyPDF is licensed under MPL-2.0 (Copyleft (GPL)). Internal business use is allowed under the license text. Free for internal and commercial use. MPL-2.0 is file-level copyleft: if you distribute modified OCRmyPDF files, you must release those files' source under MPL-2.0. The demo web service is AGPL-3.0, and Ghostscript, which OCRmyPDF can use, is AGPL-licensed. This is a summary, not legal advice.

What are common problems when self-hosting OCRmyPDF?

The image runs as the non-root app user (uid 1000), so it may not be able to write to bind-mounted /output and /processed folders unless you pass a --user value that matches rootful Docker, rootless Docker or Podman. The bundled web service (webservice.py) is for demonstration only: it has no authentication, no security and no protection against denial of service. Do not expose it to users. OCRmyPDF is not designed to process PDFs uploaded by untrusted users, and it uses all CPU cores and a lot of temporary disk by default. Limit --jobs or the container's resources on a shared server. The Docker image includes only English, German, Simplified Chinese, French, Portuguese and Spanish. Other languages need a custom image built on top of the official one.

Is OCRmyPDF still maintained?

Yes, it is actively developed. Last commit: Oct 25, 2026. Latest release: v17.13.0 (Sep 28, 2026). Checked Nov 1, 2026.

How do I install OCRmyPDF?

The official method is Docker (watched-folder service). The exact commands are in the "How to deploy" section above and in the official instructions: https://ocrmypdf.readthedocs.io/en/latest/batch.html

What are self-hosted alternatives to OCRmyPDF?

Other apps in Document processing: PaddleOCR, MinerU, Paperless-ngx, Unstract, Paperless-AI, paperless-gpt, Docling Serve.

Sources

Facts on this page were checked against the project's own repository and docs on 2026-11-01. Spotted something out of date? Tell us.