> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bqto.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# License key

> Activate, check and deactivate a bqto Pro license key, use it on 2 computers, pass it to CI with BQTO_LICENSE_KEY, and see what happens when Polar does not answer.

The builds of bqto Pro on `pilef-co/bqto-pro-releases` turn on their Pro features only with a
valid key from Polar. Polar is the store that sells bqto Pro.

Without a key, or with a revoked one, the builds work as the free bqto. A Pro flag, service, or
command then says how to get a key.

[Buy and manage](https://docs.bqto.dev/pro/subscription.md) says where to find your key.

## Activate the key on a computer

Activate the key once on each computer:

```sh theme={null}
bqto license activate BQTO-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
```

`bqto license activate -` reads the key from standard input instead, so the key does not show in
the list of running processes.

To check the key, or to free the computer, run:

```sh theme={null}
bqto license status
bqto license deactivate
```

`bqto license status --local` shows the saved key, masked, without asking Polar. bqto never prints
the whole key.

## Two computers

A key works on 2 computers.

* `activate` uses one place, and `deactivate` frees it.
* You can also free a place in your Polar customer portal.
* If you run `activate` again on a computer where the key is already active, bqto only checks the
  key and takes no new place.

bqto saves the key in `license.json` in its config folder. Only you can read the file.

## How often bqto asks Polar

* bqto asks Polar at most once a day.
* If Polar answers with a 429 or a server error, or does not answer, bqto keeps Pro for 1 more day.
  A Wi-Fi login page counts as no answer.
* After any answer that is not `granted`, bqto asks again at most once an hour.
* `bqto license status` always asks Polar at once. So after you renew, it shows Pro at once.
  If `BQTO_LICENSE_KEY` is set and Polar is busy, this can take up to about 3 minutes.

## In CI

Put the key in a secret and pass it as `BQTO_LICENSE_KEY`:

```yaml theme={null}
env:
  BQTO_LICENSE_KEY: ${{ secrets.BQTO_LICENSE_KEY }}
```

If `BQTO_LICENSE_KEY` is set, in CI or anywhere else, bqto only checks the key and activates
nothing. So CI uses none of the 2 places, and has no limit on jobs or repositories.

* If Polar answers with a server error, the job keeps Pro.
* If Polar limits the requests, or does not answer, the job runs without Pro.

In GitHub Actions, pass the key to bqto-action in `license-key`. See
[GitHub Actions](https://docs.bqto.dev/guides/github-actions.md#bqto-pro).

## Proxies that inspect HTTPS

bqto checks the certificate of Polar only against the public certificate authorities built into
bqto. It does not use the ones installed on the machine. So a proxy that opens HTTPS traffic to
inspect it counts as no answer. Set that proxy to let `api.polar.sh` through.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.