Back to articles
Technology Insight

Deploying Stirling-PDF on a VPS: The Ultimate Self-Hosted Document Management Solution for Enterprise

May 27, 2026

Introduction: The Growing Need for Secure, Self-Hosted Document Processing

In the modern corporate landscape, the Portable Document Format (PDF) remains the undisputed standard for business documentation, legal contracts, and financial reporting. However, managing these files efficiently often forces enterprises into a difficult compromise. Relying on public, third-party online PDF converters introduces substantial data privacy compliance risks, especially under strict frameworks like GDPR, HIPAA, or local data sovereignty laws. On the other hand, licensing enterprise-grade desktop software across an entire organization incurs prohibitive software-as-a-service (SaaS) subscription costs.

Enter Stirling-PDF: a robust, open-source, and entirely self-hosted PDF manipulation platform. Stirling-PDF brings the full utility of premium PDF suites directly to your web browser without transmitting sensitive data outside your infrastructure. By deploying Stirling-PDF on a Virtual Private Server (VPS), your organization can provide employees with an all-in-one web-based toolkit to merge, split, compress, OCR, convert, and sign PDF documents securely. This technical guide delivers a step-by-step roadmap to deploying, optimizing, and securing Stirling-PDF on a Linux VPS using Docker.


Why Choose Stirling-PDF for Your Business Infrastructure?

Before diving into the technical deployment process, it is essential to understand why Stirling-PDF stands out as a critical asset for enterprise IT environments. Unlike traditional solutions, it operates completely offline when self-hosted, ensuring that no document ever leaves your controlled server environment.

  • Comprehensive Feature Set: Stirling-PDF eliminates the need for fragmented tools. It handles advanced operations including optical character recognition (OCR) via Tesseract, interactive form filling, cryptographic signing, redacting sensitive text, and multi-format conversions (e.g., Office to PDF, images to PDF).
  • Lightweight Resource Consumption: Built with performance in mind, the platform runs efficiently in containerized environments, making it suitable for cost-effective VPS instances without sacrificing speed.
  • Granular Customization and API Access: It offers an intuitive, responsive UI alongside a fully documented REST API. This allows developers to integrate PDF processing workflows directly into existing internal ERP, CRM, or HR systems.
  • Zero Licensing Fees: As a fully open-source solution, it removes per-user licensing bottlenecks, allowing seamless scaling across hundreds of concurrent employees.

System Prerequisites and Environment Setup

To ensure optimal performance and stability under enterprise workloads, your VPS should meet or exceed the following hardware and software baselines:

1. Hardware Requirements

  • CPU: Minimum 2 vCPUs (4 vCPUs recommended if utilizing heavy OCR processing or batch conversions).
  • RAM: 2 GB minimum (4 GB or higher recommended to prevent Out-Of-Memory errors during complex document rendering).
  • Storage: 20 GB of SSD storage (scale based on your document retention and logging policies).

2. Software Environment

This deployment guide targets Ubuntu 24.04 LTS or Debian 12, though any modern Linux distribution supporting Docker is compatible. Ensure you have root or sudo administrative privileges, and that your domain name's DNS A Record points directly to your VPS public IP address.


Step-by-Step Deployment Guide

Step 1: Update System Packages and Install Docker

First, establish an SSH connection to your VPS and update the local package index to ensure all system dependencies are current. Then, install Docker and Docker Compose.

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl git apt-transport-https ca-certificates gnupg

Install the official Docker engine using the automated convenience script provided by Docker:

