---
schema_version: "1"
id: 0bb65fbe696f2fadc2d7af5a187946836d075454a96c09851241a833f039d00d
title: Deploy a Mule Application to CloudHub
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/studio/deploy-mule-application-task.md
canonical_url: https://docs.mulesoft.com/studio/deploy-mule-application-task
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3fb42a4eab1834b91e983817767038d3eb64a9c37b66cf9daf655e3024160c44
description: MuleSoft Documentation Site
latest: true
---
---
product: Studio
---

# Deploy a Mule Application to CloudHub

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

Deploy your Mule application from Anypoint Studio to CloudHub, and redeploy it after you update the
code. Before you deploy, make sure that your application meets the CloudHub requirements.

## Before You Begin

To successfully deploy your Mule application to CloudHub, consider the following requirements:

- The host and port number of your HTTP Listener flow sources are properly configured.  
  If you’re using the HTTP Listener as sources for your flow, you must set its host to **0.0.0.0**
  and its port to **${http.port}**.  
  CloudHub then dynamically allocates a port at deployment time.

- All your external classes and resources are properly declared in the `mule-artifact.json` file of
  your Mule application.  
  Due to Mule 4.x classloading isolation mechanism, all external classes and resources must be
  explicitly declared in the "exportedPackages" and "exportedResources" fields on the
  mule-artifact.json file before packaging and deploying the application.

  See the [How to Export Resources](https://docs.mulesoft.com/mule-runtime/latest/how-to-export-resources) task to learn
  more about working with external resources in your Mule application.

- The Java version selected in your project must match the Java version of CloudHub to avoid
  deployment fails.

## Deploy to CloudHub

1.  Right click the project folder on your Package Explorer View.

2.  Select Anypoint Platform and then Deploy to CloudHub.  
    If you don’t have your Anypoint Platform credentials configured in Anypoint Studio, you must
    provide your log in information before continuing.

3.  Configure the CloudHub instance to which your application is being deployed.  
    Anypoint Studio uses your package name as the name for your application on CloudHub. This name
    is part of the domain of your deployed application.  
    For example, naming your application "deployment-1" makes your application public domain
    "deployment-1.cloudhub.io."  
    You can also configure the runtime version. By default, Studio uses the application version
    you’re using in your project during development.  
    To reduce compatibility risks, you must deploy to the runtime version used to create your Mule
    project or the closest alternative.

    Additionally you can configure the amount of worker and worker size for the CloudHub instance
    you’re going to use, enable Insight, static IPs, configure log levels, and properties
    placeholders for your application.

## Redeploy to CloudHub

After you deploy your application from Anypoint Studio for the first time, you can keep modifying
the application code and repeat the steps 1 and 2 to redeploy your updated application.  
When you get to the CloudHub instance configuration window, the "Overwrite Existing Application"
option would already be selected for you. This allows you to redeploy the application.

> [!NOTE] Learn more about
> [alternative ways to deploy your Mule application to CloudHub](https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub).

## See Also

- [Configure Anypoint Platform Credentials](https://docs.mulesoft.com/studio/set-credentials-in-studio-to)
