Last active
March 12, 2026 09:13
-
-
Save ManotLuijiu/ea33a9ceb411d7cc758fd55e6ae96e3c to your computer and use it in GitHub Desktop.
How to install Stirling PDF on Docker using docker-compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.3' | |
| services: | |
| stirling-pdf: | |
| image: frooodle/s-pdf:latest | |
| ports: | |
| - '8080:8080' | |
| volumes: | |
| - ./trainingData:/usr/share/tessdata #Required for extra OCR languages | |
| - ./extraConfigs:/configs | |
| - ./customFiles:/customFiles/ | |
| - ./logs:/logs/ | |
| environment: | |
| - DOCKER_ENABLE_SECURITY=true | |
| - SECURITY_ENABLELOGIN=true | |
| - SECURITY_INITIALLOGIN_USERNAME=admin | |
| - SECURITY_INITIALLOGIN_PASSWORD=yourpassword | |
| - INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false | |
| - LANGS=th_TH | |
| - UI_APP_NAME=Put any name here | |
| - UI_HOME_DESCRIPTION=Your locally hosted one-stop-shop for all your PDF needs. | |
| - UI_APP_NAVBAR_NAME=Stirling PDF | |
| restart: always |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| # replace example.com with your domain name | |
| # Don't forget to add domain name | |
| # and your server's IP in DNS Server like AWS/Route53 | |
| server_name example.com; | |
| listen 80; | |
| listen [::]:80; | |
| location / { | |
| proxy_pass http://127.0.0.1:8080; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| location = /live/websocket { | |
| proxy_pass http://127.0.0.1:8080; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection "Upgrade"; | |
| } | |
| } | |
| } |
Author
Author
How to enable SSL (HTTPS) for Stirling PDF
Go to /etc/nginx/sites-available/ or using this command
sudo nano /etc/nginx/sites-available/stirlingpdfCopy code from stirlingpdf as shown above and paste to it.
Sync sites-available/stirlingpdf to sites-enabled/stirlingpdf using this command
sudo ln -s /etc/nginx/sites-available/stirlingpdf /etc/nginx/sites-enabled/Run Certbot
sudo certbot --nginx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to install Stirling PDF on Docker using docker-compose
Install Docker engine and docker-compose
Docker engine and docker compose plugin
Step 1
Step 2
Step 3
sudo groupadd docker sudo usermod -aG docker $USER newgrp dockerStep 4
docker-compose standalone
Install Nginx and Certbot
Install Thai OCR packages
sudo apt-get install -y 'tesseract-ocr-tha'Create Folder for docker-compose.yml file
Create File docker-compose.yml
# stirling-pdf/docker-compose.yml sudo nano docker-compose.ymlcopy code that shown in docker-compose.yml and paste
run application