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

# 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.

Perform the following steps on the controller node used to start the installation. For Azure and AWS
installations, this node is named `rtf-controller-1` by default.

## Install rtfctl

The `rtfctl` utility is required to replace your Mule license key on Runtime Fabric. Follow the
steps in [Install rtfctl](https://docs.mulesoft.com/runtime-fabric/2.7/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.  Base64 encode the new Mule `.lic` license file provided by MuleSoft:

    - On MacOS, run the following command in the terminal:

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

    - On Unix, run the following 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))
        ```

2.  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
    ```

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

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

> [!NOTE] You need to restart your Runtime Fabric Mule apps to take the latest changed license.

## 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/2.7/_images/rtf-license-expiring.png)

## See Also

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