Run your own PDF Blocks server with Docker

Process your sensitive documents in your own PDF Blocks server, either in your infrastructure or in your cloud servers in AWS, Azure, Heroku, etc.

This guide expects that you know how to use Docker.
You can also run your own PDF Blocks server in Heroku with no Docker skills required.

Docker Image

We publish the PDF Blocks server as a Docker image:

Images are tagged with the API version. Use the default latest tag to get the latest version.

Basic usage

To run PDF Blocks server as a Docker container:

docker pull pdfblocks/server
docker run -p 80:80 -e LICENSE_KEY=evaluation pdfblocks/server  

API Key

To protect access to your private PDF Blocks server, you can set up an API key.

To set your API key, first calculate the SHA-256 hash of your chosen API key. For example, for the password pa55w0rd the calculated SHA-256 hash is:

56965e2a1a995c74da500088947af11dfa27951cc350d0b97d0633075969c31b

In the docker run command set the environment variable API_KEY_HASH to the hash:

docker pull pdfblocks/server
docker run \
-p 80:80 \
-e LICENSE_KEY=evaluation \
-e API_KEY_HASH=56965e2a1a995c74da500088947af11dfa27951cc350d0b97d0633075969c31b \
pdfblocks/server  

License Key

To run PDF Blocks server you need to set a license key in the LICENSE_KEY environment variable.

To try PDF Blocks, use the LICENSE_KEY=evaluation. You can try it for free for any time you want. A small mark is placed in the bottom of each processed page during the evaluation.

When you are ready, buy a license. You will get a license key like this:

acme-inc[eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJeyJzdWIoiOiJhY21lLWluYyIsIm5hbWUiOiJBQ01FLCBJbmMiLCJhY2MiOiIxNTAwIiianRpIjoiMzk5MTk0MTgxIiwiZXhwIjoxNjI0MzEyMDYwLCJpc3MiOiJwZGZibG9ja3MiLCJhdWQiOiJwZGZibG9ja3Mvc2VydmVyIn054oW5HEa 5wOui9NQcARLyD75Yah6kqkPMrp9EiOF0eeLuutj8Kc12cDLiXU00BuKg4EkNHHm9TVFtdvv6Md7IA]

(We added line breaks for clarity, but don’t split your license key in multiple lines)

In the docker run command set the environment variable LICENSE_KEY to the full license key. For example:

docker pull pdfblocks/server
docker run \
-p 80:80 \
-e LICENSE_KEY=acme-inc[eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhY21lLWluYyIsIm5hbWUiOiJBQ01FLCBJbmMiLCJhY2MiOiIxNTAwIiwianRpIjoiMzk5MTk0MTgxIiwiZXhwIjoxNjI0MzEyMDYwLCJpc3MiOiJwZGZibG9ja3MiLCJhdWQiOiJwZGZibG9ja3Mvc2VydmVyIn0.54oW5HEa5wOui9NQcARLyD75Yah6kqkPMrp-EiOF0eeLuutj8Kc12cDLiXU00BuKg4EkNHHm_TVFtdvv6Md7IA] \
pdfblocks/server