17 min read

How to Self-Host Stirling PDF: 60+ PDF Tools Running on Your Own Server

Every time you upload a PDF to a website to merge, compress, convert, or sign it, that document leaves your machine and lands on someone else's server. Contracts, bank statements, medical records, tax documents, all processed by third-party services with opaque privacy policies.

Self-Hosting · PDF Tools · Privacy · Docker · Open Source · 2026

How to Self-Host Stirling PDF: 60+ PDF Tools Running on Your Own Server

Every time you upload a PDF to a website to merge, compress, convert, or sign it, that document leaves your machine and lands on someone else's server. Contracts, bank statements, medical records, tax documents, all processed by third-party services with opaque privacy policies. Stirling PDF is a free, open-source PDF tool with over 60 operations that runs entirely on your own hardware. No file ever leaves your server. This guide shows how to set it up with Docker in minutes and make it accessible from any browser on any device using a Localtonet tunnel.

📖 12 min read 🔵 Stirling PDF v2.9.0 (April 2026) 🐳 Docker Compose setup 🔒 60+ tools, fully private 🌐 Remote access via Localtonet 🤖 OCR + REST API

What Is Stirling PDF?

Stirling PDF is a self-hosted web application for PDF manipulation. It is the most starred PDF tool on GitHub, with over 25 million downloads, and covers every common PDF operation through a clean browser-based interface. You run it as a Docker container on your own server or home machine, and access it from any browser — no installation required on client devices.

What makes it different from online PDF tools is the privacy model. Every operation runs locally on your server. Files are processed in memory and deleted immediately after the operation completes. Nothing is stored, logged, or transmitted to external services.

✂️ Split and merge Split PDFs by page range, extract specific pages, merge multiple PDFs in any order with drag-and-drop reordering.
🔄 Convert PDF to Word, Excel, PowerPoint, images. Images and Office documents to PDF. HTML to PDF. eBook formats (EPUB, MOBI) to PDF and back.
🔍 OCR Extract text from scanned PDFs using Tesseract. Supports 100+ languages. Makes scanned documents searchable and copyable.
✏️ Edit and annotate Add text, images, watermarks, page numbers, and signatures. Draw on pages. Add comments. Rotate and reorder pages.
🗑️ Redact Permanently black out sensitive text and areas in PDFs. Redaction is destructive — the content is removed, not just visually covered.
🔐 Security Add or remove passwords and permissions. Flatten PDFs to remove metadata. Sign documents with digital certificates.
📦 Compress Reduce PDF file size with configurable quality settings. Useful for email attachments and storage optimization.
🤖 REST API and pipelines Every tool has a REST API endpoint. Build no-code automation pipelines to process PDFs in bulk without manual uploads.
Stirling PDF v2.9.0 — latest release (April 2026)

Version 2.9.0 adds server-side file sharing and group signing (both in alpha), dark mode color filters in the PDF viewer, support for viewing non-PDF files (CSV, JSON, Markdown, images) directly in the viewer, and multiple security fixes. The release also dropped JDK 17 support — the application now requires JDK 21 or higher, which is handled automatically inside the Docker image. Version 2.8.0 (March 2026) made desktop login optional and added comment support and timestamps.

Why Self-Host Instead of Using Online PDF Tools?

ConcernOnline PDF toolsSelf-hosted Stirling PDF
Where files go Uploaded to third-party servers. Retention policies vary and are often vague. Processed entirely on your own server. Files deleted from memory immediately after download.
Sensitive documents Contracts, medical records, and financial documents sent to unknown infrastructure. Never leave your machine. Safe for confidential content.
File size limits Typically 20-50 MB on free tiers. Large PDFs require paid plans. Configurable up to 2000 MB by default. No per-file charge.
Daily usage limits Free tiers limit operations per day or require account registration. Unlimited operations for all users on your instance.
Cost Free with limits, then $5-20/month for power users. Free. Runs on the same server as your other self-hosted apps.
Offline access Requires internet connection. Works on your local network without internet, or with a tunnel for remote access.

Choosing the Right Docker Image

Stirling PDF offers three Docker image variants. The right choice depends on your hardware and which tools you need:

Image tagSizeWhat it includesBest for
latest ~500 MB All PDF tools, Tesseract OCR, LibreOffice conversions (DOCX/XLSX/PPTX to PDF and back), standard fonts Most users. The default choice if you are unsure. Covers everything except specialized font requirements.
latest-fat ~700 MB Everything in latest, plus extended font packs for better rendering of non-Latin scripts and unusual typefaces Document conversion involving Arabic, Chinese, Japanese, Korean, or other non-Latin fonts. Air-gapped environments without internet access to download fonts.
latest-ultra-lite ~200 MB Core PDF operations only. No OCR (Tesseract not included). No LibreOffice (no Office document conversion). No CLI-based tools. Raspberry Pi, low-end VPS, or any machine with 1 GB RAM or less. Fast startup. If you only need to merge, split, compress, rotate, or add watermarks.

