# Unable to apply new Drone license key

**URL:** <https://drone.discourse.group/t/unable-to-apply-new-drone-license-key/12945>\
**Category:** Drone Support\
**Created:** [December 2, 2022, 10:08am UTC](https://drone.discourse.group/t/unable-to-apply-new-drone-license-key/12945 "2022-12-02T10:08:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![OCram85](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/ocram85/32/2980_2.png) [@OCram85](https://drone.discourse.group/u/OCram85)\
**Post date:** [December 2, 2022, 10:08am UTC](https://drone.discourse.group/t/unable-to-apply-new-drone-license-key/12945/1 "2022-12-02T10:08:18Z")

</div>

Hi there,

I tried to apply a new license key into a running drone instance on docker (drone:2.15).

Like shown in the faqs and docs, I tried to apply the license with the environment variable directly and a mountend config file. Both ways failed with the same message:

```auto
2022-12-02T09:37:07Z fatal error=Malformed License msg=main: invalid or expired license

```

Tried with env var:

```auto
version: "3.5"

configs:
  drone.key:
  external: true

services:
  server:
    image: drone/drone:2.15.0
    environment:
      # ...
      DRONE_LICENSE: |
        -----BEGIN LICENSE KEY-----
        12345
        67890
        abcd
        efgh
        -----END LICENSE KEY------

```

tried with docker config:

```auto
version: "3.5"

configs:
  drone.key:
  external: true

services:
  server:
    image: drone/drone:2.15.0
    environment:
      # ...
      DRONE_LICENSE: "/drone.key"
    configs:
      - drone.key

```

---

<div class="post-metadata">

**Author:** ![jimsheldon](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/jimsheldon/32/7760_2.png) [@jimsheldon](https://drone.discourse.group/u/jimsheldon)\
**Post date:** [December 2, 2022, 3:55pm UTC](https://drone.discourse.group/t/unable-to-apply-new-drone-license-key/12945/2 "2022-12-02T15:55:09Z")

</div>

Hello @OCram85

You say this is a new license key, so you had a working service previously?

Since you are a customer, have you tried reaching out to your Harness support rep?
