guides/best-practices---
title: License keys
---

:::note Availability

**Plan**: [Enterprise](https://www.getunleash.io/pricing) self-hosted | **Version**: `5.8+`

:::

Self-hosted Unleash Enterprise uses license keys to ensure you comply with the terms of your contract.

## License policy

License keys check compliance with the following aspects of the customer agreement:
-   **Seat count**: the number of licensed users
-   **Contract duration**: whether the license is within the contract expiration date

The seat count and contract duration parameters are encoded into the license key. Therefore, if you change your seat count or renew your contract, you must install a new license.

Each Unleash instance requires a separate license key. For example, a development or production instance must have separate keys.

:::warning
Reusing Unleash license keys across multiple installations is prohibited under the terms of your license.
:::

### License enforcement

:::note Availability

**Plan**: [Enterprise](https://www.getunleash.io/pricing) self-hosted | **Version**: `6.7+`

:::

#### Mandatory license

If you don't have a valid license, your Unleash instance enters read-only mode, and the only available action is to install a valid license.

#### License expiration
When your license expires, your Unleash instance enters read-only mode. The only available action is to install a new, valid license. Connected applications continue to operate and receive current feature flags, but users cannot make any changes to Unleash.


#### Seat count
If you reach the maximum number of seats included in your license, you cannot add new users until existing users are removed to stay within your limit.


The Unleash Admin UI displays a banner if you do not comply with your license. In addition, you receive a warning in advance if less than 10% of your available seats remain, your license is 30 days or less from expiration, or if you are running on a trial license.

## Get a new license

If you are a new customer, your account representative will provide the required license key as part of your self-hosted instance onboarding.

If you are an existing customer and are making changes to your agreement (changing seat count or the contract expiration), contact your account representative to obtain the required license key.

Alternatively, you can reach out to sales@getunleash.io.

## Check your current license

To check your current license in the Unleash Admin UI, go to **Admin settings > Instance config > License**. If you have an active license, you'll see the following information:
    - Customer name
    - Plan
    - Seat count
    - License expiration date

## Update your license

### Using the Admin UI

In the Unleash Admin UI, do the following:
1. Go to **Admin settings > Instance config > License**.
2. Paste the new license key and click **Update license key**.

After updating a license key, you may need to refresh your browser for the license warning banners to be removed.

### Using an environment variable

You can also install or update your license key on container deployment, using the environment variable `UNLEASH_LICENSE`. If you attempt to update your license with an invalid or older one, your existing license will remain in effect.

For security reasons, if using [Helm charts](https://github.com/Unleash/helm-charts) or Docker Compose to deploy Unleash, set up the license key as a secret and reference it in the Helm configuration [values.yaml](https://github.com/Unleash/helm-charts/blob/main/charts/unleash/values.yaml) files or in [docker-compose.yml](https://github.com/Unleash/unleash/blob/main/docker-compose.yml).

:::info
The default image references in the Helm chart point to open-source Unleash resources. To use Unleash Enterprise, you must manually update the image references to point to the appropriate _unleash-enterprise_ images.
:::
