Stirling PDF 3.5: Self-Host Your Own PDF Toolbox and API with Docker Compose

Stirling PDF 3.5 swaps LibreOffice for its own conversion engine. Here's what the self-hosted PDF platform can do, how its open-core license and Free plan work, and how to run it with Docker Compose.

Share
Stirling PDF web interface with an empty PDF Library on the left, the Stirling logo with Add Files and Process a folder buttons in the centre, and a PDF Tools list on the right
The Stirling PDF home screen. Screenshot from the official Stirling-Tools/Stirling-PDF repository (MIT).

Sooner or later everyone needs to do something annoying with a PDF: merge three scans into one file, remove a page, black out an account number, or turn a Word document into something you can actually send. The quick answer is usually one of those "free online PDF" sites, which means uploading your tax return or your rental contract to a server you know nothing about.

Stirling PDF is the self-hosted answer to that problem, and it has been busy lately. Version 3.4.0 landed on 19 November with a reworked text editor and an accessibility checker, and version 3.5.0 followed on 22 November 2026, replacing LibreOffice in the Docker images with the project's own converter. Time for a proper look.

What is Stirling PDF?

Stirling PDF is a PDF platform you can run as a desktop app, in the browser or as a server on your own hardware. The README describes it as a way to edit, sign, redact, convert and automate PDFs "without sending documents to external services", and lists more than 50 tools. Almost every server-side tool is also exposed as a REST endpoint, so the same box that serves the web UI can act as a private PDF API for scripts and other apps.

It's developed by Stirling PDF Inc. and has long been one of the most popular self-hosted projects on GitHub. In our BentoPDF article it came up as the obvious comparison. Today it gets its own post.

Stirling PDF in dark mode with the PDF Tools sidebar listing PDF Text Editor, Merge, Compare, Compress, Convert, OCR, Redact, signing and document security tools
The same home screen in dark mode. The right-hand panel groups the tools into Recommended, Signing, Document Security, Verification and more. Source: Stirling-PDF repository (MIT)

Key features

  • 50+ PDF tools in one UI: merge, split, reorder, rotate, crop, compress, add page numbers, watermarks and stamps, compare two PDFs, and a "Multi Tool" for working on pages visually.
  • Text editor in the viewer: since 3.4.0 you can edit text directly in the viewer. It can use fonts from the server (including custom fonts you put in customFiles/static/fonts/), is better at matching fonts in OCRed scans and subsets embedded fonts so saved files stay smaller.
  • Conversions: Office documents, images, HTML, Markdown, email (EML) and ebooks to PDF, and PDF to Word, presentations, images, HTML, Markdown, CSV, EPUB, PDF/A and more.
  • OCR: Tesseract and OCRmyPDF are used for "OCR / Cleanup scans". The standard images ship with English, German, French, Portuguese and Simplified Chinese language packs, and you can add more.
  • Security and signing: redaction (manual and automatic), passwords and permissions, sanitising, certificate signing, timestamps, signature validation, and an option to block edits to signed PDFs.
  • Accessibility checker: new in 3.4.0, it checks PDFs against PDF/UA-1 or PDF/UA-2 and produces a report.
  • Automation: build no-code workflows in the UI, run them through the Pipeline API, or drop files into a watched folder on the server.
  • REST API and MCP: endpoints under /api/v1/..., a Swagger UI on your own server, and an MCP server for AI tools.
  • Users and SSO: login is on by default, with OAuth2/OIDC single sign-on included in the Free plan.
  • 40+ UI languages and builds for amd64 and arm64.

What's new in 3.5.0

The headline of 3.5.0 is Stirling Office Convert, which now replaces LibreOffice in the Docker containers. According to the release notes it brings faster, better-quality conversions and a much smaller image. Compression now also runs through Office Convert, HTML to PDF supports zoom again, and admins get a new setting to cap how many Office conversions run in parallel (the rest are queued). Damaged Office, ebook and HTML files now produce a clear "could not be read" message instead of a generic error.

There are breaking changes worth reading before you update:

  • PDF to .doc (Word 97-2003) output has been removed. Use docx or odt. API calls, pipelines and automations that ask for doc will now fail.
  • .wpd, .wps, .lwp, .abw, .hwp and .xps files are no longer accepted for conversion.
  • groupsToRemove entries for the removed tools (LibreOffice, Calibre, WeasyPrint, OpenCV and so on) no longer disable anything.

3.4.0 already removed the PostScript vector conversion endpoints (PS/EPS to PDF and PDF to PS/EPS/PCL/XPS). If you relied on any of these formats, pin the older version until you have an alternative.

