Stirling-PDF

Stirling-PDF is a powerful, self-hosted PDF manipulation toolkit that runs entirely in your browser. It supports merging, splitting, rotating, converting, OCR, watermarking, password protection, and much more — no upload to third-party servers required. Perfect for privacy-conscious users, homelab enthusiasts, and anyone who needs professional PDF tools without subscription fees.

yaml

docker-compose.yml

services:
  stirling-pdf:
    container_name: stirling-pdf
    image: frooodle/s-pdf:latest
    restart: unless-stopped
    ports:
      - ${STIRLING_PORT:-8080}:8080
    volumes:
      - stirling-data:/usr/share/tessdata
      - stirling-config:/configs
      - stirling-logs:/logs
      - stirling-custom:/customFiles
      - stirling-pipeline:/pipeline
    environment:
      MODE: ${STIRLING_MODE:-BOTH}
      BACKEND_INTERNAL_PORT: "8081"
      DOCKER_ENABLE_SECURITY: ${STIRLING_SECURITY:-false}
      SECURITY_ENABLELOGIN: ${SECURITY_ENABLELOGIN:-false}
      DISABLE_ADDITIONAL_FEATURES: ${DISABLE_ADDITIONAL_FEATURES:-false}
      ENDPOINTS_GROUPS_TO_REMOVE: ${ENDPOINTS_GROUPS_TO_REMOVE:-}
      LANGS: ${STIRLING_LANGS:-en_GB,en_US}
      TESSERACT_LANGS: ${TESSERACT_LANGS:-}
      SYSTEM_DEFAULTLOCALE: ${SYSTEM_DEFAULTLOCALE:-en-US}
      UI_APPNAME: ${UI_APPNAME:-Stirling-PDF}
      UI_HOMEDESCRIPTION: ${UI_HOMEDESCRIPTION:-Your locally hosted one-stop-shop for all your PDF needs}
      UI_APPNAMENAVBAR: ${UI_APPNAMENAVBAR:-Stirling-PDF}
      SYSTEM_GOOGLEVISIBILITY: ${SYSTEM_GOOGLEVISIBILITY:-true}
      SHOW_SURVEY: ${SHOW_SURVEY:-false}
      SYSTEM_MAXFILESIZE: ${SYSTEM_MAXFILESIZE:-100}
      METRICS_ENABLED: ${METRICS_ENABLED:-true}
      PUID: ${PUID:-1000}
      PGID: ${PGID:-1000}
      UMASK: ${UMASK:-022}
      JAVA_CUSTOM_OPTS: ${JAVA_CUSTOM_OPTS:-}
      SYSTEM_ROOTURIPATH: ${SYSTEM_ROOTURIPATH:-}
    healthcheck:
      test:
        - CMD-SHELL
        - curl -f http://localhost:8080${SYSTEM_ROOTURIPATH:-}/api/v1/info/status || exit 1
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
    deploy:
      resources:
        limits:
          memory: ${STIRLING_MEMORY_LIMIT:-4G}
        reservations:
          memory: 2G
    networks:
      - stirling-network
networks:
  stirling-network:
    driver: bridge
volumes:
  stirling-data:
  stirling-config:
  stirling-logs:
  stirling-custom:
  stirling-pipeline:

.ENV

.env example

# Stirling-PDF Configuration
STIRLING_PORT=8080

# Mode: BOTH (default) | BACKEND | FRONTEND
STIRLING_MODE=BOTH

# Security
SECURITY_ENABLELOGIN=false
DOCKER_ENABLE_SECURITY=false

# Feature Toggles
DISABLE_ADDITIONAL_FEATURES=false

# OCR / Languages
STIRLING_LANGS=en_GB,en_US

# UI Customization
SYSTEM_DEFAULTLOCALE=en-US
UI_APPNAME=Stirling-PDF
UI_HOMEDESCRIPTION=Your locally hosted one-stop-shop for all your PDF needs
UI_APPNAMENAVBAR=Stirling-PDF
SYSTEM_GOOGLEVISIBILITY=true
SHOW_SURVEY=false

# Limits
SYSTEM_MAXFILESIZE=100

# Metrics
METRICS_ENABLED=true

# System
PUID=1000
PGID=1000
UMASK=022
STIRLING_MEMORY_LIMIT=4G

# Optional: Java heap
# JAVA_CUSTOM_OPTS=-Xmx4g

# Optional: Sub-path behind reverse proxy
# SYSTEM_ROOTURIPATH=/stirling-pdf

# Optional: Database backup schedule
# SYSTEM_DATABASEBACKUP_CRON=0 0 * * *

deployment

Quick Start

  1. Create a working directory named after the service.
  2. Copy the compose file and generated `.env` into that directory.
  3. Review the variables and replace placeholders with real values.
  4. Run `docker compose up -d`.
mkdir stirling-pdf
cd stirling-pdf
# create docker-compose.yml
# create .env
docker compose up -d