Skip to main content
Swagger
All documentation pages

License file

Swagger Contract Testing On-Premises requires a license file to run. Your Account Manager sends you the license file during onboarding. If you don’t have one, contact your Account Manager.

Choose the license format for your image

Starting with version 2.7.0, each release is published as two images:

  • A standard image, tagged with the version number, for example quay.io/pactflow/enterprise:2.7.0.

  • A -lic2 image, tagged with the version number and the -lic2 suffix, for example quay.io/pactflow/enterprise:2.7.0-lic2. It uses a new license format, can read the license from an environment variable, and reports license problems at startup with a specific exit code.

Standard images will be deprecated on April 30, 2027. After that date, no new standard images will be published, so updates and fixes will be available only as -lic2 images. Move to a -lic2 image before then. If you don’t have a license file in the new format, contact your Account Manager. See Moving to the new license format.

Each image needs a license file in its own format. The two formats aren’t interchangeable.

Standard image -lic2 image
License file Original format New format
Default location /home/pactflow-onprem.lic /home/pactflow/pactflow.lic
Custom location RG_LIC_PATH (a directory) PACTFLOW_LICENSE (a file path)
License as an environment variable Not supported PACTFLOW_LICENSE (base64-encoded license contents)

To switch from a standard image to a -lic2 image, see Moving to the new license format.

Provide the license: standard images

Mount the license file into the container at /home/pactflow-onprem.lic. Mount it as a file, not as a directory. Refer to the Docker documentation on volumes.

For example, if the license file is stored at /opt/pactflow/pactflow-onprem.lic on your server, use the Docker CLI --volume parameter:

docker run \
  --volume /opt/pactflow/pactflow-onprem.lic:/home/pactflow-onprem.lic \
  quay.io/pactflow/enterprise:2.7.0

To use a different directory in the container, set the RG_LIC_PATH environment variable to that directory. For example, to read the license from /opt/pactflow/pactflow-onprem.lic, set RG_LIC_PATH=/opt/pactflow/.

You can also build your own image with the license file included:

ARG ONPREM_IMAGE
FROM ${ONPREM_IMAGE}

COPY --chown=app:app pactflow-onprem.lic $APP_HOME/../pactflow-onprem.lic

Provide the license: -lic2 images

Provide the license in one of these ways:

  • Mount the license file at /home/pactflow/pactflow.lic, the application’s working directory. This is the default location.

  • Mount the license file at a different path, and set the PACTFLOW_LICENSE environment variable to that path.

  • Set the PACTFLOW_LICENSE environment variable to the base64-encoded contents of the license file.

Mount the license file

Mount the license file into the container as a file, not as a directory.

For example, if the license file is stored at /opt/pactflow/pactflow.lic on your server:

docker run \
  --volume /opt/pactflow/pactflow.lic:/home/pactflow/pactflow.lic \
  quay.io/pactflow/enterprise:2.7.0-lic2

In Docker Compose:

services:
  pactflow:
    image: quay.io/pactflow/enterprise:2.7.0-lic2
    volumes:
      - ./pactflow.lic:/home/pactflow/pactflow.lic

Use a custom location

To mount the license file somewhere else in the container, set PACTFLOW_LICENSE to its path. For example, to read the license from /etc/pactflow/license/pactflow.lic:

services:
  pactflow:
    image: quay.io/pactflow/enterprise:2.7.0-lic2
    environment:
      - PACTFLOW_LICENSE=/etc/pactflow/license/pactflow.lic
    volumes:
      - ./pactflow.lic:/etc/pactflow/license/pactflow.lic

If your platform mounts secrets as directories, such as a Kubernetes Secret volume, mount the directory at a custom location and point PACTFLOW_LICENSE at the file inside it. Don’t mount a directory over /home/pactflow, because it replaces the application files.

Pass the license as an environment variable

If your platform can’t mount files into the container, pass the license contents in PACTFLOW_LICENSE instead:

  1. Encode the license file as base64:

    base64 < pactflow.lic
  2. Store the output in your platform’s secret store, and expose it to the container as the PACTFLOW_LICENSE environment variable.

For example, with Docker Compose and a shell variable:

export PACTFLOW_LICENSE="$(base64 < pactflow.lic)"
services:
  pactflow:
    image: quay.io/pactflow/enterprise:2.7.0-lic2
    environment:
      - PACTFLOW_LICENSE

Line breaks and spaces in the encoded value are ignored, so you can use the output of base64 as is.

Build an image with the license file

ARG ONPREM_IMAGE
FROM ${ONPREM_IMAGE}

COPY pactflow.lic /home/pactflow/pactflow.lic

Build the image with the following command:

docker build . --build-arg ONPREM_IMAGE=quay.io/pactflow/enterprise:2.7.0-lic2

Confirm that the license loaded

When a -lic2 container starts, it writes the license details to the startup log. Check that the details match your subscription:

  Licensed to    : Example Corp
  Customer ID    : 0015g00000AbCdEfGH
  License date   : 2026-12-01
  Expire date    : 2027-11-30
  User limit     : 250

If the license is missing, unreadable, invalid, or expired, the container stops during startup and logs the reason with an exit code. See Troubleshooting.

Renew or replace the license

Replace the license before it expires:

  1. Replace the license file, or update the PACTFLOW_LICENSE environment variable, in the same place as the current license.

  2. Restart the container.

License enforcement

The license contains your subscription limits, such as the number of users and the expiry date. Contract Testing On-Premises enforces these limits while it runs.

When the license expires, the health check endpoint continues to work.

FAQ

What happens when I reach my license user limit?

New users can’t log in, and they see a message that the user limit has been reached.

To resolve this:

  1. Disable users that no longer need access to Contract Testing On-Premises.

  2. Upgrade your subscription to allow more users.

What happens when my license expires?

A SmartBear representative contacts you well before your license expires to arrange a new license.

Contract Testing On-Premises shows notices on the login page and in the footer when the license expires in 30 days or less.

When the license expires and you haven’t replaced it, you lose access to Contract Testing On-Premises and the system stops working, except for the health check endpoint. A -lic2 container that restarts with an expired license doesn’t start.

Do I need a new license file when I upgrade?

Not if you stay on the same kind of image. A license file works with every version of its image type: original-format licenses with standard images, and new-format licenses with -lic2 images. You need a new license file only when you switch from a standard image to a -lic2 image. Your Account Manager can send you one.

Standard images will be deprecated on April 30, 2027, and no new standard images will be published after that date. To keep receiving updates, switch to a -lic2 image before then.

Was this page helpful?