# Licence keys

> How dedicated and on-prem installs are licensed: a signed licence key checked offline, what it holds, how to install and renew it without a restart, and what happens as it nears its end and after it.

An on-prem install runs under a **licence key** from MoreVoice. It says who the install is for, what it allows (the plan, extra features, and limits such as seats and AI calls at once) and until when. The install checks it **offline**: no call home, no network at all, which is what an isolated site needs. A dedicated install MoreVoice operates for you can have one too, when your contract says so.

## What a licence is

A licence key is a signed token (a JWS, signed with Ed25519). MoreVoice signs it with a key only MoreVoice holds; every install carries the public half and checks the signature before it reads anything in the licence. It is bound to one install by its **deployment ID**, so a licence can't be copied to another install.

| In the licence | What it says |
| --- | --- |
| Customer and licence ID | Who it was issued to, and this licence's own ID (a licence can be revoked by its ID). |
| Deployment ID | The one install it is valid for. |
| Start and end dates | When it starts and ends, and how many grace days follow the end. |
| Plan and features | The plan, and features added on top of it. |
| Limits | The caps below. |
| Mode | The kind of install it is for. |

### Limits

| Limit | What it caps |
| --- | --- |
| `seats` | Members of the organisation. |
| `concurrent_ai_channels` | AI calls at the same time. |
| `copilot_seats` | Agents with the real-time copilot. |
| `ai_minutes_month` | AI minutes in a calendar month (optional). |

### Levels

An install is at one level at a time. Notices start 30 days before the end date; the grace period is 30 days unless your licence says otherwise.

| Level | What it means |
| --- | --- |
| `off` | The licence doesn't apply: a dedicated install MoreVoice operates without one. Your contract decides. |
| `ok` | A valid licence with more than the notice period left. Everything works. |
| `expiring` | A valid licence close to its end: admins see a banner and get a daily e-mail. Everything works. |
| `grace` | Past the end date, within the grace days: the same notices, and everything keeps working. |
| `restricted` | After the grace days: no new outbound campaigns and no configuration changes. Inbound calls, calls in progress, call handling, compliance actions (do-not-call, consent, privacy requests) and stopping campaigns keep working. |
| `unlicensed` | No licence on an on-prem install, or one that fails its check (tampered, another deployment, an unknown key, a clock set back): admins see only the licence page and no new call starts. Calls in progress are never cut. |

### The check

- Modes: `dedicated`, `onprem`, `airgap`.
- Clock difference accepted between MoreVoice and your install: 5 minutes.
- A clock set back more than 24 hours behind the latest time the install has seen makes the licence invalid until a new one is installed.
- A licence is at most 8,192 characters.

> **Calls are never cut**
>
> Whatever happens to the licence, a call in progress is never dropped, and an expired licence never stops inbound calls. Restrictions apply to what starts next.

## Install or renew a licence

1. Send us your install's **deployment ID** (it is in your Helm values or your Compose `.env`). We send back the licence key.

2. Install it in one of three ways. None needs a restart: the install reads the licence again on every check.
   - **In the app**: the organisation's owner opens **Licence**, pastes the key under **Install a licence** and selects **Install licence**.
   - **As a file**: replace the mounted licence file (the Kubernetes secret `licence.jwt`, or `licence/licence.jwt` in the Compose bundle). The install finds it through `LICENCE_FILE`.
   - **As a setting**: put the key itself in `LICENCE_KEY`. A licence file, when there is one, wins.

3. The **Licence** page shows the licence in force: its level, the days left, the dates and the limits.

A licence that fails its check is refused with the reason (another deployment, an unknown key, a date in the future, a signature that doesn't match), and the previous licence stays in force.

## Renew in time

Admins see a banner, and get a daily e-mail, from 30 days before the end date. Ask for the renewal then: installing a new licence takes effect at once. Keep the server's clock right (NTP): a clock that is wrong by more than a few minutes, or set back, makes the licence fail its check.
