Skip to main content

Set up the Licensing Gateway Service

The Licensing Gateway Service is an intermediary between your local installations of Pdftools products and the Pdftools Licensing Server. The Licensing Gateway Service allows you to work with valid product licenses without a continuous network connection.

The Licensing Gateway Service can borrow licenses from products installed in your network and check them with the Pdftools Licensing Server. As a result, the machines with Pdftools products don't need an internet connection to validate their license. Only the machine where you install the Licensing Gateway Service needs to be connected to the internet to facilitate the license check. Products installed on machines that lend the licenses to the Licensing Gateway Service don't need an internet connection.

Suppose the Licensing Gateway Service can connect to the internet and synchronize with the Pdftools Licensing Server. In that case, licenses are validated and the expiration date for the borrowed licenses is extended by an additional time. If the Licensing Gateway Service cannot connect to the Pdftools Licensing Server for more than seven days, the license is deactivated, and the machine associated with the borrowed license times out.


Licenses are linked to the machines where products are installed, even if the machine times out. If you install the Licensing Gateway Service on another machine, you can borrow the license again only after returning it to the machine where you first used it. See section Returning a license.


In exceptional cases where the machine becomes inaccessible, you may borrow a license on another machine without returning it first. However, the license key is blocked if you attempt to perform this operation more than twice.

You cannot use or return the blocked license on any other machine. You must contact Pdftools Support to reset the license key.

Installing the Licensing Gateway Service

To start using the Licensing Gateway Service, download and install the package on a machine in your network that is connected to the internet.

  1. Download the LicensingGatewayService.msi package.
  2. Run the installer. The installer copies the required binary files, sets up the port and environment variables, and creates and runs a Windows service that acts as an agent to regularly synchronize the Licensing Gateway Service with the Pdftools Licensing Server.

Configuring the Licensing Gateway Service

To configure the Licensing Gateway Service:

  1. Locate the Licensing Gateway Service configuration file appsettings.json:

    File path

    For Windows, the file is in the instalation folder, for example:

    C:\Program Files\Pdftools\Licensing Gateway Service\appsettings.json

    For Linux systems the file is in the $SNAP_DATA directory, for example:


    Example configuration file:

    "LicensingServicePortNumber": 9999,
    "LogFilePath": "C:/logs/pdftls/log.txt",
    "LogRetentionDays": 7
  2. You can configure these options:

    • Licensing Service Port number: Set the port number used by the service. The default value is 9999.
    • Log file path: Specify the desired path of the log files.
    • Log retention: Define the number of days the log files are kept.
  3. Restart the service after modifying the appsettings.json file for the changes to take effect.

  4. To ensure that the Licensing Gateway Service can always connect to the Pdftools Licensing Server, add the service to the allowlist of any configured firewall.

Using the CLI utility

The Licensing Gateway Service includes a command-line interface utility that is designed to make it easier to manage and borrow licenses associated with your Pdftools products.

To access a full list of available commands, use the licgwy help command.

licgwy helpGet instructions on how to use the CLI
licgwy versionGet the licensing gateway service version number
licgwy add <license-key>Add a new license key
licgwy remove <license-key>Remove a license key
licgwy remove-allRemove all license keys
licgwy statusCheck the licensing service status (for example: connected, disconnected)
licgwy listGet information about added licenses and for how long your license is valid. For example: endDate, total, remainingConsumption, remainingBorrowTime.
licgwy syncConnect to Pdftools Licensing Server on demand (refreshes the time on all borrowed licenses)

Borrowing a license

Borrowing means adding licenses to the Licensing Gateway Service to automatically validate them for the machines in your local network. To borrow a license, use the following command and include the license key:

licgwy add <license-key>

When you run this command, a connection is opened between the Licensing Gateway Service and the Pdftools Licensing Server to validate the license key for a period of time. The Licensing Gateway Service let's you use multiple license keys at the same time.


Use a license key only on one machine or one proxy service.
If you want to reuse a license key installed on another machine, you must first return it before adding it to the new machine.

Checking licenses and the service status

To view all licenses added to the system, use the following command:

licgwy list

The command output displays a list of all added licenses on the machine, including when the license was last synchronized and its status, when the license must be either reactivated by synchronizing or returned.

To view the connection status between the Licensing Gateway Service and the Pdftools Licensing Service, use the following command:

licgwy status

Synchronizing licenses

To establish an active connection between the Licensing Gateway Service and the Pdftools Licensing Server manually, use the command:

licgwy sync

This command contacts the Pdftools Licensing Server and synchronizes usage using the cached data stored by the Licensing Gateway Service.

Returning a license

To return a borrowed license, use the remove command. You must perform the step to return the license to the Pdftools Licensing Server before it can be added to another machine.

licgwy remove <license-key>

A license remains borrowed by a specific machine until it is returned, even if it becomes deactivated.

Return the license before another machine can borrow it.

To return all licenses added to the Licensing Gateway Service, use the command:

licgwy remove-all