# License activation in Docker

You can activate a WProofreader license in two ways:

* during image build (recommended)
* on container startup (trial-friendly)

### Option 1 (recommended): Activate during image build

Pass the license ticket as a build argument:

* `--build-arg WPR_LICENSE_TICKET_ID=<license_ticket_id>`

This persists the activated license into the image. Every container started from that image will have a valid license.

{% hint style="info" %}
Build-time activation still requires Internet access. It is only needed during `docker build`, not when you run containers from the built image.

See [Internet connectivity requirements](/deployment/installation-requirements/internet-connectivity-requirements.md) for the licensing endpoint.
{% endhint %}

{% hint style="success" %}
This is the recommended approach for production. It avoids repeating activation for each container.
{% endhint %}

Where to use it:

* [Build using Dockerfile](/deployment/installation/docker/build-using-dockerfile.md)
* [Build using prebuilt configuration](/deployment/installation/docker/build-using-prebuilt-configuration.md)

### Option 2: Activate on container startup

Pass the license ticket as an environment variable:

* `--env WPR_LICENSE_TICKET_ID=<license_ticket_id>`

Example:

```bash
docker run -d \
  -p 80:8080 \
  --env WPR_LICENSE_TICKET_ID=<license_ticket_id> \
  local/wsc_app:6.9.0
```

{% hint style="warning" %}
This activation requires Internet access. It is not recommended for production. Use it for trials, especially when you run the public Docker Hub image.
{% endhint %}

{% hint style="info" %}
During activation, the server must be able to reach the licensing endpoint. See [Internet connectivity requirements](/deployment/installation-requirements/internet-connectivity-requirements.md) for the exact URL and network requirements.
{% endhint %}

### Verify license status

Use one of these methods:

* API-based health and remaining time:
  * [Health check](/api-reference/auxiliary-api-commands/health-check.md)
* Log-based validation:
  * [License verification](/deployment/licensing/license-verification.md)

### Common pitfalls

* Trial activation on startup needs outbound connectivity. It can fail on locked-down hosts.
* If you run multiple containers, build-time activation is simpler. You avoid activating per container.

### Related pages

* [Run the image from Docker Hub](/deployment/installation/docker/run-the-image-from-docker-hub.md)
* [Internet connectivity requirements](/deployment/installation-requirements/internet-connectivity-requirements.md)


---

# Agent Instructions: 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:

```
GET https://docs.wproofreader.com/deployment/licensing/license-activation-in-docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
