> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/webviewer-server/deployment/wv-server-dockerhub-deployment.md).

# Deploy WebViewer JavaScript PDF Viewer Using Docker Image

Deploy WebViewer using Docker Image effortlessly with Apryse's Docker image hosted on DockerHub. Follow this guide to run WebViewer Server and load balancer containers using Docker commands or docker-

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](https://docs.docker.com/engine/installation/).

### Running from DockerHub

Apryse offers the [WebViewer Server](https://hub.docker.com/r/pdftron/webviewer-server/) container image and the [load balancer built for WebViewer Server](https://hub.docker.com/r/pdftron/wv-loadbalancer/) on DockerHub. You may run these images using our [docker-compose](/web/webviewer-server/wv-server-deployment.md) 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.

{% tabs %}
{% tab title="Bash" %}
{% code lineNumbers="true" %}

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

{% endcode %}
{% endtab %}
{% endtabs %}

### 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](https://hub.docker.com/r/pdftron/webviewer-server/) can be found in our [configuration guide](/web/webviewer-server/wv-server-config.md).

The following are the variables available for [wv-loadbalancer](https://hub.docker.com/r/pdftron/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](https://www.haproxy.com/blog/dynamic-configuration-haproxy-runtime-api/).
* `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.

### WebViewer Server Docker Tarball Download

#### What is This?

An alternative way to obtain WebViewer Server Docker images for customers who **cannot access DockerHub** due to security policies, air-gapped environments, or network restrictions.

#### Available Images

* **webviewer-server-{VERSION}.tar** - Main WebViewer Server application

#### How to Use

* **Download** (replace `{VERSION}` with your version, e.g., `3.2.2`):

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
wget https://apryse-downloads.s3.amazonaws.com/downloads/server/webviewer-server-{VERSION}.tar
```

{% endcode %}
{% endtab %}
{% endtabs %}

* **Load into Docker:**

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
docker load -i webviewer-server-{VERSION}.tar
```

{% endcode %}
{% endtab %}
{% endtabs %}

* **Run:**

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
docker run -p 8090:8090 -e INCLUDE_DEMO='true' -d pdftron/webviewer-server:{VERSION}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### 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.

{% tabs %}
{% tab title="Bash" %}
{% code lineNumbers="true" %}

```bash
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
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/web/webviewer-server/deployment/wv-server-dockerhub-deployment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
