HomeAbout MeContact Me
Self-Hosting Stirling-PDF with Docker and Proxmox
Smart Home
Self-Hosting Stirling-PDF with Docker and Proxmox
Emanuele Papa
Emanuele Papa
November 25, 2023
1 min

Let’s explore the process of deploying Stirling-PDF as a Docker instance on a Proxmox home server.
Proxmox, coupled with an Alpine Docker LXC, provides a simple solution to isolate applications, making it an efficient choice for self-hosting.
This article aims to share my findings and guide you through the setup process.

What’s Stirling-PDF

Stirling-PDF is a powerful locally hosted web based PDF manipulation tool that allows you to perform various operations on PDF files, such as splitting merging, converting, reorganizing, adding images, rotating, compressing, and more.

Installation steps

  1. Ensure you have a Proxmox home server set up and running
  2. Use the Proxmox main shell to create an Alpine Docker LXC using this awesome script from tteck. (Assign at least 4GB of disk space if you plan to install the full version of Stirling-PDF)
  3. In the shell of the newly created container, run the following Docker command:
docker run -d \
-p 80:8080 \
-v /docker/stirlingpdf/ocrdata:/usr/share/tesseract-ocr/4.00/tessdata \
-v /docker/stirlingpdf/configs:/configs \
-e DOCKER_ENABLE_SECURITY=true \
-e SECURITY_ENABLE_LOGIN=true \
--restart always \
--name stirling-pdf \
frooodle/s-pdf:latest
  1. Once the container is up and running, you can access the Stirling-PDF web interface by navigating to http://<your-container-ip> in your web browser.
  2. You are all set, but keep reading for more information!

Understanding the Docker Run Command

  1. docker run -d -> Run Docker in detached mode
  2. -p 80:8080 -> Expose on port 80 of the host the port 8080 of the Docker container, so Stirling-PDF can be accessed
  3. -v /docker/stirlingpdf/ocrdata:/usr/share/tesseract-ocr/4.00/tessdata -> mounts the folder at /docker/stirlingpdf/ocrdata on the host machine to /usr/share/tesseract-ocr/4.00/tessdata in the docker container
  4. -v /docker/stirlingpdf/configs:/configs -> Mount the folder at /docker/stirlingpdf/configs on the host machine to /configs in the docker container
  5. -e DOCKER_ENABLE_SECURITY=true -> Tell docker to download security jar (required as true for auth login)
  6. -e SECURITY_ENABLE_LOGIN=true -> Actually enable the authentication
  7. --restart always -> Always restart the container
  8. --name stirling-pdf -> The name that will be assigned to the container
  9. frooodle/s-pdf:latest -> The Docker image to use to create the container

Security

Enabling DOCKER_ENABLE_SECURITY and SECURITY_ENABLE_LOGIN is crucial to enforce authentication in Stirling-PDF.
You can always customize security stuff by changing the settings.yaml file created inside /docker/stirlingpdf/configs instead of providing these environment variables.

OCR

If you need additional languages for OCR, using the LXC shell move to /docker/stirlingpdf/ocrdata and download the needed language file from tesseract-ocr/tessadata repository.
For example, run wget https://github.com/tesseract-ocr/tessdata/raw/main/ita.traineddata for the Italian language.

If you don’t need OCR or you run on low resources, depending on the feature you need, you might want to use a lightweight version, in that case change latest to latest-lite or latest-ultra-lite.
See here for a features overview.

Maintenance

Your docker container will restart automatically in case of issues or reboot thanks to --restart always. To manually stop and restart it, you can use docker stop stirling-pdf and docker restart stirling-pdf.

Enjoy your own Stirling-PDF instance! 🚀


Tags

Share


Previous Article
Kotlin Multiplatform and Swift - Overcoming Interoperability Challenges for Multiplatform Development
Emanuele Papa

Emanuele Papa

Android Developer

Table Of Contents

1
What's Stirling-PDF
2
Installation steps

Related Posts

Synchronize AdGuard Home instances with Docker and Proxmox
Synchronize AdGuard Home instances with Docker and Proxmox
April 23, 2024
2 min

Quick Links

HomeAbout MeContact MeRSS Feed

Social Media