Node-RED on IBM Cloud

Node-RED

Flow-based programming for the Internet of Things

Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.

This instance is running as an IBM Cloud application, giving it access to the wide range of services available on the platform.

More information about Node-RED, including documentation, can be found at nodered.org.

Customising your instance of Node-RED

This instance of Node-RED is enough to get you started creating flows.

You may want to customise it for your needs, for example replacing this introduction page with your own, adding http authentication to the flow editor or adding new nodes to the palette.

To start customising your instance of Node-RED, you can either download the application locally or use IBM DevOps Services to edit and deploy your changes directly.

  • + Securing the editor

    When you first ran this application you were presented with some options to secure the editor. To change those options, you can set some environment variables from either the Bluemix console or the cf command-line

    The environment variables you can set are:

    • NODE_RED_USERNAME - the username to secure the editor with
    • NODE_RED_PASSWORD - the password to secure the editor with
    • NODE_RED_GUEST_USER - set to true to allow anonymous users to have read-only access to the editor
    Bluemix console
    1. On the Bluemix console page for this application, go to the 'Runtime' page and then the 'Environment Variables' section
    2. Add the required user-defined variables
    3. Click Save and restart your application
    cf command-line
    1. Run the command:
      cf set-env [APPLICATION_NAME] [ENV_VAR_NAME] [ENV_VAR_VALUE]
  • + Enabling Application Metrics for Node.js monitoring

    When you first ran this application you were presented with an option to enable monitoring of your Node-RED flows using the Application Metrics for Node.js dashboard. To change those options, you can set an environment variable from either the Bluemix console or the cf command-line

    When enabled, the Application Metrics for Node.js dashboard will be available at

    The environment variable you can set is:

    Bluemix console
    1. On the Bluemix console page for this application, go to the 'Runtime' page and then the 'Environment Variables' section
    2. Add the required user-defined variable
    3. Click Save and restart your application
    cf command-line
    1. Run the command:
      cf set-env [APPLICATION_NAME] [ENV_VAR_NAME] [ENV_VAR_VALUE]
  • + Adding new nodes to the palette

    There is a growing collection of additional nodes that can be added to the Node-RED editor. You can search for available nodes on the Node-RED library.

    To add a node to the editor you can either use the Palette Manager feature within the editor itself or manually edit the package.json file.

    Palette Manager
    1. Within the editor, select the Manage Palette option from the drop-down menu
    2. Go to the Install tab
    3. Search for the module you're interested in and click install
    Edit package.json
    1. Edit the file package.json and add the required node package to the dependencies section. The format is:
      "node-red-node-package-name":"x.x.x"
      Where x.x.x is the desired version number.
  • + Upgrading the version of Node-RED

    The application's package.json is setup to grab the latest stable release of Node-RED.

    To trigger an upgrade following a new release being made available:

    1. Set the NODE_MODULES_CACHE environment variable to false. You can either do this on your application's Bluemix console page (Runtime -> Environment Variables), or by using the cf command-line:
      cf set-env [APPLICATION_NAME] NODE_MODULES_CACHE false
    2. Trigger a restage of your application. This cannot be done using the Bluemix console, so the cf command-line should be used:
       cf restage [APPLICATION_NAME]
  • + Changing the static web content

    The page you are reading now is served as static content from the application. This can be replaced with whatever content you want in the public directory.

  • + Remove static web content and serve the flow editor from the root path

    In the file bluemix-settings.js, delete the httpStatic and httpAdminRoot entries.