curl -fsSL [https://get.docker.com](https://get.docker.com) -o get-docker.sh
sudo sh get-docker.sh

Verify that Docker and the Docker Compose plugin are successfully installed and running:

docker --version
docker compose version
sudo systemctl status docker

Step 2: Create a Dedicated Directory Structure

To maintain a clean server architecture, isolate the Stirling-PDF infrastructure within its own directory hierarchy. This ensures persistence for app data, configurations, and custom assets.

mkdir -p ~/stirling-pdf/trainingData
cd ~/stirling-pdf
Note: The trainingData directory is crucial if you intend to load custom language packs for OCR processing, allowing the application to recognize localized text elements accurately.

Step 3: Configure the Docker Compose File

Stirling-PDF is highly configurable via environment variables. Create a docker-compose.yml file using your preferred text editor:

nano docker-compose.yml

Populate the file with the following production-ready multi-container architecture layout:

version: '3.8'

services:
  stirling-pdf:
    image: frooodle/s-pdf:latest
    container_name: stirling-pdf
    restart: always
    ports:
      - "8080:8080"
    volumes:
      - ./trainingData:/usr/share/tessdata
      - pdf-configs:/configs
      - pdf-logs:/logs
    environment:
      - DOCKER_ENABLE_SECURITY=true
      - SECURITY_ENABLE_LOGIN=true
      - SYSTEM_DEFAULT_LOCALE=en-US
      - APP_LOCALE=en_US
      - METRICS_ENABLED=true

volumes:
  pdf-configs:
  pdf-logs:

Within this configuration, setting SECURITY_ENABLE_LOGIN=true enforces user authentication, securing the interface from unauthorized public access. Save and close the file.

Step 4: Launching the Application

Execute the docker command to pull the Stirling-PDF image layers and instantiate the container in detached background mode:

sudo docker compose up -d

Monitor the initialization process using the container logs to ensure no runtime errors occur:

sudo docker compose logs -f stirling-pdf

Securing Stirling-PDF with Nginx and Let's Encrypt

Running an enterprise application over unencrypted HTTP (port 8080) exposes sensitive business files to potential interception. To mitigate this risk, implement Nginx as a reverse proxy coupled with an automated Let's Encrypt SSL/TLS certificate.

1. Install Nginx and Certbot

sudo apt install -y nginx certbot python3-certbot-nginx

2. Configure the Nginx Server Block

Create a dedicated configuration profile for your Stirling-PDF domain installation:

sudo nano /etc/nginx/sites-available/pdf.yourdomain.com

Insert the following reverse proxy directive block, modifying pdf.yourdomain.com to match your actual domain name:

server {
    listen 80;
    server_name pdf.yourdomain.com;

    client_max_body_size 100M; # Crucial for handling large PDF uploads

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    	proxy_read_timeout 600s;
        proxy_connect_timeout 600s;
    }
}

Enable the site configuration by establishing a symbolic link to the active sites directory, test for syntax issues, and reload Nginx:

sudo ln -s /etc/nginx/sites-available/pdf.yourdomain.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

3. Provision the SSL Certificate

Execute Certbot to automatically provision, install, and configure an SSL certificate from Let's Encrypt, enforcing global HTTPS redirection:

sudo certbot --nginx -d pdf.yourdomain.com

Post-Deployment Optimization and Enterprise Best Practices

Once your instance is successfully online, log in using the default credentials (typically admin / stirling) and immediately update the primary administrative account details via the settings dashboard. Consider the following optimizations for enterprise deployment:

  1. Adjust File Size Limits: If your team handles exceptionally large blueprints, books, or legal dossiers, make sure both your Nginx configuration (client_max_body_size) and Stirling-PDF internal environment variables are scaled uniformly to prevent 413 Payload Too Large exceptions.
  2. Enable Automated Backups: Schedule a cron job to routinely back up the docker volumes containing custom configurations and user logs to an external, encrypted object storage container.
  3. Implement Firewall Rules: Restrict inbound port 80 and 443 traffic exclusively to your company's corporate VPN IP ranges using ufw (Uncomplicated Firewall) to add an extra perimeter layer of security.

Conclusion

Deploying Stirling-PDF on a private VPS provides modern businesses with a powerful compromise: full PDF utility without compromising security, compliance, or capital efficiency. By controlling your own document processing node via Docker and Nginx, your enterprise secures a scalable, high-performance, and entirely private asset that grows alongside your computational requirements. Transition your team to your new self-hosted PDF platform today to assert total control over your digital workflow infrastructure.