Deployment guide

Stirling PDF

Videos

Overview: Stirling PDF on Ubuntu 24.04 on Azure: overview (watch on YouTube)

Launch and log in: Stirling PDF on Ubuntu 24.04 on Azure: launch and log in (watch on YouTube)

Deep Dive: Stirling PDF on Ubuntu 24.04 on Azure: deep dive (watch on YouTube)

Overview

Stirling PDF is an open source, self-hosted PDF toolkit. It offers 50+ PDF operations in one web interface, including merge, split, conversion to and from Office formats and images, OCR, compression, signing, redaction, watermarks, and form filling and flattening. Every document is processed locally on your own VM, so nothing is sent to a third-party cloud.

This SecureAnyCloud image runs Stirling PDF 2.14.1 as a Docker container behind an nginx reverse proxy on port 80. nginx protects the whole toolkit with HTTP Basic Auth, and each VM generates its own login password on first boot.

What you get:

  • Stirling PDF 2.14.1 running as a container managed by Docker, with a restart policy, bound to the loopback connector 127.0.0.1:8080
  • Docker CE preinstalled from the official Docker apt repository
  • The Stirling PDF web interface on :80, fronted by nginx with HTTP Basic Auth
  • A unique login password generated on the first boot of every VM and recorded in a root-only file
  • A dedicated Azure data disk at /var/lib/stirling-pdf holding configuration, custom files and logs
  • docker.service and nginx.service as enabled, active systemd units
  • An unauthenticated /healthz endpoint for Azure Load Balancer health probes
  • Generous upload limits for large PDFs (nginx client_max_body_size 512m)
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Standard_B2ms (2 vCPU / 8 GiB RAM) is a reasonable starting size. Choose a larger size if you process large PDFs, run OCR on many pages at once, or expect concurrent users.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp. Stirling PDF serves plain HTTP on port 80. For production, terminate TLS in front of it with your own domain and consider adding 443/tcp (see Maintenance).

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Stirling PDF by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Review the dedicated data disk on the Disks tab, then select Review + create and 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 sac1647283583153:stirling-pdf-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name stirling-pdf \
  --image sac1647283583153:stirling-pdf-ubuntu-24-04:default:latest \
  --size Standard_B2ms \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name stirling-pdf --port 80 --priority 1010

First boot takes a few minutes. In the background, the VM generates its own credentials and starts the services. If you connect as soon as the VM shows as running, wait for that setup to finish before you continue.

Run sudo cloud-init status --wait in a bash shell on the VM. It prints status: done when the VM is ready. The credentials and services described below exist only after that.

Step 3 - Connect to your VM

Connect over SSH as azureuser:

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services are running

Check that Docker and nginx are both active:

systemctl is-active docker.service nginx.service

Both report active. Docker manages the Stirling PDF container, which is bound to the loopback connector 127.0.0.1:8080. nginx fronts it on port 80 behind HTTP Basic Auth.

Stirling's configuration, custom files and logs live on the dedicated Azure data disk mounted at /var/lib/stirling-pdf.

Step 5 - Retrieve your login credentials

Stirling PDF is protected by HTTP Basic Auth with the user admin. Your VM generates a unique password on first boot and writes it to a root-only file. Read it as root:

sudo cat /root/stirling-pdf-credentials.txt

The file contains STIRLING_PDF_USERNAME, STIRLING_PDF_PASSWORD and the URL to open. Store the password somewhere safe.

Step 6 - Confirm the health endpoint

nginx serves an unauthenticated health endpoint for load balancers and probes. Call it from the VM:

curl -s http://localhost/healthz

It returns ok. The endpoint never requires authentication, so an Azure Load Balancer health probe can use it.

Step 7 - Confirm the login password is enforced

The password is set on first boot, so an unauthenticated request to the toolkit is rejected with HTTP 401. Nobody reaches your documents without the password. Send a request with no credentials:

curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1/

It prints 401. A wrong password is also rejected with 401, and only the per-VM password from Step 5 returns 200. You can confirm this in the browser in the next step.

Step 8 - Sign in to the toolkit

Browse to http://<vm-public-ip>/. Your browser prompts for HTTP Basic Auth credentials. Enter admin and the password from Step 5.

After you sign in, you land on the tool grid. It lists every PDF operation Stirling PDF offers, grouped by category (General, Convert, Security, Sign, Advanced and more), with a search box to find a specific tool quickly.

Step 9 - Merge or convert a PDF

Open Merge, drag in your PDF files, and set the operation's options in the panel. Every other tool follows the same pattern, including Split, Convert to and from Word or image formats, Compress, OCR, Sign, Redact, Watermark and 50+ more.

Step 10 - Browse the tool categories

The left-hand navigation groups every operation by category, including Convert, Security, Sign, Edit and Advanced. Use it to jump straight to the tool you need without searching.

Step 11 - Review account and settings

The account menu shows the signed-in session and links to the toolkit's settings. There you can adjust language, theme and other preferences.

Step 12 - Confirm data lives on the dedicated disk

Stirling's configuration, custom files and logs are stored under /var/lib/stirling-pdf on the dedicated Azure data disk. The directories are bind-mounted into the container as /configs, /customFiles and /logs. They survive OS changes and can be resized independently. Confirm the mount:

findmnt /var/lib/stirling-pdf

The mount is backed by a separate Azure data disk that is captured into the image and re-provisioned on every VM.

Maintenance

  • Password: the Basic Auth password is set on first boot. To change it, run sudo sh -c 'printf "admin:%s\n" "$(openssl passwd -apr1 NEW_PASSWORD)" > /var/lib/stirling-pdf/.htpasswd' && sudo systemctl reload nginx.
  • Custom files and pipelines: the /customFiles and /pipeline directories under /var/lib/stirling-pdf hold custom stamps, watermark images and automation pipeline configs. See the Stirling PDF documentation for details.
  • OCR languages: to run OCR in languages beyond English, add Tesseract language packs to the container's tessdata volume.
  • Upgrades: Stirling PDF runs as the stirling-pdf container from the pinned stirlingtools/stirling-pdf:2.14.1 image. To upgrade, pull a newer tag, remove the container and re-run it with the same -v /var/lib/stirling-pdf/configs:/configs -v /var/lib/stirling-pdf/logs:/logs -v /var/lib/stirling-pdf/customFiles:/customFiles mounts. This preserves your configuration.
  • Storage: all Stirling state lives under /var/lib/stirling-pdf on the data disk. Back up that volume to protect your configuration and custom files.
  • TLS: Stirling PDF serves plain HTTP on port 80. Before you run it in production, front it with TLS, for example with certbot and your own domain.
  • Security patches: unattended-upgrades stays enabled, so the OS keeps receiving security updates automatically.
  • License: Stirling PDF's core is MIT licensed. This image ships the free Community edition with no Pro or Enterprise license key. Some optional proprietary modules described in the upstream project are not included.

Support

SecureAnyCloud provides 24/7 expert support for this image. Contact sales@secureanycloud.com.

Deploy on Azure

Launch Stirling PDF on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure