---
schema_version: "1"
id: f868ad775d0395ed9a14b3fc2715f1fee880ffa1dd16d93410b165beb847e86a
title: Deploying Apps to Private Spaces
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/cloudhub-2/ch2-deploy-private-space.md
canonical_url: https://docs.mulesoft.com/cloudhub-2/ch2-deploy-private-space
source_site: docs.mulesoft.com
content_type: documentation
content_hash: a1cf1ec2861bc6eed7d5082fd999e59522c969edacf69df74873c5e263b2eecd
description: MuleSoft Documentation Site
latest: true
---
# Deploying Apps to Private Spaces

You deploy apps to a private space using Runtime Manager.

<table><tbody><tr><td class="icon"><i class="fa icon-important" title="Important"></i></td><td class="content">CloudHub 2.0 supports Mule runtime engine versions 4.3.x and later.</td></tr></tbody></table>

<table><tbody><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content">Runtime Manager doesn’t support deploying an application to CloudHub 2.0 or Runtime Fabric if the asset was previously <a href="https://docs.mulesoft.com/exchange/to-delete-asset" class="xref page">soft-deleted</a> in Exchange.</td></tr></tbody></table>

## [](#deploy-app-private-space)Deploy an App to a Private Space

1. From Anypoint Platform, select **Runtime Manager** > **Applications**.
2. Click **Deploy application**.
3. On the **Deploy Application** page:
    
    1. Enter the [name](#app-name-reqs) of the application.
        
        <table><tbody><tr><td class="icon"><i class="fa icon-important" title="Important"></i></td><td class="content">You cannot change the name of an app after you deploy it. To change the name, you must delete and redeploy the app using the new name.</td></tr></tbody></table>
    2. Select an application file:
        
        - To upload a Mule app JAR file from your system, select **Choose file > Upload file**.  
            File names can contain only letters, numbers, and underscores per guidelines on [unique package names](https://docs.oracle.com/javase/specs/jls/se6/html/packages.html#7.7).
        - To choose an example app from Anypoint Exchange:
            
            1. Select **Choose file > Import file from Exchange**.
            2. On the **Get from Exchange** page, enter `hello` in the **Search assets by name**:
                
                ![Get from Exchange page](/mulesoft/current/en-us/cloudhub-2/_images/rtm-get-from-exchange.png)
            3. Click **Hello World** and then click **Select**.
    3. Select the name of the private or shared space from the **Deployment Target** list.
    4. Configure options for deployment:
        
        - [Specify runtime options](#specify-runtime-options).
        - [Configure endpoints and paths for the app](#configure-endpoint-path).
        - [Change app behavior with properties](#app-properties).
        - [Configure logging for the app](#configure-logging).
4. Click **Deploy Application**.

### [](#specify-runtime-options)Specify Runtime Options

Click the **Runtime** tab and specify the following options:

Runtime version

Specifies the Mule runtime engine version. Versions 4.3.x, 4.4.x, 4.5.x, and 4,6.x are supported.

Release Channel

Starting with Mule 4.5, MuleSoft introduces two new release channels, [Edge and Long-term Support (LTS)](https://docs.mulesoft.com/release-notes/mule-runtime/lts-edge-release-cadence).

For new applications, the Edge channel is selected by default in the **Release Channel** drop-down menu.

For existing applications using a legacy version, the **Release Channel** drop-down list is selected as `None` by default. Use the **Release Channel** drop-down list to select the desired release channel.

For existing applications using an Edge version, the **Release Channel** drop-down list is selected as `Edge`. The **Runtime Version** dropdown list indicates if there is an update available, as well as the previous and latest version of the application. Use the **Release Channel** drop-down list to change to a legacy version.

For existing applications using an Edge or an LTS version on extended support, a warning message appears indicating the version’s EOL.

<table><tbody><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content">After End of Extended Support for Mule runtime 4.3 and 4.4, Mule applications deployed to CloudHub or CloudHub 2.0 environments are stopped.</td></tr></tbody></table>

Java Version

Select the Java version for your application. For more information, visit [Java Support](https://docs.mulesoft.com/general/java-support).

Replica size

Specifies the number of vCores in the replica to run your application.

For information on replica sizes, memory, and storage, see [CloudHub 2.0 Replicas](https://docs.mulesoft.com/cloudhub-2/ch2-architecture#cloudhub-2-replicas). CloudHub 2.0 limits the replica size per deployment to four vCores.

Replica Count

Specifies the number of replicas, or instances, of the application to deploy.

A minimum of two replicas is required for high availability.

Run in Runtime Cluster Mode

Enables [Mule clustering](https://docs.mulesoft.com/cloudhub-2/ch2-clustering) across each replica of the application.

This option requires at least two replicas.

Use Object Store V2

You can select [Object Store v2](https://docs.mulesoft.com/object-store/) as the implementation by checking the **Use Object Store V2** checkbox.

Deployment model

- **Rolling update**:
    
    - Maintains availability by incrementally updating replicas.
- **Recreate**:
    
    - Terminates replicas before redeployment.
    - Redeployment is faster and doesn’t require additional resources.

## [](#configure-endpoint-path)Configure Endpoints and Paths for the App

For more information, see [Configuring Endpoints and Paths for Apps Deployed to a Private Space](https://docs.mulesoft.com/cloudhub-2/ch2-config-endpoints-paths).

To configure endpoints for the app to enable access from the internet:

1. Click the **Ingress** tab and specify the following options:
    
    Endpoint
    
    - **Host**: Select the domain, such as `cloudhub.io`, for the app from the drop-down list.
        
        <table><tbody><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content">If you select <code>cloudhub.io</code> (the default domain), you can’t select a subdomain or path.</td></tr></tbody></table>
        
        The administrator configures the domains and certificates (TLS context) for the private space. See [Configuring Domains and Certificates (TLS Context) for a Private Space](https://docs.mulesoft.com/cloudhub-2/ps-config-domains).
        
        After you select the domain for a private space, you can view the corresponding TLS context by clicking **View TLS Context**:
    - **Subdomain**: If the domain you selected includes a wildcard, you can configure the subdomain.
        
        Subdomains must start and end with an alphanumeric character and can contain only alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), underscores (-), and periods (.).
        
        Subdomains support [placeholders](#placeholder-table). The default subdomain is `app-name`, which resolves to the name of the app that you specified in the **Application Name** field when you deploy the app.
    - **Path**: specifies the URL path to the application endpoint.
        
        Paths must start and end with an alphanumeric character and can contain only alphanumeric characters, hyphens, and underscores.
        
        Paths support [placeholders](#placeholder-table).
    - To add an endpoint, click **Add Endpoint** and specify options.
    - To remove an endpoint, click the **X** in the endpoint row.
    
    <table><tbody><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content">Depending on the control plane you’re deploying to, the endpoint URL format requires the region suffix before <code>cloudhub.io</code> or not. For applications deployed to the US control plane, don’t add the region suffix, for example: <code>https://<strong>.10u6w7.usa-e1.cloudhub.io</strong></code><strong>. For applications deployed to any of the other control planes, add the corresponding region suffix, for example: <code>https://</code></strong><code>.10u6w7.usa-e1.eu1.cloudhub.io</code>.</td></tr></tbody></table>
    
    Path Rewrite
    
    If the HTTP Listener in your app listens on a different path than the path defined in **Endpoints**:
    
    1. Enable the **Rewrite Request Paths** option.
    2. Enter the target path expected by your app.
        
        Requests sent to your app use the path that you specify here.
        
        Check these examples to see how the private space rewrites the path:
    
    **Application endpoint 1:**
    
    ```console
    https://sapi-one-o4azsf.2x9yyp.usa-e2.cloudhub.io/acct
    ```
    
    **Path rewrite 1:**
    
    ```console
    /version1
    ```
    
    **Application endpoint 2:**
    
    ```console
    https://sapi-one-o4azsf.2x9yyp.usa-e2.cloudhub.io/acct/moreInfo
    ```
    
    **Path rewrite 2:**
    
    ```console
    /version1/moreInfo
    ```
    
    TLS Options
    
    - **Forward SSL Session**
        
        Enables SSL forwarding during a session.
        
        SSL forwarding is mostly used with client authentication. See [Enable Client Authentication](https://docs.mulesoft.com/anypoint-security/enable-client-authentication). SSL forwarding forwards client certificate details in HTTP request headers so they are available to the application. These fields can identify an authenticated client and allow an application to determine and use the identity.
        
        The following headers are available:
        
        <table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Header Name</th>
<th class="tableblock halign-left valign-top">Value</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>x-ssl-client-verify</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>SUCCESS/FAIL</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>x-ssl-issuer</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Client certificate issuer</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>x-ssl-client-serial</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Client certificate serial number</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>x-ssl-client-dn</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Contents of the client certificate DN field</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>x-ssl-client-cert</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Contents of the client certificate</p>
</div></div></td>
</tr>
</tbody>
</table>
    - **Last-Mile Security**
        
        Specifies that TLS termination and decryption for the forwarded HTTPS connections occurs in the application.
        
        This option requires that the Mule application include an SSL certificate and also requires more CPU resources.
2. Click **Deploy Application** to create a new configuration for your application.

### [](#app-name-reqs)Application Names

The application name you specify can contain between 3 and 42 alphanumeric characters (a-z, A-Z, 0-9) and dashes (-). They cannot contain spaces or other characters. The application name must start with a letter (a-z or A-Z). It cannot start with a number or dash and it cannot end with a dash.

To ensure that names are unique and avoid domain conflicts, CloudHub 2.0 adds a six-character `_unique-id_` to the application name that you specify in the public endpoint URL.

The application name identifies your application not only in Runtime Manager but also in the public `cloudhub.io` domain. For example, an application named `myapp` is accessible at `http://myapp-_unique-id_._shard_.usa-w2.cloudhub.io`. You must have unique application names for each deployment target.

To further customize your app names, you can create a naming convention. For example, you could prepend your company name and department to all application names, such as `mycompany-mydept-myapp`. You can then add DNS records to hide the complex application name. For example, you might route requests to `myapp.mycompany.com` to `mycompany-mydept-myapp-_unique-id_._shard_._region_.cloudhub.io`.

Make application file names as unique as possible. An app cannot be deployed if it shares the same name as an asset in Exchange.

### [](#placeholder-table)Placeholders

The subdomain and path support the following optional lowercase placeholders:

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 66.6667%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Placeholder</th>
<th class="tableblock halign-left valign-top">Resolves to</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>app-name</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the app that you specified in the <strong>Application Name</strong> field when you deploy the app</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>business-group-id</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Business group ID associated with the app</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>environment-id</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Environment that you deploy the app to</p></td>
</tr>
</tbody>
</table>

## [](#app-properties)Change App Behavior with Properties

You can configure property values, such as specifying the environment or setting passwords and usernames, during app deployment.

For information about configuring app properties, see:

- [Changing App Behavior with Properties](https://docs.mulesoft.com/cloudhub-2/ch2-manage-props)
- [Protecting App Property Values](https://docs.mulesoft.com/cloudhub-2/ch2-protect-app-props)

## [](#configure-logging)Configure Logging for the App

Logging is enabled by default for apps deployed to CloudHub 2.0.

### [](#disable-or-enable-logging)Disable or Enable Logging

To disable or reenable logging for the app:

1. Click the **Monitoring** tab.
2. Deselect or select the **Forward application logs to Anypoint Platform** option.
3. Click **Apply Changes**.

If you disable logging, the **Logs** heading still appears in the Runtime Manager navigation menu, but application logs are not collected.

### [](#configure-log-levels-and-categories)Configure Log Levels and Categories

To configure additional log levels and categories to include in logs:

1. Click the **Monitoring** tab.
2. Select the log level:
    
    - **INFO**: Informative messages
    - **DEBUG**: Debugging messages
    - **WARNING**: Warning messages
    - **ERROR**: Error messages, such as when an exception occurs
    - **FATAL**: Fatal messages for when an application fails
3. Optionally, set the log level for specific a Java package class by selecting the log level, entering the `package.name`, and pressing the Enter key.
4. Click **Apply Changes**.

<table><tbody><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content">Changing the log level and clicking <strong>Apply Changes</strong> restarts the application.</td></tr></tbody></table>

## [](#enable-trace-data-collection)Enable Trace Data Collection

<table><tbody><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content">This feature is available only if your organization has the Anypoint Integration Advanced package or a Titanium subscription to Anypoint Platform. For more information, see the <a href="https://docs.mulesoft.com/general/pricing" class="xref page">Pricing and Packaging</a> documentation.</td></tr></tbody></table>

Traces enable you to understand the path of a transaction in the MuleSoft ecosystem by providing full visibility into the execution path of API calls or application transactions. When you enable trace data collection for an app, Anypoint Platform collects and exposes tracing information from Mule runtime engine in the OpenTelemetry standard, enabling you to export it using the Anypoint Monitoring [Telemetry Exporter](https://docs.mulesoft.com/monitoring/telemetry-exporter).

You can enable trace data collection for your CloudHub 2.0 applications running on Mule version 4.6 or later. You can’t enable trace data collection using the Mule Maven plugin, Anypoint CLI, or Anypoint Studio. You can enable trace data collection using only the UI and API.

To enable trace data collection for an app:

1. Click the **Monitoring** tab.
2. Select the **Enable tracing** checkbox.
3. Click **Deploy Application** if you are enabling the feature for a new deployment, or **Apply Changes** if you are editing an existing application.

Once you enable tracing, and redeploy your application, the Runtime Manager backend starts instrumenting traces for your application.

## [](#see-also)See Also

- [Downloading Test Apps from Exchange](https://docs.mulesoft.com/cloudhub-2/ch2-download-test-app)
- [Example Assets provided by MuleSoft](https://anypoint.mulesoft.com/exchange/?view=grid&type=example&search=&organizationId=68ef9520-24e9-4cf2-b2f5-620025690913) on Exchange
- [Configuring Endpoints and Paths for Apps Deployed to a Private Space](https://docs.mulesoft.com/cloudhub-2/ch2-config-endpoints-paths)
- [Configuring Domains and Certificates (TLS Context) for a Private Space](https://docs.mulesoft.com/cloudhub-2/ps-config-domains)
- [Integrating with Your Logging System Using Log4j](https://docs.mulesoft.com/cloudhub-2/ch2-integrate-log-system)