Leverage ComPDF Self-hosted (Part of the KDNA ecosystem), an open-source PDF platform in a single Docker container for private deployment—use it to edit, convert, and transform documents across PDFs, Office formats, HTML, TXT, CSV, RTF, JSON, and images.
- If you find ComPDF Self-hosted useful, please consider giving us a ⭐ Star on GitHub. It helps us grow and improve.
- Got questions or ideas? Join the conversation in our Discussions.
Features • Quick Start • Architecture • Upgrade to Enterprise • support • License • Enterprise →
Unlike traditional PDF SDK solutions that require complex integration and infrastructure setup, ComPDF Self-Hosted is a complete open source PDF editor and open source PDF converter platform ready for deployment — including an image converter for common photo formats, making it a versatile photo converter open source solution.
- One-command Docker deployment
- Complete PDF tool center — edit, convert, merge, split
- API key management and license management
- Private deployment with enterprise-ready architecture
- Commercial support and dedicated assistance available
Whether you're building an internal document platform, document automation workflow, or enterprise PDF service, ComPDF Self-Hosted helps you get started in minutes.
ComPDF Self-Hosted provides a ready-to-use open source PDF editor, open source PDF converter, and open source image converter center directly accessible through a browser.
- Merge PDF
- Split PDF
- Rotate PDF
- Insert Pages
- Delete Pages
- Extract Pages
- Add Watermark
- Remove Watermark
- Encrypt PDF
- Decrypt PDF
- PDF/A Conversion
- PDF to Word
- PDF to Excel
- PDF to PowerPoint
- PDF to Image
- PDF to HTML
- PDF to TXT
- PDF to CSV
- PDF to RTF
- PDF to JSON
- Word to PDF
- Excel to PDF
- PowerPoint to PDF
- HTML to PDF
- TXT to PDF
- CSV to PDF
- RTF to PDF
- TIFF to PDF
- Image to Word
- Image to Excel
- Image to PowerPoint
- Image to HTML
- Image to CSV
- Image to TXT
- Image to RTF
cp .env.example .envUpdate .env before starting the services. The default Docker topology uses
internal service names, so the SDK URLs can stay unchanged for Compose-based
development and production:
COMPDF_LICENSE_KEY=9Mm4sGuQLb6EjWYP/mKq7FiAURcei2gpD3Xp7h0PfYVHrH7NYNXgGHJtwipM+bJvsD0fU47ag6kKBX6Kl18pvEz1/NbmCfqLy/z3c5RB/STT7DHp54Prie8t+FT7JlhplsQJAk1wJH2uFdtvln9tfqxl6pGh7UBhQfaclfOxecB6Eg9ddkgyuamJWoTTdq2dYOU6i6upsPe5sb90Z2HUP2dQbYnS3k5FGKDN9u4xOVF4yMTsFXyADxMuuAoGwhVzp1KfIbeQkMd5CjX9gWkcmI0zq+ZWHP2hFpyZEtVhWcgjrAdPUAIAMIKL6bUpua7tg/XShzwQCvPkG6i8Fx7cj/QU1RxzE+64PWmYdGnEDP8xxQhfT5IxS4cQtm8Gzo3APu/lwRsJioS2qVdt0NrET0uLir3lkfKM1RHsZ3OKAUeqJqU4W1szUhtxgG7J4xFdszsysZ6q9ojjwOW6rhXMf27yU9VYTwG0UMwaeYDxjd56c+I5y9Q1pXusLcStpc774Mq4Ybhw1p3JdPbjJ83EzQkSFpLPdPIZK0cm82N2jiG+ZqTsZfT9J0cFAxvpYr8KyUjcSHFTSD6POc3PxVLFDACPzKDo1xJTVu6fySBSVb5l6tZWbsVwZWZNYZToei+mIW58Xto7bK2+IaEE3Y2+0GYJ4dMnE4uMWxYTWDoeRhFdgl5kXF8YjqQG8B/sdNT6oJjKwv5BjhxB1JqlFMX9wNxZjB6IluMXjF7i4Uwmiaaky5xy+Jq3a15CtfI78GLmza9JKIqLHNziJf7a0iL7TEinlRGzvCNI4Aa3YxgKIE+6W5q6A9cYP75rT358Evsfy1sKDAYOajopGFJ19cM3GF0PhLHLdP4kwBjoVWDh3xBLoMkpsQEF2V8TcxfnvaHk3GPVTcTu0DkM1ksuHRWX7KZDTiv16YcwN8BdWYxfEpB9ZGpSK0R8dyZuCKbMKAeXApply for the official version License and replace COMPDF_LICENSE_KEY to obtain the following benefits:
- Watermark-free document processing
- No limit on the number of document pages processed
- Batch document processing
Development uses Docker for the infra and SDK services, while the middleware and Web UI can run locally for hot reload.
Terminal 1: start MySQL, Redis, RustFS, and the SDK services:
docker compose -f docker-compose.dev.yml up -d compdf-infra compdf-app
docker compose -f docker-compose.dev.yml psTerminal 2: start the NestJS middleware locally. It connects to the dev Compose services through their host-mapped ports:
cd server
npm install
DATABASE_HOST=127.0.0.1 \
DATABASE_PORT=13306 \
DATABASE_USER=compdfkit \
DATABASE_PASSWORD=compdfkit-pass-2026 \
DATABASE_NAME=compdfkit \
REDIS_HOST=127.0.0.1 \
REDIS_PORT=16379 \
COMPDF_SDK_BASE_URL=http://127.0.0.1:7000 \
PDF_SDK_BASE_URL=http://127.0.0.1:7001 \
CONVERSION_BASE_URL=http://127.0.0.1:7000 \
LICENSE_TOKEN_PATH=../configs/license.jwt \
SETTINGS_PATH=../configs/settings.yml \
STORAGE_DIR=./storage \
npm run start:devThe middleware exposes the API at:
http://localhost:8080/api/v1/*
Terminal 3: start the Vue Web UI. Vite proxies /api to the middleware on port
8080:
cd frontend/compdf-web
npm install
npm run devOpen the URL printed by Vite, for example:
http://localhost:5173/
For LAN access, use the machine IP printed by Vite's Network URL and make
sure the middleware is also reachable from that machine.
If you prefer running the middleware in Docker during development:
docker compose -f docker-compose.dev.yml up -d --build compdf-infra compdf-app webProduction mode builds the compdf-web image from the root Dockerfile. The
Dockerfile compiles frontend/compdf-web, builds the NestJS server, copies the
Web UI into /app/public/compdf-web, and starts the middleware on port 8080.
docker compose -f docker-compose.yml up -d --build compdf-infra compdf-app compdf-webCheck status and logs:
docker compose -f docker-compose.yml ps
docker compose -f docker-compose.yml logs -f compdf-webOpen ComPDF Web:
http://localhost:8080/
The production deployment stores persistent data in Docker volumes and mounts ./configs into the middleware container.
All features above come with ComPDF — check them out here.
┌────────────────────────────────────────────────────────────────────┐
│ Browser │
│ http://localhost:8080/ in production │
└───────────────────────────────┬────────────────────────────────────┘
│
│ HTML/CSS/JS + HTTP /api/v1/*
▼
┌────────────────────────────────────────────────────────────────────┐
│ compdf-web container │
│ frontend/compdf-web + server │
│ NestJS middleware, port 8080 │
├────────────────────────────────────────────────────────────────────┤
│ - Serves the Vue 3 Web UI from /app/public/compdf-web │
│ - Proxies PDF edit APIs: /api/v1/pdf/* │
│ - Proxies conversion APIs: /api/v1/* conversion routes │
│ - Orchestrates async task status and downloads │
│ - Injects display-only license metadata into the Web UI │
│ - Normalizes upstream errors and writes operation logs │
└───────────────┬───────────────────────────────┬────────────────────┘
│ │
│ HTTP │ MySQL / Redis
▼ ▼
┌────────────────────────────────┐ ┌────────────────────────────────┐
│ compdf-app container │ │ compdf-infra container │
│ Third-party SDK services │ │ MySQL 8 + Redis 7 + RustFS │
│ :7000 conversion APIs │ │ persistent Docker volumes │
│ :7001 PDF SDK /v1/sync/* APIs │ │ │
│ :9903 service health │ │ │
└────────────────────────────────┘ └────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────┐
│ Project-mounted data │
├────────────────────────────────────────────────────────────────────┤
│ configs/: license.jwt, settings.yml, init.sql │
│ storage/: async task result files │
│ fonts/: optional fonts mounted into the SDK container │
└────────────────────────────────────────────────────────────────────┘
In local development, compdf-infra and compdf-app still run in Docker. The
NestJS middleware can run from server/, and the Web UI can run from
frontend/compdf-web with Vite hot reload.
Contact sales to remove all the limitations and unlock enterprise capabilities.
Enterprise Benefits:
- No Watermark
- Unlimited Page Processing
- Higher Concurrency
- Custom License Configuration
- Dedicated Technical Support
- Self-Hosted Deployment Consulting
Open-Source ComPDF Self-Hosted Limitations:
| Feature | Free Edition |
|---|---|
| Watermark | Yes |
| Concurrent Tasks | 1 |
| Pages Per Document | 10 |
| Commercial Support | No |
| Dedicated Support | No |
-
API Reference: https://www.compdf.com/guides/pdf-sdk/self-hosted-deployment/api-reference-file-processing
-
Documentation: https://www.compdf.com/guides/pdf-sdk/self-hosted-deployment/get-started
-
Contact Sales: https://www.compdf.com/contact-sales
Have suggestions? Start a discussion. If you find ComPDF Self-Hosted useful, please consider giving us a ⭐ Star on GitHub. It helps us grow and improve.
-
This project is licensed under the MIT License. See the LICENSE file for details.
-
Contact Sales for the Commercial / Enterprise licenses for ComPDF Self-Hosted.
Built by the ComPDF team.
Website ·
Docs ·
Enterprise Inquiries