# Devices with no internet

Some devices never connect to the internet. This guide shows how to issue a license file for such a device in the dashboard and give it to the customer. At the end, your application imports the file and checks the license on the device without a network.

## Before you start

- Your application verifies license files. It follows the steps [Embed the public key](../offline-validation/#embed-the-public-key), [Verify the file](../offline-validation/#verify-the-file), [Check the contents](../offline-validation/#check-the-contents) and [Check the license](../offline-validation/#check-the-license) of the Offline validation guide.
- The policy of the license allows offline validation. See [Policy settings](#policy-settings).
- The customer has the license key. Your application needs the key to check the file, and to decrypt an encrypted file.

## Policy settings

A device with no internet never calls the License API. The policy must not depend on these calls.

| Setting | Value | Reason |
| --- | --- | --- |
| Allow offline validation | On | Without this setting, Seatify issues no license file. |
| Require heartbeats | Off | A binding from the dashboard gets a lease, like a claim. The device cannot send heartbeats. The lease then ends, and Seatify issues no file for the device. |
| License file lifetime | Longer than for online devices | The customer needs a new file before the old file expires. A longer lifetime means fewer new files. A shorter lifetime makes a suspended license stop working sooner. |
| Expiry starts | At issue, if the policy binds neither devices nor customers | A license file does not activate a license. With At first activation, such a license never gets an expiry date. |

These settings belong to the policy, and a license cannot override them. Use a separate policy for customers whose devices have no internet. See [License overrides](../../../concepts/policies/#license-overrides).

## Steps

{{% steps %}}

### Show the fingerprint

If the policy binds devices, the license file is valid on one device only. Seatify needs the fingerprint of that device. Your application shows the fingerprint, and the user sends it to you.

- Show the value that your application sends as the fingerprint in a claim. If your application sends a hash, show the hash. See [Choose a fingerprint](../../licensing/add-your-application/#choose-a-fingerprint).
- Let the user copy the value. The fingerprint is case-sensitive. A value with one wrong character is a different device.

If the policy does not bind devices, skip this step.

### Bind the device

Bind the device to the license in the dashboard. Enter the fingerprint that the user sent. The binding is the same as a claim from the device. It counts against the device limit, and the first binding activates the license. See [Activation](../../../concepts/licenses/#activation).

If the policy also binds customers, name the customer in the same binding. The customer then takes a seat.

If the policy does not bind devices, skip this step.

### Download the license file

Download the license file in the dashboard:

- If the policy binds devices, download the file from the device binding. The file is valid on that device only.
- If the policy does not bind devices, download the file from the license. The file is valid on any device.

Choose the signing key that the build of the customer embeds. The active key is the default. If the customer runs a build from before a key rotation, choose the retired key that this build embeds. See [Rotate signing keys](../../signatures/rotate-signing-keys/).

Seatify issues no file for a suspended license. It also issues no file for an expired license whose After expiry rule is Expire.

### Send the file

Send the file to the customer by email, on a USB drive or in any other way. The file name is the license ID with the extension `.lic`. The file is text, so the customer can also paste it from an email.

The file holds no license key and no fingerprint. It holds only their SHA-256 hashes.

### Import the file

Your application lets the user import the file. Accept a `.lic` file and pasted text. The file starts with the `BEGIN SEATIFY LICENSE FILE` line and ends with the `END SEATIFY LICENSE FILE` line.

When the user imports a file, your application does these checks:

1. It verifies the file. See [Verify the file](../offline-validation/#verify-the-file).
2. It checks the contents with the license key and the fingerprint of this device. See [Check the contents](../offline-validation/#check-the-contents).
3. It stores the file next to the license key.

If a check fails, show an error. Keep the file that is already stored.

### Check the license at each start

At each start, your application checks the stored file again and works out the status of the license. See [Check the license](../offline-validation/#check-the-license). The application does not call the License API.

Show the expiry date of the file to the user. The user can then ask for a new file in time. When the file has expired, ask the user to import a new file.

{{% /steps %}}

## Renew the file

A license file expires at the end of the license file lifetime. Before the file expires, download a new file from the same binding and send it to the customer. The binding stays, so you do not bind the device again.

The new file holds the license as it is at download. Send a new file also after you extend the license or change its entitlements.

## Move to another device

1. Release the binding of the old device in the dashboard. The device slot is free immediately.
2. Bind the new device and download a file for it. Start at [Show the fingerprint](#show-the-fingerprint).

The file of the old device keeps working until it expires.

## Limits

- A license file works until it expires. Seatify cannot stop the file earlier. This is also true after you suspend the license, release the device or delete the license.
- Seatify counts concurrent runs only through calls to the License API. On a device with no internet, Seatify does not limit concurrent runs. See [Concurrent runs](../../../concepts/concurrent-runs/).
- The [activity](../../../concepts/activity/) of the license shows the binding. It does not show file downloads.
- A deleted signing key signs no new files. Before you delete a retired key, check that no customer build with no internet still needs it. The last used time of the key includes file downloads.

## Next steps

- [Offline validation](../offline-validation/)
- [Rotate signing keys](../../signatures/rotate-signing-keys/)
- [License files](../../../concepts/licenses/#license-files)
- [Seats and devices](../../../concepts/seats-and-devices/)

