We have covered several tools for handling, storing and sharing documents, but editing PDFs deserves its own place in a homelab. Stirling-PDF can merge, split, rotate and convert documents, with additional tools for OCR and other operations. A useful home setup needs more than a running container: it should protect access, preserve important files and produce output you have checked.

Choose the Right PDF Task

A PDF may contain selectable text, scanned page images, forms or a mixture of these. Decide what you want to change before uploading it. Splitting pages is different from editing a paragraph, and adding an OCR text layer is different from correcting the underlying scan.

For example, combine a receipt and warranty document into a single reference file, or split a long manual into the pages needed for a repair. Keep the originals, use an explicit output name and open the result before replacing anything. Complex fonts, layouts and scanned pages can behave differently during conversion.

Do not assume every operation will preserve digital signatures, fillable forms or accessibility information. If those properties matter, check them after processing and retain the signed or original document separately. A file that opens successfully can still have lost something important.

Local Hosting and Paid Features

A self-hosted server can process ordinary PDF operations on hardware you control. That reduces dependence on uploading files to an unrelated PDF website, but privacy still depends on the server, accounts, storage and any external integrations you enable. Remote AI or connected storage can introduce additional data transfers.

The current self-hosted licensing guide distinguishes Free, Team and Enterprise features. Cloud subscriptions and self-hosted licences are separate choices. Check the current feature and usage rules for automation, API calls and team administration rather than assuming everything is unlimited or that self-hosting requires a one-time purchase.

Start by listing the tools you need and where your files must stay. For occasional merging and splitting, a simpler configuration may be sufficient. For shared household or business use, account administration and a reliable recovery process become more important than an advertised image size.

A Private Docker Starting Point

Install Docker using the instructions for your operating system; the original Docker link is retained. This example follows the current official server installation. It is a fresh installation, not an automatic upgrade path from an older version.

Create a dedicated directory and a private .env file. Generate a password with openssl rand -base64 24 or your password manager, then replace the placeholder below. Keep the file readable only by the people administering the service.

STIRLING_ADMIN_PASSWORD=REPLACE_WITH_YOUR_UNIQUE_GENERATED_PASSWORD

Save the following as compose.yaml. The standard image includes login; do not substitute an ultra-lite image and expect the same authentication and conversion features.

services:
  stirling-pdf:
    image: docker.stirlingpdf.com/stirlingtools/stirling-pdf:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:8080:8080"
    environment:
      SECURITY_ENABLELOGIN: "true"
      SECURITY_INITIALLOGIN_USERNAME: admin
      SECURITY_INITIALLOGIN_PASSWORD: ${STIRLING_ADMIN_PASSWORD:?Set a private admin password}
      SYSTEM_DEFAULTLOCALE: en-US
    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

The loopback mapping exposes port 8080 only on the Docker host. It is a starting point for local testing. For another computer or phone, arrange private access or an authenticated HTTPS proxy deliberately. Do not treat publishing the port on every interface as an equivalent privacy setting.

latest changes over time. For repeatable installations, select a current supported release tag after reading its notes, and record the image version. The current standard image has OCR and conversion engines; ultra-lite omits several of these and has no login. The fat variant has additional components. Avoid treating compressed download sizes or suggested memory allocations as measurements of your own workload.

docker compose config --quiet
docker compose up -d
docker compose ps
docker compose logs --tail=100 stirling-pdf

Open http://localhost:8080 on the Docker host. The sign-in guide explains initial account creation. Custom initial credentials apply to an empty user database; changing the environment file later is not a password-reset method. Verify that a fresh private browser session requires sign-in.

Check Your First Document

Use a harmless sample before sensitive records. Merge two short PDFs, split one page back out and confirm the expected page count and order. Open both outputs in a separate viewer. Check text selection, orientation, bookmarks and any forms you care about.

For a scan, run OCR on a copy and search for a known word. Compare a few lines against the visible page, especially names, amounts and serial numbers. OCR errors are possible; a searchable output is not proof of a correct transcription.

The OCR language guide explains that available languages depend on installed Tesseract packs. Add the needed trained-data files through the documented settings or persistent tessdata mount. The old LANGS=en_GB,en_US example should not be understood as a reliable installer for arbitrary OCR language packs.

Redaction and Automation Need Output Checks

When sharing a document, use the actual redaction tool rather than merely drawing a dark annotation over a secret. Follow the redaction guide, save a new output and try searching and copying the removed text. Review every page visually, along with metadata and attachments that may contain related information. Do not publish sensitive material until its result has been checked.

For repeated tasks, build and test a workflow with copies of representative documents. Run each operation manually first so that you know which step changes the result. A sensible pipeline might OCR a scan and then compress it, but compare readability before accepting a smaller file.

The folder-scanning guide distinguishes a folder-scanning export from an ordinary workflow export. Each job belongs in a subfolder of /pipeline/watchedFolders with its configuration. Successful processing deletes the input from that job folder, so retain originals elsewhere. Choose output names that avoid overwriting earlier results.

Maintain and Restore the Service

Persist and back up configuration, database information, generated keys and stored documents, along with any custom language files or workflows you depend on. A container image is replaceable; its mounted data is not. Make backups consistently, and test a restore into an isolated instance with a different port.

After a restart or planned upgrade, check sign-in and repeat the sample merge, split and OCR operations. Confirm that stored files and workflows remain. If an operation fails, inspect logs and permissions before altering several settings at once. Keep rollback data from before the upgrade, since a newer database may not work with an older image.

These are documented configuration and proposed acceptance checks, not a claim that this article's example has been run on a live TechDecode server. A dependable PDF tool is one whose access and outputs you can verify, with originals and recovery copies available when a conversion does not produce the intended result.