2. Copy MATLAB App

We will begin by first copying over a pre-built MATLAB app in production at OSC.


This example MATLAB app will not work out of the box and requires each center to develop and maintain it themselves. The goal of this tutorial is to:

  • get a working MATLAB app running at your center

  • introduce you to app development and make you an Interactive App developer

  1. We do all of our app development in our Open OnDemand sandbox directory. So we first need to create our sandbox directory:

    mkdir -p "${HOME}/ondemand/dev"


    Open OnDemand looks for apps in special directories on the file system. Two types of apps in particular are system apps and sandbox apps.

    system apps

    These are apps that all users have access to and appear in the Dashboard dropdown menus. They are installed on the local disk with very permissive file permissions.

    Located on the file system under:


    This system app can be accessed by navigating in your browser to:


    If this is a system Interactive App (Dashboard plugin), then it can be accessed by navigating to:

    sandbox apps

    These are apps that only the owner of the app can access irrespective of file permissions. Typically you develop apps in your sandbox before moving them to the production system location.

    Located on the file system under:


    Can be accessed by navigating in your browser to:


    Note that we just replaced sys with dev in the URL when going from system app to sandbox app.

    If this is a sandbox Interactive App (Dashboard plugin), then it can be accessed by navigating to:


    Notice that we are using the system dashboard to launch the sandbox Interactive App (Dashboard plugin).

  2. After creating the sandbox directory navigate in your browser to:


    You should now see a Develop dropdown menu option in the top right of the dashboard.

  3. Open up the Develop menu dropdown and click the link My Sandbox Apps (Development).

  4. You will navigate to a page that lists all of your sandbox apps (all the apps in your sandbox directory). For now click New App in the top left of the page.

  5. Currently there is only one option for building new apps and that is to “Clone an existing app”. Click the button Clone Existing App.

  6. Now we are presented with a form that describes how we will clone the app.

    Directory name

    this is the directory that the app will be cloned to in our sandbox directory (must be unique)

    Git remote

    this is the link to the git repo that is cloned

    Create a new Git Project from this?

    whether we want to create a new app from this git repo

    For now fill in the form with the following values:

    Directory name


    Git remote


    Create a new Git Project from this?

    check this!

    Then click Submit.

  7. You should now see a details view of the MATLAB app you just created. If you click Launch MATLAB it should open a new tab with the following warning:

    This app requires a cluster that does not exist.

    If you see this warning message then continue on.


A bug was introduced in 1.4 where an “invalid” interactive app will hide the Launch button in the developer views. This was fixed in 1.5.

A work around is to manually enter the URL to the batch connect app. In this MATLAB tutorial, if the directory name is “bc_my_center_matlab” then the URL will be /pun/sys/dashboard/batch_connect/dev/bc_my_center_matlab.