Some test text!

Discord Logo

Chat with us

PDFTron is now Apryse, learn more here.

Web / Guides / DockerHub image


PDFTron is now Apryse, learn more here.

Deploy WebViewer using Docker Image

The Apryse Docker image is provided hosted through Dockerhub. This will guide will show you how to use this image without our docker-compose.yml file.

Prior to using this guide, your device should have Docker installed.

Running from DockerHub

Apryse offers the WebViewer Server container image and the load balancer built for WebViewer Server on DockerHub. You may run these images using our docker-compose package or with the following Docker commands prompt/terminal interface to get started with WebViewer.

Running the containers without Docker Compose

Using WebViewer Server without the compose package will require pulling images individually.

This command will pull and run the WebViewer Server image. Ensure you are using Linux Containers before running this command.

docker run -p 8090:8090 -e INCLUDE_DEMO='true' -d pdftron/webviewer-server:latest

Configuring the built containers

The settings for the containers are controlled by environment variables. These can be specified by -e [VARIABLE]=[VALUE] when calling docker run or set inside of the docker-compose.yml available directly from our website.

A detailed list of these configuration variables for webviewer-server can be found in our configuration guide .

The following are the variables available for wv-loadbalancer.

  • INITIAL_NODE_A ... INITIAL_NODE_P: Sets a node for HAProxy to load balance to, the variables can be named between the letters A and P for a max of 16 servers. The names passed to these node variables should equal the container names of any webviewer-servers that were started. If we have 2 containers named wv-serverA & wv-serverB then the load balancer should be run with these arguments:

    -e INITIAL_NODE_A=wv-serverA -e INITIAL_NODE_B=wv-serverB

  • ENABLE_TCP_MANAGEMENT: 'true' or 'false'. If set to true, enables the TCP management socket at port 4893. This socket allows full control of the load balancer through TCP. If enabled, the port 4893 must not be enabled past your internal network to ensure security. Read more about HAProxy dynamic management here.

  • DISABLE_SSL: 'true' or 'false'. If set to true, disables HTTPs socket binding on the balancer. Useful in situations where the load balancer does not need to control SSL connections.

  • URL_PREFIX: 'true' or 'false'. Sets a URL prefix for accessing the server.

Using the images on cloud services

Most cloud services which support containers will able to pull these images into their infrastructure to make deploying easy. This is often done by passing the registry name pdftron/webviewer-server:latest to the configuration of the infrastructure. We recommend those using the server to use a versioned copy of the image, such as pdftron/webviewer-server:1.5.7 to prevent any breaking changes to their infrastructure.

Running WebViewer Server with a Load Balancer without Docker Compose

We also provide a load balancer which can attach to multiple Webviewer Servers on DockerHub. This load balancer will allow you to run multiple WebViewer Servers from one access point. Multiple WebViewer Servers can be attached to one load balancer by appending additional nodes to it through the INITIAL NODE argument and starting each WebViewer Server to match these INITIAL NODE names. Below is an example of how to do so.

docker network create wv-network
docker run --net wv-network -d -e INCLUDE_DEMO='true' --name webviewer-serverA pdftron/webviewer-server:latest
docker run --net wv-network -d -e INCLUDE_DEMO='true' --name webviewer-serverB pdftron/webviewer-server:latest 
docker run --net wv-network -p 8090:8050 -d -e INITIAL_NODE_A=webviewer-serverA -e INITIAL_NODE_B=webviewer-serverB pdftron/wv-loadbalancer:latest

Get the answers you need: Support