Applications Azure

Stirling PDF on Windows Server 2025 on Azure User Guide

| Product: Stirling PDF on Windows Server 2025 on Azure

Overview

Stirling PDF is an open source, self hosted toolkit for working with PDF documents in your browser. It brings dozens of tools into one web interface: merge, split, rotate, compress, convert to and from PDF, edit text, sign, redact, watermark, add or remove passwords, compare and more. Every file is processed on your own server and never leaves it, and a REST API offers the same operations to scripts.

This image runs Stirling PDF 3.5.0 as a Windows service on Windows Server 2025 Datacenter (Desktop Experience) with the Eclipse Temurin 25 Java runtime. Stirling PDF listens only on the VM itself (127.0.0.1:8080); in front of it, Caddy serves HTTPS on port 443 and asks for a password before anything loads, and port 80 only redirects to HTTPS. On the first boot of every VM the image creates a random password and a TLS certificate of its own, so nothing is shared between machines and no default password ships. The Windows Server licence is included in the virtual machine price that Microsoft bills; Stirling PDF is open source under the MIT licence. cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours.

What is included:

  • Stirling PDF 3.5.0 (the release's core Stirling-PDF.jar, MIT licensed) in C:\Program Files\Stirling-PDF, running as the Windows service StirlingPDF (startup Automatic) under its own virtual account NT SERVICE\StirlingPDF, not LocalSystem
  • Eclipse Temurin 25 JRE, private to Stirling PDF (C:\Program Files\Stirling-PDF\jre)
  • Caddy 2.11.9 as the HTTPS front, running as the Windows service StirlingPDFProxy under NT SERVICE\StirlingPDFProxy: HTTPS on TCP 443 with this VM's own certificate and password, TCP 80 redirecting to HTTPS, uploads up to 2 GB, and Windows Firewall rules for both ports
  • A per-VM password for the user admin, written to a file only administrators can read
  • A per-VM self signed TLS certificate for the VM's public IP address, private IP address and computer name
  • Stirling PDF's settings, logs and working files in C:\ProgramData\StirlingPDF, made at first boot so every VM has its own
  • Usage analytics switched off
  • Windows Server 2025 Datacenter, patched with Windows Update at build, Microsoft Defender Antivirus and Windows Firewall on
  • cloudimg's support team on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours

Tools that need an external OCR or Ghostscript engine are not included and show greyed out: OCR / Cleanup scans, Auto rotate, Repair, Replace and invert colours, Scanner effect, PDF to CBR, PDF/UA, the accessibility report, form detection and URL to PDF. Every other tool works out of the box.

Prerequisites

An active Azure subscription, a Remote Desktop client, and a virtual network in the target region. Standard_B2ms (2 vCPU, 8 GiB RAM) is a good starting point for a team; choose a larger size for large documents or many people at once. In the network security group, allow inbound TCP 3389 (Remote Desktop), TCP 443 (Stirling PDF) and TCP 80 (the redirect to HTTPS) from your own address ranges only.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Stirling PDF on Windows Server 2025 by cloudimg, and select Create. On Basics pick your subscription, resource group, region and size, and set the Administrator account username and password. Under Inbound port rules allow RDP (3389), HTTP (80) and HTTPS (443), then narrow each rule's source to your own address range on the Networking tab. Select Review + create, then Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn cloudimg1647283583153:stirling-pdf-windows-server:default:latest

az vm create \
  --resource-group <your-rg> \
  --name stirling-pdf \
  --image cloudimg1647283583153:stirling-pdf-windows-server:default:latest \
  --size Standard_B2ms \
  --admin-username <admin-name> \
  --admin-password '<a strong password>' \
  --public-ip-sku Standard

az vm open-port --resource-group <your-rg> --name stirling-pdf --port 3389 --priority 1000
az vm open-port --resource-group <your-rg> --name stirling-pdf --port 443 --priority 1010
az vm open-port --resource-group <your-rg> --name stirling-pdf --port 80 --priority 1020

az vm open-port opens each port to any address; narrow the rules to your own ranges in the network security group afterwards.

First boot takes a few minutes. When the VM first starts, Windows finishes its setup, then the image creates this VM's password, certificate and configuration and starts both services. Until then nothing answers on port 443. The setup is finished when the file C:\ProgramData\stirling-pdf-windows-server-firstboot.done exists (Step 4).

Step 3 - Connect with Remote Desktop

Connect to the VM's public IP address with your Remote Desktop client (on Windows, mstsc; on macOS, Windows App), signing in with the administrator name and password you set at deployment. Open Windows PowerShell as administrator for the commands below.

Step 4 - Confirm Stirling PDF is running

Test-Path C:\ProgramData\stirling-pdf-windows-server-firstboot.done
Get-CimInstance Win32_Service -Filter "Name LIKE 'StirlingPDF%'" | Format-Table Name, State, StartMode, StartName -AutoSize
Get-NetTCPConnection -State Listen -LocalPort 443, 80, 8080 | Format-Table LocalAddress, LocalPort, @{n='Process';e={(Get-Process -Id $_.OwningProcess).ProcessName}} -AutoSize
Invoke-RestMethod http://127.0.0.1:8080/api/v1/info/status
True

Name             State   StartMode StartName
----             -----   --------- ---------
StirlingPDF      Running Auto      NT SERVICE\StirlingPDF
StirlingPDFProxy Running Auto      NT SERVICE\StirlingPDFProxy

LocalAddress LocalPort Process
------------ --------- -------
::                  80 caddy
::                 443 caddy
127.0.0.1         8080 java

version : 3.5.0
status  : UP

True confirms first boot finished. Both services run under their own accounts and start automatically with Windows. Only Caddy listens on the network (ports 443 and 80); Stirling PDF itself (java) listens on 127.0.0.1:8080, which nothing outside the VM can reach, so every request from outside passes the password check first. The runtime versions:

& "C:\Program Files\Stirling-PDF\jre\bin\java.exe" -version
& "C:\Program Files\Stirling-PDF\caddy\caddy.exe" version
openjdk version "25.0.5.1" 2026-11-17 LTS
OpenJDK Runtime Environment Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS, mixed mode, sharing)
v2.11.9 h1:bhZtcRKQOq0fuLvEgCdPYvUxXyGn9kzjG4lh2332DTE=

