Both PSPDFKit Instant and PSPDFKit for Web (when backed by PSPDFKit Server) rely on PSPDFKit Server. PSPDFKit Server stores PDF files, annotations, and metadata, and it handles connections between clients.

PSPDFKit for Web also has a standalone deployment option that works without PSPDFKit Server.

What Languages on the Backend Are Supported? Do You Support ASP.NET/PHP/Ruby/Java/etc.?

PSPDFKit Server is backend agnostic. It uses a language-independent REST API. Your backend must be able to generate valid JSON Web Tokens (JWTs) for authentication. PSPDFKit Server is using the standardized JWT format. The benefit of this format is that it has countless implementations in all different programming languages.

How Does User Authentication Work?

Managing users and their access to certain documents is a responsibility of your application. Giving a user access to a document means that you sign a valid JWT with your private key. This signed token can then be passed to the clients, and in turn, back to PSPDFKit Server, which can verify if it is indeed authorized by your solution.

Why Do I Get a 401 Response When Accessing the Server API?

Make sure you have set the Authorization header to Token token=<secret>, where <secret> is the API authentication token you have set in your docker-compose.yml file with the API_AUTH_TOKEN environment variable.

Important: The server API should only be accessed from your backend servers and not by the clients. Giving the API authentication token to clients is a security concern. More information about how PSPDFKit Server is secured can be found on the PSPDFKit Security guide.

Will API Requests Be Queued Up When I Send a Lot of Requests Concurrently?

PSPDFKit Server handles API requests with pooling and queueing. Because every software system has limits in resources, such as memory, PSPDFKit Server has a back-pressure mechanism built in to provide a stable system. When the queue is full, the server will respond with an error to the API request: 500 overload. This mechanism ensures that the server stays reliable, and these errors have to be handled by the clients calling the API by throttling the API requests and retrying failed requests.

Does PSPDFKit Server Support HTTPS?

SSL/TLS support is not part of PSPDFKit Server. To secure connections, we recommend one of the following options.

If you’ve deployed to the cloud, we recommend using a load balancing solution provided by your cloud platform provider:

An alternative is to set up an NGINX server as a reverse proxy to PSPDFKit Server. You can configure NGINX to support SSL/TLS and then you can point this to your certificate. A guide for this can be found on the NGINX Reverse Proxy article.

Why Do I Get a 504 Response When Accessing the Server API?

This response may be sent by your proxy server. Make sure to increase the timeouts of your proxy server to ensure that responses from PSPDFKit Server get redirected to the clients.

Can I License PSPDFKit Server Separately?

PSPDFKit Server is not its own product. You can only license it as part of PSPDFKit for Web or PSPDFKit Instant.

Our Network Infrastructure Blocks Ingoing and Outgoing Requests. What URL Needs to Be Allowed to Activate PSPDFKit Server?

The server where PSPDFKit Server is installed will need to connect to https://customers.pspdfkit.com for activation. Make sure to also allow requests to subroutes of this URL, such as https://customers.pspdfkit.com/api/*. The port is the default port for HTTPS connections, 443.

How to set up an HTTP/HTTPS Proxy

To set up an HTTP/HTTPS proxy in Docker 17.07 and higher for Linux, create or edit the file ~/.docker/config.json in the home directory of the user which starts containers:

     "httpProxy": "",
     "httpsProxy": "",
     "noProxy": "*.test.example.com,.example2.com"

Please review the official Docker docs for further details and solutions for older Docker versions

Many Linux distributions use systemd to start the Docker daemon. To set up a proxy for Docker via systemd, see the following example.

How to Set Up Auto Scaling

Auto scaling is a feature offered by some hosting providers that automatically spins up additional servers if a high load is detected. Various cloud hosting platforms have different solutions to this problem.

Setting up auto scaling in your infrastructure is something that is best discussed with your DevOps team. We cannot provide an example of how to set it up, as the steps are both different for every cloud architecture and highly dependent upon your other application code.

Here is some general information that’s useful when defining auto scaling settings for PSPDFKit Server:

  • All PSPDFKit Server instances use all the available memory, CPU, and storage by default.

  • We recommend having a managed database, which every major cloud provider offers, to scale PostgreSQL to your use case.

  • You can monitor memory, CPU, and IO with your existing tools and scale them like you would your existing applications. There is nothing special that you need to consider for PSPDFKit.

What is the difference between Docker and Kubernetes

Docker is a containerization platform, and Kubernetes is a container orchestrator for container platforms like Docker.

PSPDFKit Server uses the Docker container format. Docker is the most common way to run docker containers, however there are other technologies to run Docker containers available.

Kubernetes is a container orchestrator for container platforms like Docker. It can be used for systems with higher load, where one Docker container is not enough. PSPDFKit Server supports horizontal scaling with running multiple containers of itself. The number of nodes that you can run at the same time are defined in the license agreement. Kubernetes is the most popular orchestrator, however there are alternatives such as Docker Swarm available.

I need further help with Docker and/or Kubernetes Consulting

If you need further help with Docker Configuration, the Docker company Mirantis offers a list of trusted companies in their Partner Catalog.