# Licensing

CrushTest is a yearly add-on to a paid CrushMFT license: **$100 a year**. An **Enterprise Site** license includes it at no cost, for any number of controllers. There is no trial.

One CrushTest license covers **one controller**: the machine that runs CrushTest's UI or `crushtest run`. Load agents and monitors need no license of their own; they take orders only from a licensed controller.

## Without a license

![The License page without a license](Licensing/unlicensed.png)

Nothing runs. CrushTest opens on its License page and nothing else; the command line refuses `run`, `preflight`, `report`, `compare`, `calibrate` and `export` with the reason.

One thing always works: **clean-up**. If an earlier run left test users or files on a server (the license expired in between, say), the License page lists those servers and **Clean up** removes what CrushTest's ledger says it made. Clean-up only removes, never makes.

## Activate

1. Buy CrushTest (or, with Enterprise Site, take it) in the support portal. Under **Licenses** you get an activation token.
2. In CrushTest: **License › Activate**, paste the token, click **Activate**. Or on the command line: `crushtest license activate TOKEN`.

   ![Activate](Licensing/activate.png)

The token is used once and never stored. The license is bound to this controller (its node id and fingerprint, shown on the License page).

## A machine without internet access

1. **License › Offline › Download the activation request** (or `crushtest license request --out request.json`).
2. Upload the request in the support portal on a machine that has internet access. It gives you a license file.
3. **License › Offline**: paste the license file and click **Import** (or `crushtest license import FILE`).

## Check-in

CrushTest checks in with the license service once a day, to pick up a renewal or a change. The check-in carries nothing about your tests: no server, no address, no result. **Check in now** on the License page does it at once. A machine without internet access imports a new license file instead when its year is renewed.

## Moving to another machine

**License › Release this controller** (or `crushtest license release`) gives the seat back, and CrushTest stops running there. Then activate on the new machine. Moving the whole CrushTest folder (with `node.key` and `node.crt`) keeps the same controller, and its license, on the new machine.

## When it runs out

The license holds until 30 days after the paid year, and each renewal extends it. A run that has started finishes; the next one needs a valid license.

## The License page

![The License page of a licensed controller](Licensing/licensed.png)

| | |
|---|---|
| This controller | its node id and fingerprint, which the license is bound to |
| License | its id, serial, licensee, type, paid-through date and expiry |
| Last check-in | when CrushTest last reached the license service, and the problem if the last try failed |