Setting Up Stirling PDF with Docker Compose

1

Create the project directory

Terminal
mkdir ~/stirling-pdf
cd ~/stirling-pdf
2

Create docker-compose.yml

docker-compose.yml — standard setup (no login required)
services:
  stirling-pdf:
    image: stirlingtools/stirling-pdf:latest
    container_name: stirling-pdf
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - ./stirling-data/tessdata:/usr/share/tessdata   # OCR language files
      - ./stirling-data/configs:/configs               # Settings and database
      - ./stirling-data/logs:/logs                     # Application logs
      - ./stirling-data/pipeline:/pipeline             # Automation pipeline configs
      - ./stirling-data/customFiles:/customFiles       # Custom branding
    environment:
      - TZ=Europe/Istanbul
      - SECURITY_ENABLELOGIN=false        # No login required — everyone on network can use it
      - LANGS=en_GB                       # UI language
      - SYSTEM_DEFAULTLOCALE=en-US        # Default locale for number formatting
      - SYSTEM_GOOGLEVISIBILITY=false     # Prevent search engines from indexing
      - SYSTEM_MAXFILESIZE=2000           # Max upload size in MB (default 2000)
      - DISABLE_ADDITIONAL_FEATURES=false # Keep all tools enabled
    healthcheck:
      test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 3

For a setup where login is required (recommended when exposing via a public URL), see the authentication section below.

3

Start the container

Terminal
docker compose up -d

# Watch the startup log — first start takes longer as it initializes
docker logs -f stirling-pdf
Starting Stirling-PDF v2.9.0
Initializing Tesseract OCR...
Checking LibreOffice availability...
Application started on port 8080

The first startup takes 30-90 seconds. After that, open http://YOUR-SERVER-IP:8080 in your browser.

Enabling Login and Authentication

By default, Stirling PDF runs without authentication. Anyone who can reach port 8080 can use all tools. This is fine on a private home network, but before exposing it via a public URL, you should enable login:

docker-compose.yml — with authentication enabled
services:
  stirling-pdf:
    image: stirlingtools/stirling-pdf:latest
    container_name: stirling-pdf
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - ./stirling-data/tessdata:/usr/share/tessdata
      - ./stirling-data/configs:/configs
      - ./stirling-data/logs:/logs
      - ./stirling-data/pipeline:/pipeline
    environment:
      - TZ=Europe/Istanbul
      - SECURITY_ENABLELOGIN=true                         # Require login
      - SECURITY_INITIALLOGIN_USERNAME=admin              # Initial admin username
      - SECURITY_INITIALLOGIN_PASSWORD=YourStrongPassword # Initial admin password
      - DISABLE_ADDITIONAL_FEATURES=false
      - LANGS=en_GB
      - SYSTEM_DEFAULTLOCALE=en-US
      - SYSTEM_GOOGLEVISIBILITY=false
      - SYSTEM_MAXFILESIZE=2000
Change the default credentials immediately

When SECURITY_ENABLELOGIN=true and no initial credentials are set, the default login is admin / stirling. This is widely known. Always set SECURITY_INITIALLOGIN_USERNAME and SECURITY_INITIALLOGIN_PASSWORD to your own values before starting the container for the first time, or change the password immediately after first login via the user settings menu.

After enabling login, additional users can be created from Settings → User Management in the admin account. Each user can be assigned different permission levels.

Setting Up OCR for Additional Languages

The standard Docker image includes English OCR by default. To add other languages, Stirling PDF uses Tesseract language data files. These are downloaded automatically on first use if the container has internet access, or you can pre-download them into the tessdata volume.

Terminal — download additional OCR language packs
# Create the tessdata directory
mkdir -p ~/stirling-pdf/stirling-data/tessdata

# Download language files directly into the volume
# Replace LANGCODE with the Tesseract language code (e.g. deu=German, fra=French, tur=Turkish)
curl -L "https://github.com/tesseract-ocr/tessdata/raw/main/LANGCODE.traineddata" \
  -o ~/stirling-pdf/stirling-data/tessdata/LANGCODE.traineddata

# Examples:
# German:  deu.traineddata
# French:  fra.traineddata
# Turkish: tur.traineddata
# Spanish: spa.traineddata
# Arabic:  ara.traineddata
# Chinese Simplified: chi_sim.traineddata

