---
schema_version: "1"
id: 37a0bc8aaa4821001b1cbc70998a7b1fee044fd4327cbbacaa7f6eb0080c3d9e
title: Manage Properties for Applications on CloudHub
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/cloudhub/cloudhub-manage-props.md
canonical_url: https://docs.mulesoft.com/cloudhub/cloudhub-manage-props
source_site: docs.mulesoft.com
content_type: documentation
content_hash: ecb18ac162a7e3a3c67befe32c2c85c59f97cf3a4ffc632af2b1fe9dd28d1cc4
description: MuleSoft Documentation Site
latest: true
---
---
product: CloudHub
---

# Manage Properties for Applications on CloudHub

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

In a CloudHub deployment, you can add properties to an application by using either Anypoint Runtime
Manager or a properties file.

If you set properties both in the properties file in your application and in Runtime Manager, the
values set in Runtime Manager always override the values in the properties file when your
application deploys.

## Add Application Properties in Runtime Manager

The easiest way to load properties to applications deployed to CloudHub is to use the **Properties**
tab in Anypoint Runtime Manager.

To add properties:

1.  From Anypoint Platform, select **Runtime Manager**.

2.  Click the **Applications** tab.

3.  Click the **Status** column to display the details pane.

4.  Click **Manage Application**.

5.  On the **Settings** page, click the **Properties** tab:

    ![\*Properties\* tab](/mulesoft/current/en-us/cloudhub/_images/cloudhub-app-props.png)

    Figure 1. The screenshot shows (**1**) the **Properties** tab, (**2**) the **List** button,
    (**3**) the key and value fields, and (**4**) the **X** icon on the application **Settings**
    page.

6.  Click **List**.

    Alternatively, you can enter the key-value pair in the **Text** field in this format:
    `key=value`.

7.  Enter the property name in the key field.

8.  Enter the property value in the value field.

    If the save password feature of Chrome is enabled and includes a username for
    `anypoint.mulesoft.com` that matches the contents of the key field, Chrome overwrites the value
    field with the stored password associated with that username. To work around this limitation,
    use Chrome in incognito mode or use another browser.

9.  If you want to change a key or value, edit the text in the field.

10. If you want to delete a property, click **X**.

11. Click **Apply Changes**.

12. Select **Restart** from the menu in the top right to restart the application.

### Example: Using Properties to Set Environment Variables

You can specify Java system environment variables, which function the same as adding environment
variables when you deploy to an on-premises server.

You can also configure environment variables for your application. Properties enable you to
externalize settings that change depending on the environment you’re deploying to. For example, if
you use a Mule application locally, you might configure your database host to be `0.0.0.0`. If you
deploy the same app to CloudHub, you might configure the database host to be an Amazon RDS server.

To create or set an environment variable using an application property:

1.  From Anypoint Platform, select **Runtime Manager**.

2.  Click the **Applications** tab.

3.  Click the **Status** column to display the details pane.

4.  Click **Manage Application**.

5.  On the **Settings** page, click the **Properties** tab:

