Stirling PDF: Self-Host 50+ PDF Tools Without Uploading Files Anywhere

Stirling PDF: Self-Host 50+ PDF Tools Without Uploading Files Anywhere

Self-host Stirling PDF on your VPS and get merge, split, compress, OCR, and convert tools — all offline. 77K GitHub stars and one Docker command.

💡 Disclosure: This article contains affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. This helps support the site and keeps the content free.

import AffiliateLink from ’../../components/AffiliateLink.astro’;

I needed to merge two PDFs last week. My options: upload them to some random website that promises “we delete your files after 1 hour” (they don’t), install a desktop app I’ll use once, or open Adobe Acrobat and wait for it to load.

All three options felt wrong.

Then I remembered Stirling PDF — that self-hosted tool sitting at 77K GitHub stars that I’d been meaning to try. Five minutes later I had a full PDF workstation running in Docker on my VPS. Merged my files, ran OCR on a scanned contract, and compressed a bloated PDF for email, all without a single file leaving my server.

Here’s how you set it up.

What’s Stirling PDF, Really?

Stirling PDF is a web-based PDF manipulation tool that runs in Docker. 50+ operations — merge, split, compress, convert, rotate, OCR, add images, sign, watermark, remove pages, extract text, and more. Everything runs locally. Your files never touch the internet.

The UI looks like a clean admin panel. No ads, no sign-ups, no “upgrade to pro” nagging. Just a grid of tools, click what you need, upload your file, get the result.

The key difference from those “free PDF tools” websites: Stirling PDF does everything in-browser and on your server. When you upload a file to one of those web services, you’re praying they delete it. With Stirling, you’re the only one who ever sees your data.

I work with a lot of sensitive documents — contracts, invoices, tax returns. Using a random web service for that is insane. Stirling PDF turned “find a tool, hope it’s not malicious, upload, download, delete history” into “docker compose up, done.”

One-Command Docker Setup

Create a folder and a compose file:

mkdir -p ~/stirling-pdf && cd ~/stirling-pdf
nano docker-compose.yml

Paste this:

services:
  stirling-pdf:
    image: stirlingtools/stirling-pdf:latest
    container_name: stirling-pdf
    ports:
      - "8080:8080"
    volumes:
      - ./trainingData:/usr/share/tessdata
      - ./extraConfigs:/configs
      - ./customFiles:/customFiles
    environment:
      - DOCKER_ENABLE_SECURITY=false
      - INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false
      - LANGS=en_US
    restart: unless-stopped

Run it:

docker compose up -d

Open http://your-vps-ip:8080 and you’ll see the tool grid. That’s it.

Important note on ports: I’m using 8080 here. If you already have something on 8080 (like Nginx Proxy Manager), change the left side to 8081:8080 or whatever port is free. Better yet, put it behind a reverse proxy.

What I Use Most

After a month of daily use, here are the tools I actually open:

Merge PDFs — The one I use the most. Select files, drag them to order them, hit merge. I do this constantly when combining signed contract pages.

Compress PDF — Clients send me 30MB PDFs of scanned documents. Stirling knocks them down to 2-3MB without noticeable quality loss. For internal docs I use “max compression” and get 80% size reduction.

OCR (PDF to text) — This one is huge. I scan receipts and invoices, run OCR, and now the text is searchable. Stirling uses Tesseract under the hood, so accuracy depends on your language. For English it’s excellent, for my occasional French docs it’s… decent enough.

PDF to Image / Image to PDF — Converting scans into proper PDFs for import into Paperless-ngx. This saved me from a separate tool I was using before.

Sign PDF — For those “sign here” contracts that don’t need a full DocuSign setup. Works fine for personal use.

Adding OCR Languages

By default, Stirling ships with English OCR only. If you need French, German, Spanish, or whatever:

  1. Stop the container
  2. Add more languages to the LANGS environment variable: LANGS=en_US,fr_FR,de_DE,es_ES
  3. Restart

The container downloads the Tesseract language data on boot. This adds about 100MB per language, but for French OCR on my scanned docs it’s worth it.

Security: Don’t Leave Port 8080 Open

Stirling PDF doesn’t have authentication out of the box (there’s a basic auth option but I haven’t bothered). That means anyone who finds your port can use it.

Do not expose port 8080 to the internet without protection unless you want strangers splitting your PDFs.

I put it behind Nginx Proxy Manager with a subdomain and a simple HTTP password. If you’re already running Authentik or Authelia, you can throw an auth proxy in front of it. But honestly, for a home network or a password-protected subdomain, you’re fine.

If you’re running Traefik, throw labels on the service:

labels:
  - "traefik.enable=true"
  - "traefik.http.routers.stirling.rule=Host(`pdf.yourdomain.com`)"
  - "traefik.http.routers.stirling.entrypoints=websecure"
  - "traefik.http.routers.stirling.tls.certresolver=letsencrypt"
  - "traefik.http.services.stirling.loadbalancer.server.port=8080"

What I’ve Learned

Stirling PDF uses RAM proportional to file size. A 200-page PDF takes a couple hundred MB during processing. Fine for a 2GB VPS, but if you’re compressing 500MB documents on a 1GB box, expect swap usage.

The first startup downloads a lot. The container needs to fetch Tesseract language files. On a fresh deploy, the initial boot might take 1-2 minutes. Be patient.

Not all operations are instant. OCR on a 50-page book takes 10-15 seconds on a 2-core VPS. That’s normal — Tesseract is doing real work. Don’t spam the button.

The “everything in one container” approach works. For something you access once a week for a quick task, having a single image with zero external dependencies is perfect.

How This Fits in My Stack

Stirling PDF sits in my “toolbox” category alongside IT-Tools and Uptime Kuma. These are apps I don’t use daily, but when I need them they’re irreplaceable.

The workflow goes like this:

  1. Scan a document
  2. Run OCR with Stirling PDF
  3. Import into Paperless-ngx

That’s three tools that replaced a stack of paper and a bunch of web services I didn’t trust.

Should You Run This?

If you ever touch PDFs — and let’s be real, who doesn’t — Stirling PDF is worth the 5-minute setup. It’s one Docker container, it handles 95% of what Adobe Acrobat does, and your files stay on your hardware.

The 77K GitHub stars aren’t for show. Stirling PDF is one of those rare tools that does exactly what it promises with zero bullshit. No premium tiers, no data collection, no account creation. Just a grid of PDF tools that work.

Set it up now while you’re thinking about it. You won’t know you needed it until the day you’re staring at a 40MB scan you need to email.


Related Articles:

Written on a Hetzner CPX21, with 3.2GB of PDFs processed in the last month, zero files uploaded to the cloud.

Stay in the loop 📬

Get self-hosting tutorials, tool reviews, and infrastructure tips delivered to your inbox. No spam, unsubscribe anytime.

Join 0 self-hosters. Free forever.