> Markdown version of [Licenses](https://vaadin.com/docs/v23/configuration/licenses). Section index: [llms.txt](https://vaadin.com/docs/v23/configuration/llms.txt)

# License Validation and Troubleshooting

Vaadin core includes an extensive set of technologies and components that are free to use. Vaadin core is available under the terms of the Apache License 2.0, which allows you to use the included technologies and components in any project, even commercially. Vaadin 23.5.0 and later versions in the 23.x series are in an extended commercial maintenance phase.

You need a commercial license only if you use one of the commercial components (such as, Vaadin Charts), tools (such as, Vaadin TestBench), or an extended commercial maintenance version. If your project includes such components, tools, or versions, a commercial license is needed for development and to build the production application.

In general, you don’t need a license after deploying an application to production. The only exception is Collaboration Kit, which requires a license for production use, and it’s priced per end user. See [Collaboration Kit documentation](https://vaadin.com/docs/v23/tools/collaboration/developing-with-ce.md) for details.

## <a id="online-license-key"></a>License Validation on a Local Machine

On a local machine, the licenses for commercial components and tools are checked automatically using your Vaadin account. The first time you use a commercial component or tool, you are asked to log in to vaadin.com to validate your license.

Once validated, you can continue developing your project. Under the hood, a license key is created on your machine in the following location:

**Windows**

```filesystem
%userprofile%\.vaadin\proKey
```

**macOS/Linux**

```filesystem
~/.vaadin/proKey
```

### <a id="offline-license-key"></a>Offline License Key

If your local development environment is offline and can’t reach vaadin.com, you need to download an offline license key.

<!-- vale Vaadin.Versions = NO -->

Each offline license key is tied to a **machine ID**, in the form of `mid-xxxxxxxx-xxxxxxxx` (legacy) or `mid2-xxxxxxxx-xxxxxxxx` (the `V2` key) (new in V23.6.12), that you submit to [vaadin.com/myaccount/licenses](https://vaadin.com/myaccount/licenses) to download an offline license key.

Once you have downloaded the `offlineKey` or `offlineKeyV2` file (remove any `.txt` suffix), you should place it in your *home* directory:

**Windows**

```filesystem
%userprofile%\.vaadin\offlineKey
%userprofile%\.vaadin\offlineKeyV2
```

**macOS/Linux**

```filesystem
~/.vaadin/offlineKey
~/.vaadin/offlineKeyV2
```

> **Note:** Vaadin 23.6.12 adds support for the `mid2`/`offlineKeyV2` key format. (new in V23.6.12) Earlier 23.x versions support only the legacy `mid`/`offlineKey` format. Versions that support the `V2` key still also accept the legacy key.

#### <a id="machine-id"></a>Machine ID

You can find your machine ID in the logs when you try to use a commercial component or tool offline without an existing license key. On Vaadin 23.6.12 and later, the logs show a `mid2` machine ID; the command below prints the legacy `mid`.

You can also get your machine ID by running the following commands on your machine:

**Windows**

```terminal
mvn dependency:get -Dartifact=com.vaadin:license-checker-machineid:1.8.1
java -jar %userprofile%\.m2\repository\com\vaadin\license-checker-machineid\1.8.1\license-checker-machineid-1.8.1.jar
```

**macOS/Linux**

```terminal
mvn dependency:get -Dartifact=com.vaadin:license-checker-machineid:1.8.1 && java -jar ~/.m2/repository/com/vaadin/license-checker-machineid/1.8.1/license-checker-machineid-1.8.1.jar
```

<!-- vale Vaadin.Versions = YES -->

## <a id="server-license-key"></a>License Validation on a CI/CD or Build Server

For CI/CD/build servers, you need to download a **server license key**. Server license keys can only be used for production builds. You can download a server license key (an `offlineKey` file) from [vaadin.com/myaccount/licenses](https://vaadin.com/myaccount/licenses).

You should place the `offlineKey` file in the *home* directory of the CI server:

**Windows**

```filesystem
%userprofile%\.vaadin\offlineKey
```

**macOS/Linux**

```filesystem
~/.vaadin/offlineKey
```

You can also give the license key using the `vaadin.offlineKey` system property or the `VAADIN_OFFLINE_KEY` environment variable. Copy the license key string value from the `offlineKey` file.

**System property**

```terminal
mvn -Dvaadin.offlineKey=[contents of offlineKey file here] ...
```

**Environment variable**

```terminal
VAADIN_OFFLINE_KEY=[contents of offlineKey file here] mvn ...
```

## <a id="validation-on-production-server"></a>Validation on Production Server

Applications built using the newer Vaadin Extended Maintenance releases will also check the license key when the application starts in production mode. If the license key is not found, or if the check fails due to an expired key, or if the key does not include Extended Maintenance access, an error will be logged. This is not a blocking license check, so the application will still start. When you provide a valid license key by using the `vaadin.offlineKey` system property or the `VAADIN_OFFLINE_KEY` environment variable, the error will not be logged.

Vaadin Enterprise Edition releases check the license key when the application starts in production mode. This runtime check accepts a server license key, and a [distribution key](#distribution-license-key) embedded in the application. A key that allows only development is rejected.

### <a id="distribution-license-key"></a>Distribution Key

If you ship an application built with Vaadin to your own customers, who run it on their own servers, you can embed a distribution key in the application. The application then passes runtime license checks without your customers having to install a license key.

Distribution keys aren’t available for download from your Vaadin account. Vaadin issues them on request, for subscriptions that cover shipping applications to your own customers. To request a key, contact your Vaadin account manager or customer success manager, or [contact Vaadin](https://vaadin.com/contact) if you don’t have one. If you run the application only on your own servers, you don’t need a distribution key; use a [server license key](#server-license-key) instead.

A distribution key works differently from the other license keys:

- It’s only valid for running an application. Development and production builds ignore it, and behave as if no key were present, so you still need a license key of your own to build the application.

- It’s only read from inside the application. A distribution key placed in the `.vaadin` directory, or given in the `vaadin.offlineKey` system property or the `VAADIN_OFFLINE_KEY` environment variable, is ignored. This way, a key in your test environment can’t hide that the key is missing from the application you ship.

- It isn’t tied to a machine ID, so the application runs on any server.

- It’s validated offline only. The application never contacts `vaadin.com` to validate it, so it runs on servers without internet access.

To embed the key, add the key file to the application as a resource at `META-INF/vaadin-distribution-key`. This is a file, not a directory, and the name is case-sensitive. In a Maven or Gradle project, place the file here:

```filesystem
src/main/resources/META-INF/vaadin-distribution-key
```

When the application starts and validates the key, it logs which license it’s using:

```text
Using distribution license registered to Example Corp.
```

The message names only the account that the key is registered to, because your customers can read the application logs. For the same reason, the application doesn’t log renewal reminders for a distribution key. To replace a key that’s about to expire, embed a new key and ship a new version of the application.

> **Tip:** A server license key also passes runtime checks, and is used before the distribution key. To verify that the distribution key is included in the application you ship, run the application on a machine that has no other license key, and check the log message above.

## <a id="troubleshooting"></a>Troubleshooting

<!-- vale Vaadin.FirstPerson = NO -->

### <a id="i-get-a-trial-message-although-i-have-a-valid-license"></a>I Get A Trial Message Although I Have A Valid License

Verify that you have a valid license by going to [vaadin.com/pro/validate-license](https://vaadin.com/pro/validate-license). If not, either your company’s license administrator hasn’t yet assigned a seat for you, or the license is no longer valid.

### <a id="sslhandshakeexception-with-multiplatform-runtime"></a>SSLHandshakeException with Multiplatform Runtime

This is a known error in `SSLHandshakeException` reported by users of WebSphere Liberty and WildFly in Docker. See the following discussion for more details: [vaadin.com/forum/t/running-mpr-project-on-websphere-liberty-fails-with-suncertpathbuilderexcep/160675](https://vaadin.com/forum/t/running-mpr-project-on-websphere-liberty-fails-with-suncertpathbuilderexcep/160675).

### <a id="i-see-detected-an-offline-license-version-1-but-version-2-is-required"></a>I See "Detected an Offline License Version 1, but Version 2 is Required"

<!-- vale Vaadin.Versions = NO -->

In Vaadin 23.6.12 and later, this message can appear even when you have a valid version 1 offline key (`mid-xxxxxxxx-xxxxxxxx`) installed. (new in V23.6.12) It’s shown when the License Checker can’t compute this machine’s version 1 machine ID.

The `mid` machine ID is derived from hardware details through the OSHI library and its native JNA component. If the JNA native library (for example, `jna.dll` on Windows) is blocked — commonly by antivirus or endpoint-security software — or otherwise fails to load, the version 1 machine ID can’t be generated, and this message is shown instead of the real error.

Re-run the build with debug logging (`mvn -X` or `./gradlew --debug`) and look for a `Failed to generate v1 Machine ID` entry to confirm the cause. Then either resolve the JNA or native-library problem, or switch to a version 2 offline key (`mid2-xxxxxxxx-xxxxxxxx`), which doesn’t rely on OSHI or JNA — download it from [vaadin.com/myaccount/licenses](https://vaadin.com/myaccount/licenses).

<!-- vale Vaadin.Versions = YES -->

### <a id="distribution-key-ignored"></a>I See "Ignoring the Distribution Key Found in …​"

This message means that a distribution key was placed in the `.vaadin` directory, or given in the `vaadin.offlineKey` system property or the `VAADIN_OFFLINE_KEY` environment variable. A distribution key is only used when it’s embedded in the application, at `META-INF/vaadin-distribution-key`. Move the key there, and use a server license key for builds.

See [Distribution Key](#distribution-license-key) for details.

### <a id="where-can-i-get-help-with-license-related-issues"></a>Where Can I Get Help with License Related Issues?

You can contact <license@vaadin.com> for further help.

`D56655EB-4310-49FF-8A81-E790235E1420`