6.  Define the variable by entering it in the **Text** view, in `key=value` format:

    ![\*Properties\* tab on the \*Settings\* page](/mulesoft/current/en-us/cloudhub/_images/rtm-env-variables.png)

    Figure 2. The arrow shows the variable on the **Properties** tab of the application **Settings**
    page.

    > [!NOTE] In the **Text** view, use the backslash character (`\`) as an escape character. For
    > example, to use `:` in a key or value, use `\:` in the syntax. To use `\` in a key or value,
    > use `\\` in the syntax. **List** view syntax requires no escape character.

7.  Use the environment variable in your Mule app configuration.

## Add Application Properties Using a Properties File

You can add properties to an app by including property placeholder YAML file in the deployable
application archive file. See
[Configuring Properties](https://docs.mulesoft.com/mule-runtime/latest/configuring-properties).

CloudHub then loads these properties into the application when the application starts.

Although this method is not the best practice on CloudHub (because CloudHub **Properties** tab
values override any with the same name in the file), you can work around this by changing options in
the Mule app.

To prevent CloudHub properties from overriding properties bundled with the deployable archive,
change options in the `property-placeholder` element in the Mule application. For more information
about nondefault property placeholder options, see the
[Spring documentation on Property Placeholder options](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.html).

## CloudHub Reserved Properties

CloudHub reserves a set of properties and prevents apps from overwriting the values of those
properties. If an application attempts to assign a value to a reserved property, CloudHub doesn’t
use the assigned value. Instead, it returns the value as set internally, without throwing an error
or exception, and adds a warning message to the log.

Applications can reference reserved properties, for example, to retrieve the application name or
deployment region. Use the `${csorganization.id}` and `${environment.id}` properties to retrieve
those values if your app makes Anypoint Platform API calls. Use `${worker.id}` to identify each
worker in a multiworker application.

> [!IMPORTANT] Do not use the `${spring.profiles.active}` and `${logging.*}` properties.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Property</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>${java.vendor}</code></p></div></div></td><td><div><div><p>Vendor providing the JVM</p></div></div></td><td><div><div><p>Oracle Corporation</p></div></div></td></tr><tr><td><div><div><p><code>${java.runtime.name}</code></p></div></div></td><td><div><div><p>JVM name</p></div></div></td><td><div><div><p>Java™ SE Runtime Environment</p></div></div></td></tr><tr><td><div><div><p><code>${java.version}</code></p></div></div></td><td><div><div><p>JVM version, excluding the dot (point) release.</p></div><div><p>If a CloudHub runtime release upgrades the JDK, this value changes.</p></div></div></td><td><div><div><p>1.8.0_141</p></div></div></td></tr><tr><td><div><div><p><code>${csorganization.id}</code></p></div></div></td><td><div><div><p>Main or business group ID</p></div></div></td><td><div><div><p>09396371-2cd4-412e-8d08-4356dd3e7bfc</p></div></div></td></tr><tr><td><div><div><p><code>${environment.id}</code></p></div></div></td><td><div><div><p>Environment ID</p></div></div></td><td><div><div><p>52a69d49e4b0e3c7324ae5b6</p></div></div></td></tr><tr><td><div><div><p><code>${environment.type}</code></p></div></div></td><td><div><div><p>Environment type</p></div></div></td><td><div><div><p>production</p></div></div></td></tr><tr><td><div><div><p><code>${worker.id}</code></p></div></div></td><td><div><div><p>Worker ID (for multiworker apps)</p></div></div></td><td><div><div><p>0</p></div></div></td></tr><tr><td><div><div><p><code>${domain}</code></p></div></div></td><td><div><div><p>App name</p></div></div></td><td><div><div><p><code>ch-https-41-demo</code></p></div></div></td></tr><tr><td><div><div><p><code>${fullDomain}</code></p></div></div></td><td><div><div><p>Full domain name of app</p></div></div></td><td><div><div><p><code>ch-https-41-demo.au-s1.cloudhub.io</code></p></div></div></td></tr><tr><td><div><div><p><code>${application.aws.region}</code></p></div></div></td><td><div><div><p>App deployment region</p></div></div></td><td><div><div><p><code>ap-southeast-2</code></p></div></div></td></tr><tr><td><div><div><p><code>${http.port}</code></p></div></div></td><td><div><div><p>HTTP port</p></div></div></td><td><div><div><p>8081</p></div></div></td></tr><tr><td><div><div><p><code>${https.port}</code></p></div></div></td><td><div><div><p>HTTPS port</p></div></div></td><td><div><div><p>8082</p></div></div></td></tr><tr><td><div><div><p><code>${http.private.port}</code></p></div></div></td><td><div><div><p>HTTP private port</p></div></div></td><td><div><div><p>8091</p></div></div></td></tr><tr><td><div><div><p><code>${https.private.port}</code></p></div></div></td><td><div><div><p>HTTPS private port</p></div></div></td><td><div><div><p>8092</p></div></div></td></tr><tr><td><div><div><p><code>${mule.home}</code></p></div></div></td><td><div><div><p>Absolute path to Mule installation</p></div></div></td><td><div><div><p><code>/opt/mule/mule-4.1.1</code></p></div></div></td></tr><tr><td><div><div><p><code>${spring.profiles.active}</code></p></div></div></td><td><div><div><p>Used internally, <strong>do not use</strong></p></div></div></td><td><div><div><p><code>***</code></p></div></div></td></tr><tr><td><div><div><p><code>${logging.*}</code></p></div></div></td><td><div><div><p>Used internally, <strong>do not use</strong></p></div></div></td><td><div><div><p><code>***</code></p></div></div></td></tr><tr><td><div><div><p><code>${host}</code></p></div></div></td><td><div><div><p>Used internally for the local IP address of a worker</p></div></div></td><td><div><div><p><code>10.40.122.33</code></p></div></div></td></tr><tr><td><div><div><p><code>${anypoint.url}</code></p></div></div></td><td><div><div><p>Used internally as the base Anypoint Platform URL</p></div></div></td><td><div><div><p>US: <code>https://anypoint.mulesoft.com</code></p></div><div><p>MuleSoft Government Cloud: <code>https://gov.anypoint.mulesoft.com</code></p></div></div></td></tr></tbody></table>

> [!NOTE] For proprietary reasons, MuleSoft doesn’t make public all internal, reserved properties.
> CloudHub runtime release updates might change the reserved properties.

### Non-reserved Pre-populated Properties

Mule runtime pre-populates the values for the following two properties. However, you have the option
to overwrite these pre-filled values.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Property</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>${app.name}</code></p></div></div></td><td><div><div><p>The name of the application <code>.jar</code> file.</p></div></div></td><td><div><div><p>myApplication</p></div></div></td></tr><tr><td><div><div><p><code>${app.home}</code></p></div></div></td><td><div><div><p>The root directory of the application during run time.</p></div></div></td><td><div><div><p>/opt/mule/mule-4.3.0/apps/myApplication</p></div></div></td></tr></tbody></table>

### Example: Retrieve the Values of Reserved Properties

```xml
<set-payload value="java.vendor=${java.vendor}, java.runtime.name=${java.runtime.name}, java.version=${java.version}, application.aws.region=${application.aws.region},
      http.port=${http.port}, http.ports=${http.port}, mule.home=${mule.home}, csorganization.id=${csorganization.id}, environment.id=${environment.id},
      environment.type=${environment.type}, worker.id=${worker.id}, domain=${domain}, fullDomain=${fullDomain}" doc:name="Set Payload"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
```

Example output:

```console
16:33:08.572     07/02/2020     Worker-0     [cloudhub-reserved-properties].HTTP_Listener_Configuration.worker.01     INFO
   java.vendor=Oracle Corporation, java.runtime.name=Java(TM) SE Runtime Environment, java.version=1.8.0_141, application.aws.region=ap-southeast-2,
   http.port=8081, http.ports=8081, mule.home=/opt/mule/mule-4.3.0, csorganization.id=09396371-2cd4-412e-8d08-4356dd3e7bfc, environment.id=52a69d49e4b0e3c7324ae5b6,
   environment.type=production, worker.id=0, domain=cloudhub-reserved-properties, fullDomain=cloudhub-reserved-properties.au-s1.cloudhub.io
```

## See Also

- [Configuring Properties](https://docs.mulesoft.com/mule-runtime/latest/configuring-properties)

- [Deploy to CloudHub](https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub)

- [Develop Applications for CloudHub](https://docs.mulesoft.com/cloudhub/developing-applications-for-cloudhub)

- [Safely Hide Application Properties](https://docs.mulesoft.com/cloudhub/secure-application-properties)
