Self-hosted install for Docker or bare metal (Debian/Ubuntu recommended).
- Docker Engine + Docker Compose or
- Python 3.12,
python3-venv, and system packages:- Tesseract OCR (
tesseract-ocr,tesseract-ocr-eng, optionallytesseract-ocr-spa) - LibreOffice Writer headless (office → PDF):
libreoffice-writer-noguior equivalent
- Tesseract OCR (
git clone https://github.com/redmanxp/SimplePDF-OSS.git
cd SimplePDF-OSS
cp .env.example .env
# Optional: set PDF_EDITOR_SECRET_KEY in .env for stable multi-worker sessions
docker compose up --build- UI: http://localhost:8080
- Health: http://localhost:8080/api/health
- Uploads persist in
./uploads(bind-mounted)
Stop: docker compose down
sudo apt update
sudo apt install -y python3.12-venv python3-pip \
tesseract-ocr tesseract-ocr-eng tesseract-ocr-spa \
libreoffice-writer-nogui
# Or helpers:
# sudo bash deploy/install-ocr-apt.sh
# sudo bash deploy/install-libreoffice.sh
cd /opt/simple-pdf # or your clone path
python3.12 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env: HOST, PORT, UPLOADS, SECRET_KEY
gunicorn -w 2 -b 127.0.0.1:8000 --timeout 600 wsgi:appGeneric unit and env live under deploy/:
sudo mkdir -p /opt/simple-pdf
# copy or clone the project into /opt/simple-pdf
cp deploy/pdf-editor.env.example deploy/pdf-editor.env
# edit paths and PDF_EDITOR_SECRET_KEY
sudo bash deploy/install-systemd.shDefault example paths assume /opt/simple-pdf. Adjust deploy/pdf-editor.service and the install script if you install elsewhere.
Useful commands:
sudo systemctl status pdf-editor
journalctl -u pdf-editor -f
curl -s http://127.0.0.1:8000/api/healthOptional daily restart (fresh workers + upload cleanup on start):
sudo bash deploy/install-daily-restart.shFor any network beyond a trusted LAN, put nginx/Caddy/Traefik in front with TLS and keep gunicorn on localhost. Do not commit private keys.
If you expose the app port directly, restrict source networks with your firewall. Prefer proxy-on-443 + localhost backend. See deploy/ufw-pdf-editor.sh as a starting point (edit CIDR/port).
curl -s http://127.0.0.1:8000/api/health
# Expect JSON with ok/status and optional ocr / libreoffice flags| Symptom | Check |
|---|---|
| Port in use | ss -lntp | grep 8000 |
| Service not listening | journalctl -u pdf-editor |
| OCR fails | tesseract --list-langs; install eng/spa packs |
| Office upload fails | soffice --version; install LibreOffice Writer |
| “No files to combine” with multi-worker | set stable PDF_EDITOR_SECRET_KEY or persist .secret_key |