A small reality check: when I looked at Docker Hub on release day, the compressed 3.5.0 image for amd64 was still about 1.1 GB, roughly the same as 3.4.0. The size savings may show up in later builds or depend on the registry, so don't plan your disk space around them yet.

A word on the license

Stirling PDF calls itself open-core. The LICENSE file is MIT for everything outside a list of directories (for example app/proprietary/, app/saas/, engine/ and some frontend/src/editor/... folders), which carry their own licenses. In practice:

  • The self-hosted server runs on the Free plan by default: all PDF tools, OAuth2/OIDC single sign-on and server certificate signing, up to 5 users and 1,000 processing units per month for automation, AI and API calls.
  • The paid Team and Enterprise plans add things like an external database and clustering, S3 storage, encryption at rest, Prometheus metrics, SAML, SCIM and audit logging.
  • The latest-ultra-lite image has no login, users, admin settings or plans at all.

For a homelab or a family that's plenty. For a company, check the user and processing limits before you roll it out, and look at the paid plans honestly rather than hoping nobody notices.

Why self-host it?

  • Your documents stay home. Contracts, payslips, medical letters and ID scans never leave your network.
  • One tool instead of ten websites. Compress, merge, OCR and sign in the same place.
  • Automation. Scanner output can land in a watched folder and come out OCRed and compressed without anyone touching it, which pairs nicely with a document archive like Paperless-ngx.
  • An API for your other apps. Anything that can send a multipart HTTP request can use it.

Requirements

  • A Linux host (or NAS) with Docker and Docker Compose.
  • Memory: the docs suggest 4 GB for the latest image, 6 GB for latest-fat (more with the bundled AI engine turned on) and 2 GB for latest-ultra-lite.
  • Optional: a domain such as pdf.example.com and a reverse proxy for HTTPS.

The docs describe three image flavours:

Tag Login and admin Contents
latest Yes The standard build with OCR and conversions
latest-fat Yes Everything in latest plus the bundled AI engine (off until you enable it)
latest-ultra-lite No Core PDF tools only, no OCR, Office, HTML or ebook conversions

Each tag also has a pinned variant, for example 3.5.0, 3.5.0-fat and 3.5.0-ultra-lite. Note that the documentation's image table still lists LibreOffice and Calibre in latest. That was written before 3.5.0, so trust the release notes for what's inside the current image.

Install Stirling PDF with Docker Compose

1. Create a directory

mkdir -p ~/stirling-pdf && cd ~/stirling-pdf
mkdir -p stirling-data/{configs,logs,customFiles,pipeline,storage,tessdata}

The container runs as UID/GID 1000. If your folders belong to a different user, set PUID and PGID (see below).

2. Write the compose file

This is based on the official example, with a pinned version, a first admin account and analytics turned off:

services:
  stirling-pdf:
    image: docker.stirlingpdf.com/stirlingtools/stirling-pdf:3.5.0
    container_name: stirling-pdf
    ports:
      - "127.0.0.1:8080:8080"   # use "8080:8080" if you don't run a reverse proxy
    environment:
      SECURITY_INITIALLOGIN_USERNAME: admin
      SECURITY_INITIALLOGIN_PASSWORD: change-me-to-a-long-password
      SYSTEM_DEFAULTLOCALE: en-GB
      SYSTEM_ENABLEANALYTICS: "false"
      # PUID: 1000
      # PGID: 1000
    volumes:
      - ./stirling-data/configs:/configs
      - ./stirling-data/logs:/logs
      - ./stirling-data/customFiles:/customFiles
      - ./stirling-data/pipeline:/pipeline
      - ./stirling-data/storage:/storage
      - ./stirling-data/tessdata:/usr/share/tessdata
    mem_limit: 4g
    restart: unless-stopped

A few notes:

  • docker.stirlingpdf.com is the project's own registry. If it's unreachable, the same images are on Docker Hub (stirlingtools/stirling-pdf) and GitHub (ghcr.io/stirling-tools/stirling-pdf).
  • SECURITY_INITIALLOGIN_* sets the first admin before the first start. Without it, Stirling creates admin / stirling and forces you through the setup wizard. Either way, both variables are ignored once users exist, so you can remove them after the first start.
  • mem_limit matters: the image sizes its Java heap from the container limit, or from the whole host's RAM if there is none.
  • Any settings.yml key can be set as an environment variable, for example security.enableLogin becomes SECURITY_ENABLELOGIN.

3. Start it

docker compose up -d
docker compose logs -f stirling-pdf

Open http://localhost:8080 (or your server's address), sign in, finish the setup wizard and restart the container when it asks you to.

4. Check that it's healthy

GET /api/v1/info/status is a health check that needs no API key, which makes it a good target for Uptime Kuma:

