Deploy an Enterprise License

    You can deploy a license file in one of the following ways:

    The recommended method is using the Admin API.

    • You have received a license.json file from Kong.
    • Kong Gateway is installed.

    Deploy the license

    Admin API

    Filesystem

    Environment variable (JSON)

    Environment variable (file path)

    You can use the Kong Admin API to distribute the license in any database-backed or hybrid mode deployment. We recommend using this method in most deployments.

    In hybrid mode, apply the license to the control plane. The control plane distributes the license to its data plane nodes. This is the only method that applies the license to data planes automatically.

    The license data must contain straight quotes to be considered valid JSON (' and ", not or ).

    cURL

    HTTPie

    Result:

    For more detail and options, see the .

    You can provide a license file to Kong Gateway in any database-backed or DB-less deployment. This method is not recommended for use in hybrid mode, as you have to maintain the license on each node manually.

    The license data must contain straight quotes to be considered valid JSON (' and ", not or ).

    1. Securely copy the license.json file to your home directory on the filesystem where you have installed Kong Gateway.

      1. $ scp license.json <system_username>@<server>:~
    2. Then, copy the license file again, this time to the /etc/kong directory:

    You can use the KONG_LICENSE_DATA environment variable to apply a license to Kong Gateway in any database-backed or DB-less deployment. This method is not recommended for use in hybrid mode, as you have to maintain the license on each node manually.

    The license data must contain straight quotes to be considered valid JSON (' and , not or ).

    1. Export the license key to a variable by running the following command, substituting your own license key.

      1. $ export KONG_LICENSE_DATA='{"license":{"signature":"LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tClZlcnNpb246IEdudVBHIHYyCgpvd0did012TXdDSFdzMTVuUWw3dHhLK01wOTJTR0tLWVc3UU16WTBTVTVNc2toSVREWk1OTFEzVExJek1MY3dTCjA0ek1UVk1OREEwc2pRM04wOHpNalZKVHpOTE1EWk9TVTFLTXpRMVRVNHpTRXMzTjA0d056VXdUTytKWUdNUTQKR05oWW1VQ21NWEJ4Q3NDc3lMQmorTVBmOFhyWmZkNkNqVnJidmkyLzZ6THhzcitBclZtcFZWdnN1K1NiKzFhbgozcjNCeUxCZzdZOVdFL2FYQXJ0NG5lcmVpa2tZS1ozMlNlbGQvMm5iYkRzcmdlWFQzek1BQUE9PQo9b1VnSgotLS0tLUVORCBQR1AgTUVTU0FHRS0tLS0tCg=","payload":{"customer":"Test Company Inc","license_creation_date":"2017-11-08","product_subscription":"Kong Enterprise","admin_seats":"5","support_plan":"None","license_expiration_date":"2017-11-10","license_key":"00141000017ODj3AAG_a1V41000004wT0OEAU"},"version":1}}'

    You can use the KONG_LICENSE_PATH environment variable to apply a license to Kong Gateway in any database-backed or DB-less deployment. This method is not recommended for use in hybrid mode, as you have to maintain the license on each node manually.

    Include the license as part of the docker run command when starting a Kong Gateway container. Mount the path to the file on your local filesystem to a directory in the Docker container, making the file visible from the container:

    1. docker run -d --name kong-gateway \
    2. --network=kong-net \
    3. ...
    4. -v "$(pwd)/kong-license/:/kong-license/" \