After downloading, restart the container. The OCR tool in Stirling PDF will show the new language in its dropdown automatically.

Accessing Stirling PDF Remotely with Localtonet

Stirling PDF's web interface runs on port 8080. When you are away from home or want colleagues to use the same instance, you need a way to reach port 8080 from the internet. A Localtonet HTTP tunnel creates a stable public HTTPS URL that forwards to your local port 8080, working even behind CGNAT or without a static IP.

1

Install and authenticate Localtonet

Terminal
chmod +x localtonet
sudo mv localtonet /usr/local/bin/
sudo localtonet authtoken YOUR_TOKEN
2

Create an HTTP tunnel for port 8080

In the Localtonet dashboard: Protocol = HTTP, Local IP = 127.0.0.1, Local Port = 8080, Subdomain = your choice (e.g. pdfpdf.localto.net).

3

Set SYSTEM_FRONTENDURL for correct redirects

When accessing Stirling PDF through a public URL, add this to your docker-compose.yml environment section so internal redirects use the correct domain:

docker-compose.yml — add to environment
      - SYSTEM_FRONTENDURL=https://pdf.localto.net  # your Localtonet URL

Run docker compose up -d to apply the change.

4

Install Localtonet as a service

Terminal
sudo localtonet --install-service --authtoken YOUR_TOKEN
sudo localtonet --start-service --authtoken YOUR_TOKEN

Localtonet now starts automatically on every boot alongside the Docker container.

Enable login before going public

Set SECURITY_ENABLELOGIN=true with a strong password before exposing Stirling PDF via a public URL. Without authentication, anyone with your Localtonet URL can upload and process documents using your server's resources.

Handling Large PDFs and File Size Limits

Stirling PDF itself supports files up to 2000 MB by default. If you are routing traffic through Localtonet's HTTP tunnel, large uploads work without any additional configuration because Localtonet does not impose upload size limits.

If you are putting Stirling PDF behind a separate reverse proxy (Nginx, Caddy, Nginx Proxy Manager), you need to adjust the proxy's upload limit. For Nginx:

nginx.conf — for large file uploads
client_max_body_size 500M;
proxy_read_timeout 300s;
proxy_send_timeout 300s;

To change the maximum file size inside Stirling PDF itself:

docker-compose.yml — increase file size limit
      - SYSTEM_MAXFILESIZE=500                           # MB
      - SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE=500MB
      - SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE=500MB

Using the REST API

Every tool in Stirling PDF has a corresponding REST API endpoint. This is useful for automating PDF processing in scripts, CI/CD pipelines, or applications. The full interactive API documentation is available at http://YOUR-SERVER:8080/swagger-ui/index.html.

curl — API examples
# Merge two PDFs
curl -X POST "http://localhost:8080/api/v1/general/merge-pdfs" \
  -F "fileInput=@document1.pdf" \
  -F "fileInput=@document2.pdf" \
  -o merged.pdf

# OCR a scanned PDF (add searchable text layer)
curl -X POST "http://localhost:8080/api/v1/misc/ocr-pdf" \
  -F "fileInput=@scanned.pdf" \
  -F "languages=eng" \
  -o ocr-output.pdf

# Compress a PDF
curl -X POST "http://localhost:8080/api/v1/general/compress-pdf" \
  -F "fileInput=@large.pdf" \
  -F "optimizeLevel=3" \
  -o compressed.pdf

# Convert DOCX to PDF (requires latest image with LibreOffice)
curl -X POST "http://localhost:8080/api/v1/convert/file/pdf" \
  -F "fileInput=@document.docx" \
  -o document.pdf

# Check server status
curl http://localhost:8080/api/v1/info/status

Running on Raspberry Pi (Ultra-Lite Image)

On a Raspberry Pi or any machine with limited RAM, use the ultra-lite image. It runs with as little as 1 GB RAM and starts significantly faster than the full image:

docker-compose.yml — ultra-lite for Raspberry Pi
services:
  stirling-pdf:
    image: stirlingtools/stirling-pdf:latest-ultra-lite
    container_name: stirling-pdf
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - ./stirling-data/configs:/configs
      - ./stirling-data/logs:/logs
    environment:
      - TZ=Europe/Istanbul
      - SECURITY_ENABLELOGIN=false
      - LANGS=en_GB
    mem_limit: 1g    # optional: cap memory usage

The ultra-lite image excludes OCR (Tesseract) and document conversion (LibreOffice). You still get: merge, split, compress, rotate, reorder pages, add watermarks, add page numbers, remove passwords, add passwords, flatten, and all other operations that work on PDF structure directly. For most everyday PDF tasks, this is sufficient.

