How to Deploy ComPDFKit On-premises with Docker (Synchronous API)?

On-premises | Technical QuestionsWed. 12 Mar. 2025

There are three containers for self-hosted deployment provided by ComPDFKit for Linux to process PDFs on the server, including synchronous API, asynchronous API, and WebViewer. If you don’t know which suits your situation, learn the differences between synchronous, asynchronous API, and WebViewer

 

Follow the detailed instructions below to learn how to use our synchronous API to deploy ComPDFKit for Linux on your server with Docker. 

 

See also: How to deploy ComPDFKit Self-hosted Deployment with Docker (Asynchronous API)

 

Server Configuration

 

- Operating System Version: Ubuntu 22.04.3 LTS    

- CPU: 8vCPU 

- RAM: 16G 

- Disk Storage: 50G

- Docker Version: Docker version 20.10.25, build 20.10.25-0ubuntu1~20.04.2

- docker-compose version: 1.25.0

 

Before starting to deploy ComPDFKit for Linux, please download the mirror image of ComPDFKit Processor’s synchronous API on dockerhub.

 

The Process of Deploying ComPDFKit for Linux

 

Step 1. Place docker-compose.yml and compdfkit.sql into the fold where your server executes commands.

place docker-compose.yml and compdfkit.sql

 

Step 2. Modify LICENSE in docker-compose.yml to your own license key.

modify license

 

Step 3. After modifying, execute the command: docker-compose up.

execute the command

 

Step 4. Wait for the execution to complete, and you will see the following information:

“Running ComPDFKit Processor version 2.4.0 port(s) 7000 (http)”

complete execution

 

Step 5. Open a new window (using Xshell as an example) and run the command: docker ps -a. Once it outputs as the below image, it indicates that you have successfully deployed ComPDFKit for Linux.

successfully deployed compdfkit for linux

 

Verify If ComPDFKit for Linux Works Properly 

Example Feature: PDF Conversion (Curl)

 

Step 1. Upload your PDF document to the server. Here the file “test.pdf”  is placed in the same directory as compdfkit.sql.

upload your pdf to the server

 

 Step 2. Run the following curl command:

curl -f -X POST http://Your own server IP:17000/file/handle \
-H "Content-Type: multipart/form-data" \
-F file=@"test.pdf" \
-F executeType="pdf/json" \
-F password="file open password" \
-F parameter="{  \"type\": \"2\",  \"isAllowOcr\": \"1\"}" \
> Result.zip

 

run the curl command

 

Result.zip is the output file after completing the conversion.

 

 If you have any other questions about ComPDFKit for Linux, please contact our technical support team for further assistance.

Ready to Get Started?

Adding our 30-day trial into your app is breeze. Contact ComPDFKit now and enhance your app with a top-notch PDF experience in minutes!
Get Started