How to Install Stirling PDF (Merge, Split, Sign and Convert PDFs on Your Own Server)

Stirling PDF: every PDF tool, on your server — Merge, split, sign, OCR. No 'free' website sees your documents.

"Merge PDF free online" takes you to a site that uploads your tenancy agreement to someone's server and shows you adverts while it works. Stirling PDF is the same toolbox — merge, split, rotate, compress, OCR, sign, redact, watermark, convert to and from Word and images, add or remove passwords, fill forms — running on your server, in your browser, with nothing leaving the house. Everybody in the family ends up using it.

Quick reference

TaskWhat
Folder~/docker/stirling/compose.yaml
Webhttp://server-ip:8085
OCR languages./tessdata — drop in .traineddata files for more
LoginsDOCKER_ENABLE_SECURITY: "true" + SECURITY_ENABLELOGIN
Pipelineschain operations and run them on a watched folder
Nothing is storedfiles are processed in memory and discarded

1. The compose file

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

services:
stirling-pdf:
image: docker.stirlingpdf.com/stirlingtools/stirling-pdf:latest
container_name: stirling-pdf
ports:
- "8085:8080"
environment:
DOCKER_ENABLE_SECURITY: "false"
LANGS: en_GB
SYSTEM_DEFAULTLOCALE: en-GB
TZ: Europe/London
volumes:
- ./tessdata:/usr/share/tessdata
- ./config:/configs
- ./logs:/logs
- ./pipeline:/pipeline
restart: unless-stopped

The default image includes OCR (Tesseract), LibreOffice for Office conversions and everything else. There's a -fat tag with more fonts and a -ultra-lite without conversions for a Pi.

docker compose up -d
sudo ufw allow from 192.168.1.0/24 to any port 8085

Open http://192.168.1.50:8085. The home page is a grid of tools; search at the top.

2. The tools you'll actually use

Files are processed in the container's memory and not kept.

3. Pipelines and a watched folder

Pipeline lets you chain operations — OCR → compress → add watermark — save it, and run it on everything dropped into ./pipeline/watchedFolders//. Point the scanner's output or a Samba share there and every scan comes out OCR'd and compressed in ./pipeline/finishedFolders/. Pairs well with Paperless-ngx (tutorial 76) as a pre-processing step.

4. Logins

For a server other people reach, turn on accounts:

DOCKER_ENABLE_SECURITY: "true"
SECURITY_ENABLELOGIN: "true"
SECURITY_INITIALLOGIN_USERNAME: john
SECURITY_INITIALLOGIN_PASSWORD: ${ADMIN_PASSWORD}

up -d, log in, add users under Settings → Admin. Or leave logins off and let Authelia (tutorial 95) or the VPN gate it.

5. Behind the proxy

pdf.example.com → 127.0.0.1:8085 with client_max_body_size 500M — people will throw big scans at it. Behind the VPN is the natural home; it's a utility, not a public site.

Troubleshooting

Office conversions fail. You're on the -ultra-lite image. Use the standard one.

OCR in another language gives garbage. The language file isn't there: download deu.traineddata (etc.) from the tessdata GitHub into ./tessdata and restart.

Large file upload fails. The proxy's body size limit; or Java's heap on a small box — add JAVA_CUSTOM_OPTS: -Xmx2g.

Page loads but tools error. Check ./logs; usually a permissions problem on ./config — chown -R 1000:1000 the folders.

Wrapping up

One container, one port, a bookmark. Every PDF job the household does — merging a form, compressing a scan, signing a contract, OCRing a letter — happens on your server in seconds, and no document ever goes to a website that was "free".

Call us