The first boot log records what it made:

Get-Content C:\ProgramData\stirling-pdf-windows-server-firstboot.log
2026-12-02T14:35:25.7693396Z provisioning finished
2026-12-02T14:35:31.4109315Z addresses public=20.25.20.155 private=10.20.0.10
2026-12-02T14:35:33.1356584Z certificate CN=20.25.20.155 names=wsrdp-2e2087,20.25.20.155,10.20.0.10 sha256=dfb0bbbb3e315e03a5f0d9879512124e4df2bec2db54e61fcd60ae136552161c
2026-12-02T14:35:46.1883907Z certificate, key and Caddyfile written
2026-12-02T14:35:46.2695175Z credentials written
2026-12-02T14:37:55.2630068Z Stirling PDF answers on 127.0.0.1:8080; HTTPS on 443 asks for the password; 80 listens
2026-12-02T14:38:04.6097247Z first boot done

The certificate is named for the VM's public IP address (20.25.20.155 here), its private IP address and its computer name (wsrdp-2e2087 here), and is valid for ten years. Its public half is C:\ProgramData\StirlingPDFProxy\tls\cert.pem.

Step 5 - Read your password

First boot wrote the user name and password to a file that only the SYSTEM account and the Administrators group can read:

Get-Content C:\ProgramData\stirling-pdf-windows-server-credentials.txt
# Stirling PDF on Windows Server 2025 by cloudimg: this VM's own sign-in (made at first boot).
# Open https://<this VM's public IP>/ (port 80 redirects there) and sign in with the user and password below.
# The certificate is this VM's own, self-signed: its public half is C:\ProgramData\StirlingPDFProxy\tls\cert.pem.
# Guide: https://www.cloudimg.co.uk/guides/stirling-pdf-on-windows-server-2025-azure/

stirling-pdf-windows-server.admin.user=admin
stirling-pdf-windows-server.admin.password=<24 random characters, different on every VM>

The user name is always admin; the password is random and different on every VM. Keep it somewhere safe and share it only with the people who should use Stirling PDF.

Step 6 - Sign in from your browser

On your own computer, browse to https://<vm-public-ip>/. The certificate is this VM's own self signed one, so your browser warns about it the first time: accept it to continue (or install a trusted certificate, see Use a DNS name and a trusted certificate below). Your browser then asks for a user name and password: enter admin and the password from Step 5. Nothing loads without them.

Stirling PDF opens on its home page, with the PDF library on the left and every tool on the right:

Stirling PDF after signing in: the PDF library and the tool list

Step 7 - Open your PDFs

Choose Add Files (or drop files anywhere on the page) and pick one or more PDFs. They appear in the PDF Library and the first one opens in the viewer. Files are processed on this VM only.

Two PDFs opened in Stirling PDF, with the first shown in the viewer

Step 8 - Merge two PDFs

Choose Merge in the tool list. The panel shows the files that will be merged, the order (drag the cards to reorder, or sort by name or date) and the settings; then choose Merge (2 files).

The Merge tool with two files selected, the sort order and the merge settings

