---
schema_version: "1"
id: b922bbcb481ecb85e0adc39bde8418567ac03acad56c9660789e3806ba1e414f
title: Replacing Mule License Keys
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/runtime-fabric/latest/replace-license-key.md
canonical_url: https://docs.mulesoft.com/runtime-fabric/latest/replace-license-key
source_site: docs.mulesoft.com
content_type: documentation
content_hash: f087afac44e8b87eef922a6b7185b804f52011c60ab7f5d1c373adc677681bb9
description: MuleSoft Documentation Site
release: "3.0"
latest: true
---
---
product: Runtime Fabric
version: 3.0
is-latest-version: true
---

# Replacing Mule License Keys

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

When your Mule license expires, you must replace your Mule license key. Also use this procedure if
you entered an incorrect license key during installation.

The steps to replace the license key depend on how Runtime Fabric was installed using `rtfctl`,
Helm, or Red Hat OpenShift.

Perform the steps for your installation type in these sections. For `rtfctl`, perform the steps on
the controller node used to start the installation. For Azure and AWS installations, this node is
named `rtf-controller-1` by default.

## Prepare the License Key

All methods require the Mule `.lic` license file to be Base64 encoded. Encode the new license file
provided by MuleSoft before applying it:

- On MacOS, run this command in the terminal:

  ```copy
  BASE64_ENCODED_LICENSE=$(base64 -b0 -i license.lic)
  ```

- On Unix, run this command:

  ```copy
  BASE64_ENCODED_LICENSE=$(base64 -w0 license.lic)
  ```

- On Windows, choose one of the following:

  - Use a WSL or Cygwin shell that includes the base64 tool and use the above Unix command.

  - Use the `base64.exe` program included with Windows git (`C:\Program Files\Git\usr\bin`).

  - Use the following Powershell command:

    ```copy
    $BASE64_ENCODED_LICENSE=[convert]::ToBase64String((Get-Content -path "license.lic" -Encoding byte))
    ```

## Replace Using `rtfctl`

Use this method when Runtime Fabric was installed with `rtfctl` (VM, bare metal, or standard
Kubernetes).

### Prerequisites

The `rtfctl` utility is required. Follow the steps in [Install RTFCTL](https://docs.mulesoft.com/runtime-fabric/latest/install-rtfctl) before
continuing.

Confirm that the `rtfctl` binary is present in the current working directory and in the user
`$PATH`.

Run `rtfctl` commands as a privileged user.

### Procedure

1.  Use the `rtfctl` utility to apply the Base64 value of your license key. For more information on
    the `rtfctl` command, refer to [RTFCTL commands](https://docs.mulesoft.com/runtime-fabric/latest/install-rtfctl#list-supported-commands).

    ```copy
    rtfctl apply mule-license $BASE64_ENCODED_LICENSE
    ```

2.  To verify the Mule license key has been applied correctly, retrieve the contents using the
    `rtfctl` utility:

    ```copy
    rtfctl get mule-license
    ```

## Replace Using Helm

Use this method when Runtime Fabric was installed with Helm.

Apply the license by running this command (ensure `$BASE64_ENCODED_LICENSE` is set from the Prepare
the License Key section):

```copy
helm upgrade runtime-fabric rtf/rtf-agent --set muleLicense=$BASE64_ENCODED_LICENSE -n rtf --reuse-values --version <current-version>
```

Replace `<current-version>` with your current Runtime Fabric Helm chart version.

## Replace on Red Hat OpenShift

Use this method when Runtime Fabric is installed on Red Hat OpenShift (operator-based installation).

You can apply the license either from the OpenShift console (by updating the Runtime Fabric instance
custom resource). Ensure you have prepared the Base64-encoded license key as described in Prepare
the License Key.

### Apply the License Key from the OpenShift Console

To apply the license key from the OpenShift console, follow these steps:

1.  Navigate to the Runtime Fabric operator.

2.  Select the namespace in which the Runtime Fabric instance is installed.

3.  Click on the **Runtime Fabric** tab.

4.  Click on the **runtime-fabric** instance link.

    ![Runtime Fabric operator with runtime-fabric instance selected](/mulesoft/current/en-us/runtime-fabric/latest/_images/rtf-license-operator-1.png)

5.  Update the Runtime Fabric instance CR .yaml file by adding the `muleLicense` key with your
    Base64-encoded license value.

    ![Runtime Fabric instance with mulelicense](/mulesoft/current/en-us/runtime-fabric/latest/_images/rtf-license-operator-2.png)

## Get License Expiry Date

The `GET` fabric API `(/organizations/{organizationId}/fabrics/{id})` response includes an optional
`licenseExpiryDate` field:

{ "id": "fabric\_id", "name": "anna-qa-gke-rtf-1", "region": "us-east-1", "vendor": "gke",
"vendorMetadata": {}, "organizationId": "organization\_id", "version": "2.2.9", "status": "Active",
"desiredVersion": "2.2.9", "availableUpgradeVersion": "2.2.29", "createdAt": 1679684859167,
"secondsSinceHeartbeat": 192, "kubernetesVersion": "v1.24.11-gke.1000", "licenseExpiryDate":
1653523200000, "isManaged": false, "isHelmManaged": true, "clusterConfigurationLevel": "production",
"features": { "enhancedSecurity": true, "persistentStore": false }, "ingress": { "domains": \[\] } }

The Runtime Fabric **Mule License Expiry Date** is also exposed in the Runtime Manager UI, with a
warning notification of **License is expiring soon**:

![Runtime Manager UI with Mule License Expiry Date warning notification](/mulesoft/current/en-us/runtime-fabric/latest/_images/rtf-license-expiring.png)

## See Also

- [Install RTFCTL](https://docs.mulesoft.com/runtime-fabric/latest/install-rtfctl)

- [Insert the Mule License Key](https://docs.mulesoft.com/runtime-fabric/latest/install-openshift#insert-the-mule-license-key) (OpenShift)

- [Installing Runtime Fabric Using Helm](https://docs.mulesoft.com/runtime-fabric/latest/install-helm)
