---
schema_version: "1"
id: 76df904939bb86c72e17bea1d6318c168ee5a2a074fd097b4bb0ccf607675051
title: Install or Update the Runtime Manager Agent
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/runtime-manager/installing-and-configuring-runtime-manager-agent.md
canonical_url: https://docs.mulesoft.com/runtime-manager/installing-and-configuring-runtime-manager-agent
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 12a327dc8fdeb45049d4aafa48d852e0ea5f6d8b3c1231d8b97b2f80f0a7eb9e
description: MuleSoft Documentation Site
latest: true
---
---
product: Runtime Manager
keywords: agent, runtime manager, mule, esb, servers, monitor, notifications, external systems, third party, get status, metrics
---

# Install or Update the Runtime Manager Agent

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

[![logo hybrid active](/mulesoft/current/en-us/_/img/icons/hybrid-cloud.svg "Hybrid")Hybrid](deployment-strategies#hybrid-deployments)[ ![logo server active](/mulesoft/current/en-us/_/img/icons/server-cloud.svg "Anypoint Platform PCE")Private Cloud Edition](deployment-strategies#anypoint-platform-private-cloud-edition)

> [!NOTE] Where possible, we changed noninclusive terms to align with our company value of Equality.
> We maintained certain terms to avoid any effect on customer implementations.

The Anypoint Runtime Manager agent registers Mule runtime engine (Mule) with Runtime Manager. After
Mule is registered, you can manage it using Runtime Manager within the specific environment and
Anypoint Platform business group in which Mule was registered. You cannot register Mule with
multiple Runtime Manager business groups or environments.

Use the `amc_setup` command to install and configure the agent, using different parameters depending
on the type of console to which you are connecting the agent:

- [Anypoint Platform Runtime Manager cloud-based console](#register-mule-with-the-cloud-based-runtime-manager)

- [Anypoint Platform Private Cloud Edition Runtime Manager console](#register-mule-with-anypoint-platform-pce-runtime-manager)

When you run `amc_setup`, the agent creates the `$MULE_HOME/conf/mule-agent.yml` with the
configuration options you specified.

After initial installation, you can:

- Rerun `amc_setup` to change the agent configuration or to update the agent version.

- Modify `mule-agent.yml` to change the agent configuration.

  Some configuration options, such as extending JMX monitoring to other external services, are not
  possible using `amc_setup`. You must manually add them to `mule-agent.yml`. See
  [Update Agent Configuration in mule-agent.yml](https://docs.mulesoft.com/runtime-manager/rtm-agent-config-yaml).

> [!NOTE] `$MULE_HOME` is environment variable that specifies the location where you installed Mule.
> These instructions use paths for Mac or Linux. If you are using Windows, replace the `$MULE_HOME`
> path with `%MULE_HOME%`.

## Requirements and Restrictions

- Do not register a single Mule runtime engine with more than one Runtime Manager business group or
  environment.

- Do not register Mule with Runtime Manager more than once.

- Do not register a Mule runtime engine with both an older Mule Management Console (MMC) and Runtime
  Manager.

  If Mule is currently managed in MMC, first unregister it with MMC before running `amc_setup`.

  MuleSoft support provides migration scripts to migrate from MMC to Runtime Manager.

> [!NOTE] Runtime Manager agent can’t run in a separate JVM.

## Compatibility

The version of Runtime Manager agent must support the version of Mule and Runtime Manager you are
using. To determine compatibility, check the
[Runtime Manager Agent Release Notes](https://docs.mulesoft.com/release-notes/runtime-manager-agent/runtime-manager-agent-release-notes).

### Runtime Manager Agent Compatibility

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Mule version</th><th>Runtime Manager Agent version</th><th>Java version</th></tr></thead><tbody><tr><td><p>4.3.0</p></td><td><p>2.4.3 or later</p></td><td><p>8</p></td></tr><tr><td><p>4.4.0</p></td><td><p>2.4.27 or later</p></td><td><p>8</p></td></tr><tr><td><p>4.4.0</p></td><td><p>2.4.28 or later</p></td><td><p>8,11</p></td></tr><tr><td><p>4.5.0</p></td><td><p>2.5.6 or later</p></td><td><p>8,11</p></td></tr><tr><td><p>4.6.0</p></td><td><p>2.6.0 or later</p></td><td><p>8,11,17</p></td></tr></tbody></table>

> [!NOTE] Using a Runtime Manager Agent version earlier than the ones provided in the compatibility
> table can result in incompatibilities or introduce inconsistencies.

For more information on Java compatibility, see [Java Support](https://docs.mulesoft.com/general/java-support).

## Prerequisites

- Your enterprise license is current.

- If you must download the agent, you must have an Enterprise support account.

## Install the Agent from a Mule Installation

The agent is bundled with the Mule runtime engine installation.

To install the agent:

1.  [Download and install Mule](https://docs.mulesoft.com/on-premises/latest/runtime-installation-task).

2.  Run `$MULE_HOME/bin/amc_setup` and specify parameters for your installation.

    See [amc\_setup Parameters](#amc_setup-parameters).

## Install the Agent From a .zip File

If you need a different version of the agent than the version included in the software distribution,
you can download it from the Support Portal.

### Download the Agent from the Support Portal

To verify compatibility with your Mule runtime engine and Runtime Manager, check the corresponding
[Runtime Manager Agent Release Notes](https://docs.mulesoft.com/release-notes/runtime-manager-agent/runtime-manager-agent-release-notes).

To download the agent:

1.  Open [MuleSoft Help Center](https://help.mulesoft.com/s/).

2.  Click the **Support** tile.

3.  Click **Login** in the upper right and log in using your Anypoint Platform credentials.

    > [!IMPORTANT] You must have an Enterprise support account to download the agent.

4.  In the MuleSoft Support page, click the **Downloads** tab.

5.  Click **Mule Agent**.

6.  Locate the agent to install and click **Download** in the Action column.

### Install the Agent

To install the agent from the downloaded .zip file:

1.  Stop Mule or the API gateway runtime.

2.  Extract the downloaded `agent-setup-_VERSION_.zip` file to `$MULE_HOME/bin`.

    If prompted, overwrite any conflicting files.

3.  Run `$MULE_HOME/bin/amc_setup` and specify parameters for your installation.

    See [amc\_setup Parameters](#amc_setup-parameters).

4.  Restart Mule or the API gateway runtime.

## Update the Agent

If you previously installed the agent with an earlier version of `amc_setup`, you can update the
agent and retain your existing agent configuration in `$MULE_HOME/conf/mule-agent.yml`.

If you keep your `mule-agent.yml` file, ensure that these changes are applied:

- When upgrading to versions 1.12.0 and later:

  See
  [Upgrade Requirements](https://docs.mulesoft.com/release-notes/runtime-manager-agent/runtime-manager-agent-1.12.x-release-notes#1-12-0).

- When upgrading to versions 2.2.0 and later:

  See
  [Upgrade Requirements](https://docs.mulesoft.com/release-notes/runtime-manager-agent/runtime-manager-agent-2.2.x-release-notes#2-2-0).

- When upgrading to versions 2.7.0 and later:

  See
  [Upgrade Requirements](https://docs.mulesoft.com/release-notes/runtime-manager-agent/runtime-manager-agent-2.7.x-release-notes#2-7-0).

To update an existing Runtime Manager agent:

1.  Stop Mule or the API gateway runtime.

2.  Extract the downloaded `agent-setup-_VERSION_.zip` file to `$MULE_HOME/bin`.

3.  When prompted, overwrite any conflicting files.

4.  Run `$MULE_HOME/bin/amc_setup -U`.

    When you run `amc_setup` with the `-U` parameter, you can’t include other parameters on the
    command line.

5.  Restart Mule or the API gateway runtime.

If you update the Runtime Manager agent, you must also run the Anypoint Monitoring agent uninstall
script and then re-install the Anypoint Monitoring agent. See
[Update the Anypoint Monitoring Agent](https://docs.mulesoft.com/monitoring/am-installing#update-the-anypoint-monitoring-agent).

### What Happens When You Update the Agent

When you update the agent, the `amc_setup` script:

- Backs up the current version of the agent:

  - Archives the `$MULE_HOME/server-plugins/mule-agent-plugin` to
    `$MULE_HOME/tools/mule-agent-backup.zip`

  - Archives any custom modules (usually located in
    `$MULE_HOME/server-plugins/mule-agent-plugin/lib/modules`) to
    `$MULE_HOME/tools/mule-agent-modules-backup.zip`

- Updates agent libraries in `$MULE_HOME/server-plugins/mule-agent-plugin/lib`

- Retains the current `$MULE_HOME/conf/mule-agent.yml` configuration file

- Leaves modules in `$MULE_HOME/server-plugins/mule-agent-plugin/lib/modules` unchanged

  This directory contains all custom modules added to the agent (not included in the agent
  distribution).

- Updates the default agent truststore name from `truststore.jks` to `anypoint-truststore.jks` (for
  updates to versions 1.11.0 or 2.1.4 and later).

## Roll Back the Agent

If you need to roll back the agent, for example, if problems occur when you update the agent,
restore the previous version from the `mule-agent-backup.zip` file. This ZIP file includes
libraries, configuration files, and compiled classes for the agent.

To roll back the agent:

1.  Stop Mule or the API gateway runtime.

2.  Change to the `mule-agent-plugin` directory:

    `cd $MULE_HOME/server-plugins/mule-agent-plugin`

3.  Ensure that you are in the `mule-agent-plugin` directory:

    `pwd`

4.  Remove the existing agent files:

    `rm -r *`

5.  Copy the backup ZIP file to the `mule-agent-plugin` directory:

    `cp $MULE_HOME/tools/mule-agent-backup.zip .`

6.  Restore the previous version of the agent from the backup ZIP file:

    `unzip mule-agent-backup.zip`

7.  Remove the backup ZIP file:

    `rm mule-agent-backup.zip`

8.  Restart Mule or the API gateway runtime.

## Disable the Agent

To disable the agent:

1.  Stop Mule or the API gateway runtime.

2.  Remove these files:

    ```console
    $MULE_HOME/conf/mule-agent.jks
    $MULE_HOME/conf/mule-agent.yml
    ```

3.  Restart Mule or the API gateway runtime.

> [!NOTE] The agent still starts up when disabled, but it does not perform any operation.

## amc\_setup Parameters

Parameters to `amc_setup` enable you to:

- Register Mule with a Runtime Manager console:

  - [Register Mule with the Cloud-Based Runtime Manager](#register-mule-with-the-cloud-based-runtime-manager).

  - [Register Mule with Anypoint Platform PCE Runtime Manager](#register-mule-with-anypoint-platform-pce-runtime-manager).

    Registering Mule with Anypoint Platform PCE requires additional `amc_setup` parameters. See
    [PCE Runtime Manager amc\_setup Parameters](#pce-runtime-manager-amc_setup-parameters).

- [Configure the agent to connect through a proxy server](https://docs.mulesoft.com/runtime-manager/rtm-agent-proxy-config#configure-the-agent-to-connect-through-a-proxy-server).

- [Encrypt passwords in the `mule-agent.yml` file](#encrypt_password).

- [Manage Mule using the local Runtime Manager agent REST API interface](https://docs.mulesoft.com/runtime-manager/rtm-agent-REST-connections).

- [Update the Agent](#update-the-agent).

To see available options, run `./amc_setup --help`.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Value</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>--help</code></p></div></div></td><td><div></div></td><td><div><div><p>Displays help for the command on the command line.</p></div></div></td></tr><tr><td><div><div><p><code>-U</code></p></div><div><p><code>--update</code></p></div></div></td><td><div></div></td><td><div><div><p>Updates the agent, preserving the existing <code>mule-agent.yml</code> configuration file.</p></div><div><div data-type="IMPORTANT">When you update a previous agent installation using <code>-U</code>, you can’t include other parameters on the command line.</div></div></div></td></tr><tr><td><div><div><p><code>-E</code></p></div><div><p><code>--encrypt</code></p></div></div></td><td><div></div></td><td><div><div><p>Encrypts the passwords in an existing <code>mule-agent.yml</code> file.</p></div><div><p>Use this option alone to encrypt passwords. For information, see <a href="#encrypt_password">Encrypt Passwords in an Existing mule-agent.yml File</a>.</p></div></div></td></tr><tr><td><div><div><p><code>--decrypt</code></p></div></div></td><td><div></div></td><td><div><div><p>Decrypts the passwords in an existing <code>mule-agent.yml</code> file, for example, before changing the main password.</p></div><div><p>Use this option alone to decrypt passwords. For information, see <a href="#update-the-main-password">Update the Main Password</a> and <a href="#display-passwords-in-mule-agent-yml-in-plain-text">Display Passwords in mule-agent.yml in Plain Text</a>.</p></div></div></td></tr><tr><td><div><div><p><code>--mule-home</code></p></div></div></td><td><div><div><p><code><em>mule-home-directory</em></code></p></div></div></td><td><div><div><p>Specifies the location of the <code>$MULE_HOME</code> directory.</p></div><div><p>Use this option if you are running the installation script from a location other than <code>$MULE_HOME/bin</code>.</p></div><div><p>The <em>amc_setup</em> script reads the <code>mule-agent.yml</code> file from <code>../conf</code>, relative to the directory specified by <code>--mule-home</code>. For example, if the value of <code>--mule-home</code> is <code>/tmp/Mule/bin</code>, <em>amc_setup</em> reads <code>mule-agent.yml</code> from <code>/tmp/Mule/conf</code>.</p></div></div></td></tr><tr><td><div><div><p><code>--skip-gateway-clientid</code></p></div></div></td><td><div></div></td><td><div><div><p>Skips configuration of the API gateway <code>client_id</code> and <code>client_secret</code>.</p></div></div></td></tr><tr><td><div><div><p><code>-I</code></p></div><div><p><code>--insecure</code></p></div></div></td><td><div></div></td><td><div><div><p>Configures the agent to use an unencrypted REST connection.</p></div><div><p>See <a href="https://docs.mulesoft.com/runtime-manager/rtm-agent-REST-connections#insecure-connection-channel">Insecure Connection Channel</a>.</p></div><div><p>Do not use this parameter with the <a href="#pce-runtime-manager-amc_setup-parameters">PCE <code>amc_setup</code> parameters</a>.</p></div><div><p>This option replaces the contents of <code>$MULE_HOME/conf/mule-agent.yml</code>.</p></div></div></td></tr><tr><td><div><div><p><code>-S</code></p></div><div><p><code>--secure</code></p></div></div></td><td><div></div></td><td><div><div><p>Configures the agent to establish a TLS connection with an on-premises administration console.</p></div><div><p>See <a href="https://docs.mulesoft.com/runtime-manager/rtm-agent-REST-connections#secure-connection-channel">Secure Connection Channel</a></p></div><div><p>Do not use this parameter with the <a href="#pce-runtime-manager-amc_setup-parameters">PCE <code>amc_setup</code> parameters</a>.</p></div><div><p>This option replaces the contents of <code>$MULE_HOME/conf/mule-agent.yml</code>.</p></div></div></td></tr><tr><td><div><div><p><code>-H</code></p></div><div><p><code>--hybrid</code></p></div></div></td><td><div><div><p><code><em>token</em></code></p></div><div><p><code><em>server-name</em></code></p></div></div></td><td><div><div><p>Configures the agent to connect with either Anypoint Platform PCE or cloud-based Anypoint Platform managed by MuleSoft.</p></div><div><ul><li><p><code><em>token</em></code> is a base64 encoded string that specifies the exact business group and environment with which to register Mule with Runtime Manager.</p></li><li><p><code><em>server-name</em></code> is the instance name used to identify Mule in the Runtime Manager console.</p><div><p>This name must be unique within the business group’s environment.</p></div></li></ul></div></div></td></tr><tr><td><div><div><p><code>-P</code></p></div><div><p><code>--proxy</code></p></div></div></td><td><div><div><p><code><em>proxy-host</em></code></p></div><div><p><code><em>proxy-port</em></code></p></div><div><p><code><em>proxy-user</em></code></p></div><div><p><code><em>proxy-password</em></code></p></div></div></td><td><div><div><p>Specifies the proxy configuration to use when registering with the connection.</p></div><div><p>See <a href="https://docs.mulesoft.com/runtime-manager/rtm-agent-proxy-config">Connect the Agent Through a Proxy Server</a>.</p></div></div></td></tr><tr><td><div><div><p><code>-R</code></p></div><div><p><code>--region</code></p></div></div></td><td><div><div><p><code><em>region</em></code></p></div></div></td><td><div><div><p>Specifies the region to deploy to. Available regions are <code>prod</code>, <code>eu1</code>, and <code>us_gov</code>.</p></div></div></td></tr><tr><td><div><div><p><code>--fips</code></p></div></div></td><td><div></div></td><td><div><div><p>Enables FIPS 140-2 compliance on Mule 4 runtime on *nix-based servers.</p></div></div></td></tr></tbody></table>

## Register Mule with the Cloud-Based Runtime Manager

[![logo hybrid active](/mulesoft/current/en-us/runtime-manager/_images/logo-hybrid-active.png "Hybrid")](deployment-strategies#hybrid-deployments)

To register Mule with the Anypoint Platform Runtime Manager cloud-based console, you need:

- A valid registration token, which identifies a specific environment for a specific business group
  in Anypoint Platform

- An instance name, which identifies Mule in the Runtime Manager console

To register Mule:

1.  In Runtime Manager, click **Servers** in the left menu.

2.  Click the **Add Server** button.

3.  Enter a unique name for your server.

    Server names can contain up to 60 alphanumeric characters (a-z, A-Z, 0-9), periods (.), hyphens
    (-), and underscores (\_), but not spaces or other special characters. Runtime Manager supports
    Unicode characters in server names.

    The server name must be unique in the environment, but it can be the same for the same
    organization in different environments.

    Runtime Manager generates the `amc_setup` command. This command includes the server name you
    specified (`_server-name_`) and the registration token (`_token_`) required to register Mule in
    your environment. The registration token includes your organization ID and the current
    environment.

    ![amc\_setup command in the Add Server window](/mulesoft/current/en-us/runtime-manager/_images/rtm-add-server.png)

    Figure 1. The arrow shows the `amc_setup` command in the **Add Server** window.

4.  Click **Copy command** to copy the command.

5.  In a terminal window:

    1.  Change to the `$MULE_HOME/bin` directory for the Mule instance that you’re registering.

    2.  If you want to encrypt passwords in the `mule-agent.yml` file, set the
        `AGENT_VAR_master_password` environment variable to the main password:

        `export AGENT_VAR_master_password=myPassword`

    3.  Paste the command on the command line.

    4.  Include any other parameters on the `amc_setup` command line.

        See [amc\_setup Parameters](#amc_setup-parameters).

        Here is an example `amc_setup` command:

        ```console
        ./amc_setup -H myToken myMuleServer --proxy myProxy-host myProxy-port myProxy-user myProxy-password
        ```

The `amc_setup` command generates the `$MULE_HOME/conf/mule-agent.yml` file.

### Example mule-agent.yml File

Here is an example `mule-agent.yml` file generated by the `-H` option, with encrypted passwords:

```yaml
transports:
  rest.agent.transport:
    enabled: false
  websocket.transport:
    consoleUri: wss://runtime-manager.anypoint.mulesoft.com:443/mule
    handshake:
      enabled: true
      body:
globalConfiguration:
  security:
    keyStorePassword: "![PBEWITHSHA1ANDDESEDE,WdPmAQMIC8Atr5iK4phjmbZbs9XFLLiH1eDhA7AmnpKUaPDhp40OB4uKZ6JUMW44]"
    keyStoreAlias: agent
    keyStoreAliasPassword: "![PBEWITHSHA1ANDDESEDE,WdPmAQMIC8Atr5iK4phjmbZbs9XFLLiH1eDhA7AmnpKUaPDhp40OB4uKZ6JUMW44]"
  authenticationProxy:
    endpoint: https://data-authenticator.anypoint.mulesoft.com:443
  proxyConfiguration:
    password: "![PBEWITHSHA1ANDDESEDE,VIs82yFDp66lnsL/Rss8q8js/zPDQ8+HJpdNepdZtA9obeDj5u+z4HIocsbLvXow]"
```

## Register Mule with Anypoint Platform PCE Runtime Manager

[![logo server active](/mulesoft/current/en-us/runtime-manager/_images/logo-server-active.png "Anypoint Platform PCE")](deployment-strategies#anypoint-platform-pce-deployments)

With Anypoint Platform Private Cloud Edition (Anypoint Platform PCE), all Runtime Manager services
run on-premises rather than in a cloud environment managed by MuleSoft.

To register Mule with PCE Runtime Manager:

1.  Log in to an Anypoint Platform PCE account.

2.  Ensure that you have correctly set up the DNS entry for your platform.

    See [DNS or IP](https://docs.mulesoft.com/access-management/private-cloud-edition-features#dns-or-ip).

3.  Select a business group and environment with which to register Mule.

4.  Within the selected environment, click **Servers** in the left menu.

5.  Click the **Add Server** button.

    Runtime Manager generates the `amc_setup` command, including `_token_` and `_server-name_`, to
    use to register Mule in your environment.

    The registration token includes your organization’s ID and the current environment.

6.  Click **Copy** to copy the command.

7.  In a terminal window, change to the `$MULE_HOME/bin` directory for the Mule instance that you’re
    registering.

8.  Paste the command on the command line.

9.  Change the instance name `server-name` to the unique name to use to label Mule in the Runtime
    Manager console.

10. Include any other parameters on the `amc_setup` command line.

    See [amc\_setup Parameters](#amc_setup-parameters).

11. Append parameters to the command line to specify the URLs of services used by Runtime Manager to
    manage your Mule instance.

    See [PCE Runtime Manager amc\_setup Parameters](#pce-runtime-manager-amc_setup-parameters).

    Here is an example `amc_setup` command:

    ```console
    ./amc_setup -H myToken myMuleServer -A +http://$DOCKER_IP_ADDRESS:443/hybrid/api/v1+ -W "wss://AnypointPlatformHost:8889/mule" -C https://AnypointPlatformHost/accounts -F https://AnypointPlatformHost/apiplatform
    ```

The `amc_setup` command generates the `$MULE_HOME/conf/mule-agent.yml` file.

### PCE Runtime Manager amc\_setup Parameters

This table lists additional parameters required to register Mule with Anypoint Platform PCE Runtime
Manager. Append these parameters to the `./amc_setup -H _token_ _server-name_` command.

Do not use these parameters with the `-I` or `S` parameters to configure REST API connections.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Value</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>-A</code></p></div><div><p><code>--amc-host</code></p></div></div></td><td><div><div><p><code><em>amc-host</em></code></p></div></div></td><td><div><div><p>Specifies the service location URL of your local instance of Runtime Manager, for example, <code>https://10.0.0.1:443/hybrid/v1</code>.</p></div><div><p>You can test whether the service is available at <code><em>AMC_HOST</em>/hybrid/v1</code>.</p></div></div></td></tr><tr><td><div><div><p><code>-W</code></p></div><div><p><code>--mcm-host</code></p></div></div></td><td><div><div><p><code><em>mcm-host</em></code></p></div></div></td><td><div><div><p>Specifies the service location URL of your local instance of MCM, for example, <code>wss://10.0.0.2:8889/mule</code>.</p></div><div><p>You can test whether the service is available at <code><em>MCM_HOST</em>/mule</code>.</p></div></div></td></tr><tr><td><div><div><p><code>-C</code></p></div><div><p><code>--cs-host</code></p></div></div></td><td><div><div><p><code><em>core-services-host</em></code></p></div></div></td><td><div><div><p>Specifies the service location URL of your local instance of Access Management, for example, <code>https://10.0.0.3:443/accounts</code>.</p></div><div><p>You can test whether the service is available at <code><em>core-services-host</em>/accounts</code>.</p></div></div></td></tr><tr><td><div><div><p><code>-D</code></p></div><div><p><code>--contract-caching-service-host</code></p></div></div></td><td><div><div><p><code><em>contract-caching-service-host</em></code></p></div></div></td><td><div><div><p>Specifies the service location (URL) of your local instance of Contract Caching Service, for example, <code>https://10.0.0.4:8080</code>.</p></div></div></td></tr><tr><td><div><div><p><code>-F</code></p></div><div><p><code>--api-platform-host</code></p></div></div></td><td><div><div><p><code><em>api-platform-host</em></code></p></div></div></td><td><div><div><p>Specifies the service location URL of your local instance of API Manager, for example, <code>https://10.0.0.5:443/apiplatform</code>.</p></div><div><p>You can test whether the service is available at <code><em>API_PLATFORM_HOST</em>/apiplatform</code>.</p></div></div></td></tr><tr><td><div><div><p><code>-Z</code></p></div><div><p><code>--auth-proxy-host</code></p></div></div></td><td><div><div><p><code><em>auth-proxy-host</em></code></p></div></div></td><td><div><div><p>Specifies the service location URL of your Auth Proxy, for example, <code>https://10.0.0.3:8080</code>.</p></div></div></td></tr></tbody></table>

## Encrypt Passwords in an Existing mule-agent.yml File

If you didn’t set the `AGENT_VAR_master_password` environment variable when registering the agent
with Runtime Manager, you can encrypt the following passwords later in the `mule-agent.yml` file:

- `keystorePassword`: Keystore password used to access the `mule-agent.jks` file

- `keystoreAliasPassword`: Keystore alias password used to access the `mule-agent.jks` file

- `password`: Password used for authenticating with a proxy server

### Prerequisites

- Runtime Manager agent version 2.4.17

  To update previous versions of the agent, see [Update the Agent](#update-the-agent).

### Encrypt Passwords

To encrypt passwords in your `mule-agent.yml` file:

1.  Set the `AGENT_VAR_master_password` environment variable to the main password:

    `export AGENT_VAR_master_password=myPassword`

2.  Run the encryption utility:

    `$MULE_HOME/bin/amc_setup --encrypt`

    The encryption utility replaces the passwords in the `keystorePassword`,
    `keystoreAliasPassword`, and `password` fields in the `mule-agent.yml` file with the encrypted
    passwords, for example:

    ```yaml
    globalConfiguration:
      security:
        keyStorePassword: "![PBEWITHSHA1ANDDESEDE,Fe4kl2UBnGRoyh7H2v9lq+QSG7Pe6ZP8k34xmZEHmcAb1jABAwPLk2xWrGtSt1iE]"
        keyStoreAlias: agent
        keyStoreAliasPassword: "![PBEWITHSHA1ANDDESEDE,EtqRDPq7UTxDHzZGpOGazfcveEi832Pqm1mqhlwYRGLZGh9NSNXie6nAZr09b3iT]"
      authenticationProxy:
        endpoint: https://data-authenticator.anypoint.mulesoft.com:443
      proxyConfiguration:
        password: "![PBEWITHSHA1ANDDESEDE,VIs82yFDp66lnsL/Rss8q8js/zPDQ8+HJpdNepdZtA9obeDj5u+z4HIocsbLvXow]"
    ```

The encrypted passwords start with `!` and are enclosed in square brackets `[ ]`.

### Update and Reencrypt Passwords

To update an encrypted password in the `mule-agent.yml` file:

1.  Edit `mule-agent.yml`.

2.  Replace the encrypted password with the new plain-text password.

3.  Set the `AGENT_VAR_master_password` environment variable:

    `export AGENT_VAR_master_password=myPassword`

4.  Run the encryption utility:

    `$MULE_HOME/bin/amc_setup --encrypt`

### Display Passwords in mule-agent.yml in Plain Text

To display the passwords in `mule-agent.yml` in plain text, run the decryption utility:

`$MULE_HOME/bin/amc_setup --decrypt`

This command outputs the contents of the `mule-agent.yml` file with plain-text passwords.

### Update the Main Password

To update the main password:

1.  Run the decryption utility:

    `$MULE_HOME/bin/amc_setup --decrypt`

2.  Set the `AGENT_VAR_master_password` environment variable to the new main password:

    `export AGENT_VAR_master_password=myNewPassword`

3.  Run the encryption utility:

    `$MULE_HOME/bin/amc_setup --encrypt`

## See Also

- [Installing an Enterprise License](https://docs.mulesoft.com/on-premises/latest/installing-an-enterprise-license)

- [Starting and Stopping Mule](https://docs.mulesoft.com/on-premises/latest/starting-and-stopping-mule-esb)

- [Runtime - API Gateway](https://docs.mulesoft.com/mule-gateway/mule-gateway-overview)

- [Runtime Manager Agent Architecture](https://docs.mulesoft.com/runtime-manager/runtime-manager-agent-architecture)

- [Create a Server in Runtime Manager (Hybrid)](https://docs.mulesoft.com/runtime-manager/servers-create)

- [Anypoint Private Cloud Installers](https://docs.mulesoft.com/private-cloud/latest/install-workflow)