The merged PDF opens in the viewer (here five pages: three from the report and two from the contract). Download saves it to your computer, Undo goes back, and Edit your new file(s) passes it straight to another tool such as Compress, Convert or Split.

The merged five-page PDF in Stirling PDF's viewer, with Download and the next tools

Every other tool works the same way: pick the files, choose the tool, set its options and run it.

Step 9 - Use the REST API

Every tool is also available over HTTPS as a REST API, with the same user name and password. This is a session on the VM itself, in PowerShell, with curl.exe (part of Windows); -k because the certificate is the VM's own self signed one. The password is read into a variable and never shown:

PS> $pw = (Select-String C:\ProgramData\stirling-pdf-windows-server-credentials.txt -Pattern 'admin\.password=(\S+)').Matches[0].Groups[1].Value

PS> curl.exe -sk -o NUL -w "%{http_code}`n" https://127.0.0.1/api/v1/info/status
401

PS> curl.exe -sk -u "admin:$pw" https://127.0.0.1/api/v1/info/status
{"version":"3.5.0","status":"UP"}

PS> curl.exe -sk -u "admin:$pw" -F "fileInput=@invoice.pdf" -F "fileInput=@receipt.pdf" -o merged.pdf https://127.0.0.1/api/v1/general/merge-pdfs
PS> Get-Item merged.pdf | Format-Table Name, Length -AutoSize

Name       Length
----       ------
merged.pdf   1076

PS> (curl.exe -sk -u "admin:$pw" -F "fileInput=@merged.pdf" https://127.0.0.1/api/v1/security/get-info-on-pdf | ConvertFrom-Json).BasicInfo.'Number of pages'
2

PS> curl.exe -sk -u "admin:$pw" -F "fileInput=@merged.pdf" -F "angle=90" -o rotated.pdf -w "%{http_code} %{content_type}`n" https://127.0.0.1/api/v1/general/rotate-pdf
200 application/pdf

Without the password the API answers 401. From another machine, use https://<vm-public-ip>/ in place of https://127.0.0.1/. Stirling PDF lists every endpoint and its parameters in its API documentation.

Change the password

The password is checked by Caddy, which keeps only a bcrypt hash of it in C:\ProgramData\StirlingPDFProxy\Caddyfile. To change it, in an administrator PowerShell make the hash of your new password, put it in place of the old hash on the admin line of the Caddyfile, and restart the front:

& 'C:\Program Files\Stirling-PDF\caddy\caddy.exe' hash-password --plaintext '<new password>'
notepad C:\ProgramData\StirlingPDFProxy\Caddyfile      # basic_auth { admin <the new hash> }
Restart-Service StirlingPDFProxy

Update the password in C:\ProgramData\stirling-pdf-windows-server-credentials.txt too, so the file stays right. To give people separate passwords, add one <name> <hash> line per person inside basic_auth.

Use a DNS name and a trusted certificate

The image's certificate is self signed and named for the VM's IP addresses and computer name. To use a DNS name with a certificate your users already trust, point the name at the VM's public IP, get a certificate and key for it as PEM files, and replace C:\ProgramData\StirlingPDFProxy\tls\cert.pem (the certificate, with any intermediate certificates after it) and key.pem (the private key); then Restart-Service StirlingPDFProxy.

Maintenance

  • Windows updates: Windows Update is on, as Microsoft ships it. Restarting the VM restarts both services automatically.
  • Back up your data: Stirling PDF keeps its settings, pipelines and custom files in C:\ProgramData\StirlingPDF, and the front keeps its Caddyfile and certificate in C:\ProgramData\StirlingPDFProxy. Documents are processed in memory and in a temporary folder, not stored. Back up both folders, or use Azure Backup of the VM.
  • Upgrade Stirling PDF: you choose when to upgrade. Download the Stirling-PDF.jar of the version you want from the project's GitHub releases, then in an administrator PowerShell stop the services, replace C:\Program Files\Stirling-PDF\Stirling-PDF.jar with it and start them again; your settings are kept:
Stop-Service StirlingPDFProxy, StirlingPDF
Copy-Item <downloaded>\Stirling-PDF.jar 'C:\Program Files\Stirling-PDF\Stirling-PDF.jar' -Force
Start-Service StirlingPDF, StirlingPDFProxy
  • Logs: Stirling PDF's logs are in C:\ProgramData\StirlingPDF\logs and the services' output in C:\ProgramData\StirlingPDF\service-logs; the first boot log is C:\ProgramData\stirling-pdf-windows-server-firstboot.log (it never contains the password).
  • Firewall: Windows Firewall allows 443 and 80 through the rules in the Stirling PDF group; the network security group decides who can reach them.

Support

cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours. Contact support@cloudimg.co.uk.