Over a million developers have joined DZone.

How to Deploy and Un-Deploy Mule Apps on a Customer-Hosted Runtime?

DZone's Guide to

How to Deploy and Un-Deploy Mule Apps on a Customer-Hosted Runtime?

Learn how to easily deploy and un-deploy Mule apps in a customer-hosted, on-premise runtime straight from Anypoint Studio in this tutorial.

· Integration Zone ·
Free Resource

Building integrations to CRM applications? Find out eight things that each product manager and technical executive should know in The CRM Integration Guide: 8 Things Experts Are Considering in Their API Strategy.


Once you have a runtime environment setup on-premise, you want to be able to deploy and un-deploy Mule apps. Let’s find out how easily can this be done and appreciate the beauty behind its simplicity.


This environment used is as following:

Source Code

You can find the source code of this project here.

Export App

Mule Developer is supposed to give the app packaged in a deployable archive to Mule Administrator. Mule Developer can do this straight from Anypoint Studio.


Start Mule Specifying Placeholder Value

This project is based off the environment aware project template. Therefore, you will need to pass an expected placeholder value when running the Mule runtime.

There are various ways to do so, but the simplest would be passing a parameter when running Mule from a command line.

C:\mule\onprem_servers\max\bin>mule -M-Dmule.env=Development


Make sure the placeholder value was fed as expected:

* Mule Runtime and Integration Platform                              *
* Version: 3.8.5 Build: de4fbf1e                                     *
* MuleSoft, Inc.                                                     *
* For more information go to                                         *
* http://www.mulesoft.com/mule-esb-enterprise                        *
*                                                                    *
* Server started: 18/08/17 1:37 PM                                   *
* JDK: 1.8.0_141 (mixed mode)                                        *
* OS: Windows 10 -  (10.0, amd64)                                    *
* Mule system properties:                                            *
*  - mule.base = C:\mule\onprem_servers\max                          *
*  - mule.env = Development                                          *
*  - mule.home = C:\mule\onprem_servers\max                          *

Deploy the App

The deployable archive has everything necessary within. Thus, app deployment is as easy as putting this into the apps folder of the Mule runtime.


Once the deployment is successful, you will see the deployable archive file was consumed and created an anchor file.


Un-deploy the App

Undeploying the app is done by removing the anchor file created after deployment above. Let’s see how it’s done.


You have now seen how easy it is to deploy and un-deploy app from a customer-hosted runtime. I reckon the beauty behind this simplicity is remarkable. There is no messing around with setup files, touching the Windows registry, deploying artifacts into a dependent proprietary database, etc. All it takes is creating a self-contained zip file that has everything necessary to run the app within. It is simple, lightweight, independent, and manageable. I hope everyone sees the beauty.

Your API is not enough. Learn why (and how) leading SaaS providers are turning their products into platforms with API integration in the ebook, Build Platforms, Not Products from Cloud Elements.

mulesoft ,deployment ,mule ,integration ,anypoint studio

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}