# Collection Licenses

> Request, add, and assign Collection Licenses, one seat for each Device that's collected.

URL: https://www.trakhound.com/docs/mtconnect-server/licenses

Data Collection is licensed per Device: each Device that's collected uses one **seat** of a License Code (Product ID `trakhound.mtconnect-server.collection`). The Agent Hub, the Tools, and the database and MQTT Services don't require a License. This page covers Licenses in the App. To request, buy, or renew a License, see the [Licensing Guide](https://www.trakhound.com/docs/licensing).

- **License Codes are issued for a specific computer.** Request them for the computer MTConnect Server is installed on. A code issued for another computer isn't valid.
- A License Code can have several seats, and each collected Device uses one.
- License Codes are checked on this computer, without contacting TrakHound.
- A Device is only collected with a valid License, and stops being collected when its License expires or is unassigned (checked every minute).

## Request and Add a License

1. Go to **Collection > Configuration > Licenses**.
2. Click **Request License**, with the number of seats to request (the number of unlicensed Devices is filled in). This opens https://licenses.trakhound.com with this computer's Device ID. A 2-hour trial is issued instantly.
3. Click **Add License Code**, paste the code (with or without dashes), optionally add a **Description**, and click **Add**.

A License Code can also be passed to a [silent install](https://www.trakhound.com/docs/mtconnect-server/installation#silent) with `/COLLECTIONLICENSE=`.

## Assign Licenses to Devices

**Default for new Devices** sets a License that's assigned to each new collected Device while it has a free seat. To assign Licenses to existing Devices, use the **Devices** list on the Licenses page. Filter it by **Unlicensed**, **Licensed**, **Expiring Soon** (within 30 days), or **Expired**, by License, by Group, or by text, then select Devices (the checkbox in the header selects every Device in the filter):

- **Assign License..** assigns a License to the selected Devices, replacing the License a Device already has. With **Use the other Licenses when it's full**, the other Licenses with free seats are used once the selected one is full. Nothing is changed when there aren't enough seats for every Device.
- **Unassign** removes the License from the selected Devices, releasing their seats.
- The result shows how many Devices were updated. Devices that couldn't be updated show the reason and stay selected, so they can be retried.

A single Device's License is also set on its **Collection** tab, and a [Group](https://www.trakhound.com/docs/mtconnect-server/groups#apply) can assign a License to each of its collected Devices.

- A Device keeps its License when its Address, Port, or Device is changed, and its seat is released when it's deleted.
- Disabled Devices and Devices with Collection turned off keep their License.

## Manage License Codes

**License Codes** lists each code with its Description, the seats in use, when it expires, and its Devices (click the arrow to show them). A code that isn't valid is shown as **Not Valid**.

| Action | Description |
| --- | --- |
| **Select Devices** | Selects the License's Devices in the Devices list. |
| **Replace** | Moves every Device using the License to another License, ex. a renewed License Code. It checks that the new License has enough free seats before moving any, and can remove the old License Code afterward. |
| **Release** | Frees seats that aren't used by a current Device, ex. a Device deleted in an earlier version (**Assignments without a Device**). |
| **Remove** | Removes the License Code. Its Devices become unlicensed. |

## Renew a License

When a subscription renews, a new License Code is issued (see the [Licensing Guide](https://www.trakhound.com/docs/licensing)). Add it, then use **Replace** on the old code to move its Devices to the new one in a single step, and remove the old code. The Licenses page and the Devices list show when Licenses expire soon.