Updating to a New Version

Terminal
cd ~/stirling-pdf

# Pull the latest image
docker compose pull

# Recreate the container with the new image
docker compose up -d

# Verify the new version
curl http://localhost:8080/api/v1/info/status

Stirling PDF is stateless — no persistent data lives inside the container. Your configs, OCR language files, and pipeline configurations are all in the mounted volumes and are unaffected by container updates. There is no database migration to worry about for standard deployments.

Troubleshooting Common Problems

ProblemCauseFix
Container starts but page does not load after 2 minutes First start is slow due to Tesseract and LibreOffice initialization Wait up to 90 seconds on first start. Check docker logs stirling-pdf. On Raspberry Pi, this can take 3-5 minutes. Use ultra-lite image for faster startup.
File upload fails with 413 error Reverse proxy in front of Stirling PDF is rejecting large uploads Add client_max_body_size 500M; to your Nginx config. Stirling PDF itself has a 2000 MB default — the bottleneck is almost always the proxy, not Stirling PDF.
OCR tool shows no language options Using ultra-lite image (no Tesseract), or tessdata volume is empty Switch to the standard latest image. For additional languages, download the .traineddata file into the tessdata volume directory.
DOCX/XLSX/PPTX conversion not working LibreOffice not present (ultra-lite image), or LibreOffice conversion service not started Use the standard latest or latest-fat image. Check logs for LibreOffice startup errors. Ensure container has enough RAM (1 GB minimum for LibreOffice conversions).
Login page appears but login always fails Wrong password, or container was started before setting credentials (default admin/stirling assigned) Try admin / stirling (default). If the container was already started, exec into it: docker exec -it stirling-pdf java -cp app.jar ... reset-password. Alternatively, delete the configs volume and recreate the container with correct credentials set.
Container is OOM-killed during large operations LibreOffice conversions use significant RAM, especially for large or complex documents Ensure at least 1 GB RAM is available for the container. For OCR on large PDFs, 2 GB is safer. Increase Docker's memory limit or the host's available memory. Set JAVA_TOOL_OPTIONS="-Xmx2g" to cap Java heap usage.
Font rendering issues in converted documents Missing font packs for non-Latin scripts Switch to latest-fat image, which includes extended font packs. Especially needed for Arabic, Chinese, Japanese, and Korean documents.
Remote access via Localtonet but some operations redirect to localhost SYSTEM_FRONTENDURL not set to the public URL Add SYSTEM_FRONTENDURL=https://your-subdomain.localto.net to the environment section and restart the container.

Frequently Asked Questions

Are my files stored on the server after processing?

No. Stirling PDF is designed to be stateless. Files are held in server memory only during processing and are deleted immediately after the operation completes and the file is downloaded. Nothing is written to disk and nothing is retained between sessions. This is one of the key reasons it is trusted for processing sensitive documents: there is no accumulation of documents on the server over time. The only exception is the pipeline feature, which you configure explicitly to process files in an automated workflow.

Can multiple people use the same Stirling PDF instance simultaneously?

Yes. Stirling PDF handles multiple simultaneous users without any special configuration. Each user's session and file uploads are independent. The main limitation is server resources: LibreOffice conversions and OCR are CPU and memory intensive, so multiple simultaneous heavy operations on the same server may slow each other down. For a typical office or family scenario with occasional concurrent use, a standard server is more than sufficient.

Does Stirling PDF require an internet connection to run?

No. Once the Docker image is pulled and the container is running, Stirling PDF works entirely offline. The only exception is Tesseract OCR language files: if you have not pre-downloaded them into the tessdata volume, Stirling PDF will try to download them on first use. Pre-download the language files you need if you plan to run air-gapped. The fat image includes extended fonts for offline use as well.

Is Stirling PDF a replacement for Adobe Acrobat?

For most common tasks, yes. Stirling PDF covers the operations that most people actually use Acrobat for: merge, split, compress, OCR, convert, sign, redact, add watermarks and page numbers, and manage passwords. The areas where Acrobat still has an edge are advanced form creation, complex interactive PDF features, and deep integration with other Adobe products. For straightforward document processing, especially in privacy-sensitive contexts, Stirling PDF is a practical and free alternative.

Access Your PDF Tools from Anywhere

A Localtonet HTTP tunnel gives your Stirling PDF instance a stable public HTTPS URL. Process documents securely on your own server from any device, anywhere, without file size limits or daily quotas.

Create Your Free Tunnel →

Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.

support