curl -s http://localhost:8080/api/v1/info/status

Configuration tips

Reverse proxy and uploads. The production checklist asks you to forward X-Forwarded-Proto, X-Forwarded-Host and X-Forwarded-Port, to allow uploads as large as system.fileUploadLimit (2000 MB by default), to turn off response buffering and to allow long read timeouts (30 minutes) for big jobs. If uploading a large file fails or downloads an .htm file, your proxy's body size limit is the usual culprit; nginx allows only 1 MB by default. Also set the public URL so links in invites and share links are correct:

    environment:
      SYSTEM_BACKENDURL: https://pdf.example.com
      SYSTEM_FRONTENDURL: https://pdf.example.com

Serving under a sub-path like /pdf works with SYSTEM_ROOTURIPATH=/pdf.

Single sign-on. OAuth2/OIDC is part of the Free plan, so you can hook it up to an identity provider like Pocket ID. SAML requires Enterprise.

Don't turn login off on a reachable server. SECURITY_ENABLELOGIN=false works, but then anyone who can reach the port can use the server, and features that need accounts (such as file storage) are disabled. The desktop app can only connect to servers with login on. If you do run without login, keep it strictly on your LAN.

API keys. Each user finds their key under Settings → Preferences → API Keys and sends it as an X-API-KEY header. Your own server lists every endpoint at /swagger-ui/index.html:

curl -s -H "X-API-KEY: your-api-key" \
  -F "fileInput=@scan.pdf" -F "optimizeLevel=5" \
  -F "grayscale=false" -F "linearize=false" -F "normalize=false" \
  http://localhost:8080/api/v1/misc/compress-pdf -o scan-small.pdf

The compress endpoint expects optimizeLevel (1 to 9) plus the grayscale, linearize and normalize flags. Check the exact parameters for other endpoints in your Swagger UI before scripting against them.

Folder scanning. Build a workflow with the Automate tool, choose Export for Folder Scanning, and put the resulting JSON into a subfolder of pipeline/watchedFolders/. Every file dropped next to it is processed about once a minute, and results land in pipeline/finishedFolders/. Careful: input files are deleted after a successful run, so copy originals you want to keep.

OCR languages. Download .traineddata files from the Tesseract tessdata or tessdata_fast repositories into stirling-data/tessdata and restart. Languages downloaded through the admin UI live inside the container and disappear when it's recreated.

Remove tools you don't need. Under Settings → Server → System → Endpoint Management (or ENDPOINTS_TOREMOVE=sign,add-watermark) you can switch tools off for the UI, the API and MCP at once.

Analytics. If you didn't disable analytics in the compose file, the setup wizard asks you. The docs list exactly what's sent (server details, settings, usage counts; never document contents) to PostHog's EU servers and a Scarf pixel. SYSTEM_ENABLEANALYTICS=false turns it off entirely.

Updates and backups. Back up stirling-data/configs (settings, built-in database, keys) before a major upgrade, read the release notes for breaking changes, then bump the tag and run docker compose pull && docker compose up -d. If you manage containers with a UI, Arcane makes this a two-click job.

Honest limitations

  • It's heavy. A Java application with conversion and OCR tooling needs a few gigabytes of RAM and a large image. On a Raspberry Pi with 2 GB, the ultra-lite image is the realistic choice.
  • Open-core limits. The Free plan caps you at 5 users and 1,000 processing units per month for automation, AI and API calls. Fine for a household, worth checking for a team.
  • Fast release pace with breaking changes. Two releases within three days, with removed formats and endpoints in both. Pin versions and read the notes.
  • Docs lag behind releases. On release day the image table still mentioned LibreOffice. Expect small inconsistencies while the new converter settles.
  • The new converter is fresh. The team itself asks users to report conversions that don't look right. Test your important document types before relying on it.
  • Telemetry is opt-out, not absent. It's transparent and easy to disable, but you have to make the choice.

How does it compare?

BentoPDF takes the opposite approach: it processes files entirely in the browser, so the server just serves static files and never sees your documents. That makes it very light, but there are no user accounts, server-side pipelines, watched folders or REST API. Stirling PDF is the better pick if you want automation, an API, SSO and multi-user features; BentoPDF wins if you want a tiny, no-maintenance toolbox. Many homelabs could happily run both.

Conclusion

Stirling PDF is still the most complete self-hosted PDF toolbox around, and the 3.x releases have turned it into a real platform with an editor, automation, SSO and an API. The cost is resource usage, an open-core model with clear Free-plan limits, and a release pace that rewards pinning versions. If you regularly deal with PDFs and don't want them on random websites, it's well worth a container on your server.

Looking for more tools like this? Browse the Productivity and Automation tags.

Sources