Licenses
Every self-hosted image carries a license. It says which providers the image may serve, and until when. The image checks it every hour, so a newer license takes over with no restart.
Where to find it
Open the backend under Self-hosted and choose License.
- Reference:
LT-and a number for a trial license,LP-and a number for a paid one. - Issued and Expires, with the days left.
- Covers: the providers it allows.
- Download license file: the license, as
license.json.
A new license is issued when a trial starts, when an order is paid, and for each month you pay by card. It covers every provider you hold for the type. The providers you select under Providers decide only what goes into the image.
How an image gets its license
Each backend does it one of two ways. You set it under Settings, in The license, and a change takes effect with the next build.
- Fetched from us: the image fetches its license from one address of ours, and checks again every hour. A new license, a provider added or dropped, and each month you pay reach a running image by themselves. The image needs a route to your registry's hostname.
- Carried inside: the image holds the license it was built with, or reads a file you mount. It needs no connection to us. A new license means a new file or a new image.
An image you pay for monthly always fetches its license. A trial starts with the answer you gave when you asked for it.
Fetching
The License tab shows the address images fetch from, and the key they send. Show reveals the key.
Keep a volume at /var/lib/mockzilla. The image keeps the license it fetched there, so a new container starts with no network.
An image built before fetching was turned on can fetch too. Pass it the address and the key:
docker run \
-e MZ_LICENSE_URL=<the address> \
-e MZ_LICENSE_KEY=<the key> \
-v mockzilla-license:/var/lib/mockzilla \
<image>Rotate gives the backend a new key. An image built with the old key fetches nothing more until you build again or pass it the new key.
When a new license is issued
A new license works with an image you already run, including one built during a trial. The image checks that the license is signed by Mockzilla, is for its type and has not expired. It does not have to be the license the image was built with.
- If the image fetches its license, there is nothing to do. It takes the new one within the hour, with no restart.
- If the image carries its license, download the new license file and mount it. A mounted file takes the place of the one inside the image, so you keep the image you run.
- Or build a new image. It carries the current license. This counts as one of your builds.
To mount the file:
docker run -v "$PWD/license.json:/etc/mockzilla/license.json:ro" <image>To mount it at another path, for example from a Kubernetes Secret, set MZ_LICENSE_FILE to that path.
An image serves only the providers it was built with, and of those only the ones its license covers. When a new license adds a provider, build a new image to serve it.
When a license expires
Once every license an image has expires, a running container answers every request with an error, and a new container does not start. The image can no longer be pulled, and it is later deleted from your registry. The backend stays, and a new build brings its image back once you hold a license again.