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.
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.
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
http://<your-container-ip> in your web browser.
docker run -d -> Run Docker in detached mode
-p 80:8080 -> Expose on port 80 of the host the port 8080 of the Docker container, so Stirling-PDF can be accessed
-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
-v /docker/stirlingpdf/configs:/configs -> Mount the folder at
/docker/stirlingpdf/configs on the host machine to
/configs in the docker container
-e DOCKER_ENABLE_SECURITY=true -> Tell docker to download security jar (required as true for auth login)
-e SECURITY_ENABLE_LOGIN=true -> Actually enable the authentication
--restart always -> Always restart the container
--name stirling-pdf -> The name that will be assigned to the container
frooodle/s-pdf:latest -> The Docker image to use to create the container
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.
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
See here for a features overview.
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! 🚀