DRONE_LICENSE

Optional string value provides the filepath of the Drone Enterprise license key. This is used to unlock the Drone Enterprise edition.

DRONE_LICENSE=/etc/drone.key

If you are running the Drone server in a Docker container you will need to mount the license key as a volume:

$ docker run \
  --volume=/path/on/host/drone.key:/etc/drone.key

If you are running the Drone server using docker-compose or Kubernetes or you have configured Drone using Yaml, you can provide the server with the license key as an environment variable:

DRONE_LICENSE: |
  -----BEGIN LICENSE KEY-----
  Thjh7sTA1VDE4OjM2tpmQQZCyRd43M1ODI1OVoiLCJkYXQiSukU/Y
  -----END LICENSE KEY-----

Common Problems

The most common root cause for license errors is failing to mount the license key, or providing an old or expired license key. The debug server logs provide useful information that can help troubleshoot license issues.

Error indicates license file was not properly mounted:

1
2
3
4
5
6
{
  "error": "open /tmp/LICENSE.txt: no such file or directory",
  "level": "fatal",
  "msg": "main: invalid or expired license",
  "time": "2020-10-01T12:04:39-04:00"
}

Error indicates a problem with the license file itself. This can be resolved by ensuring you have the latest version of the Drone server (1.9.2 or higher) or by requesting a new license key.

1
2
3
4
5
6
{
"error": "unexpected end of JSON input",
"level": "fatal",
"msg": "main: invalid or expired license",
"time": "2020-10-29T09:42:19Z"
}

Error indicates license environment variable was empty and was not properly configured, resulting in a trial license being issued. This will result in License Expired errors if you have exceeded the trial build limit.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "build.limit": 5000,
  "expires": "0001-01-01T00:00:00Z",
  "kind": "trial",
  "level": "debug",
  "msg": "main: license loaded",
  "repo.limit": 0,
  "time": "2020-10-01T12:05:32-04:00",
  "user.limit": 0
}

Example log entry indicating the license was successfully loaded:

1
2
3
4
5
6
7
8
9
{
  "build.limit": 0,
  "expires": "2020-11-24T23:26:34.67261883Z",
  "kind": "standard",
  "level": "debug",
  "msg": "main: license loaded",
  "time": "2019-12-02T10:38:21-08:00",
  "user.limit": 50
}

Please double-check the user limits to ensure they align with your expectations. If you continue to experience License Exceeded errors you should follow our guide to make sure your usage does not exceed the license limits.