Stirling PDF on Proxmox
The best thing about my job is being surrounded by colleagues that inspire you with tiny, nifty projects. This is one of them.
Using Kwellkorn’s post as reference, I’ll install a Stirling PDF instance as LXC container on my homelab.
- Use ProxMox Script for installation, select advanced installation if you want to customize the installation settings:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/stirling-pdf.sh)" - I ran into a package dependency problem while installing, but could resolve it choosing option 4 (repair and re-run install):
- You should be able to access Stirling PDF on
:8080. If your container is also running behind a reverse proxy, remember to set up forwarding accordingly. This will imply setting the following variable on ```/opt/Stirling-PDF/.env``` : ```SYSTEM_PUBLIC_URL=http:// ``` as well as setting up a proxy redirect **AND** allowing WebSocket Support!
1
2
3
4
5
6
7
8
client_max_body_size 500M;
# Explicitly pass the original host header during redirects
proxy_redirect http://<container-IP>:8080/ /;
proxy_set_header X-Forwarded-Host $host;
# Force a clean redirect to login if the app drops the connection at root
error_page 401 403 404 = @redirectToLogin;
- Login into Stirling PDF and start customizing it!
- You can also use your Reverse Proxy to terminate SSL Connections to the host. In that case, generate a certificate and edit your config files / proxy settings accordingly:
- Generate and upload your certificate to your proxy manager. Remember to toggle advanced SSL options to avoid redirect/HSTS problems:
- Adjust
/opt/Stirling-PDF/.env:SYSTEM_PUBLIC_URL=https://<container-FQDN> - Adjust the proxy redirect block: […]
proxy_redirect https://<container-IP>:8080/ /;[…]
When logged into your Proxmox Server via SSH, you can jump into your LXC container by simply typing
pct enter <container-ID>. Something new I learnt today.
That’s all! Remember to change the default password, enable MFA and check out the documentation for more information and download links for Desktop Clients.
This post is licensed under CC BY 4.0 by the author.

