A License entity allows you to configure a license in your self-managed Kong Gateway cluster, in both traditional and hybrid mode deployments.
You receive a license file when you sign up for a Kong Gateway Enterprise subscription. If you purchased a subscription but haven’t received a license file, contact your sales representative.
In hybrid and traditional modes, Kong Gateway checks for a license in the following order and loads the license at startup:
- The contents of the environmental variable
KONG_LICENSE_DATA. - The default location
/etc/kong/license.json. - The contents of the file defined by the
KONG_LICENSE_PATHenvironment variable. - A license directly deployed with the
/licensesAdmin API endpoint.
Each node independently checks for the license file when the Kong Gateway process starts. Network connectivity isn’t required for license validation.
In DB-less deployments (for example, when applying declarative configuration via POST /config), a license in the declarative configuration overrides KONG_LICENSE_DATA, because the environment variable is only read at startup. When a KongLicense resource exists, Kong Ingress Controller sends it in the configuration payload and it takes precedence.