Installing Sunbird Portal

Edit | Report


The Sunbird portal application is powered by a set of Service APIs. These Service API(s) run in a distributed environment. This section explains the procedure to install and configure Sunbird portal web application that uses the cloud-hosted Sunbird backend services stack the Sunbird Service API(s).These APIs are hosted by project Sunbird and are used for testing and demonstration purposes.

The cloud instance of the API(s) hosted by Project Sunbird are not for production usage. The Sunbird developer installation can be best viewed via the Google Chrome browser. Although, other browsers may be used, but some pages might not render correctly.

Intended Audience

The intended audience of this document is a person who is familiar with installing, configuring, and deploying nodejs based open-source software.


  1. Software: Install the following software:
    • node - Install the release version 8.11.2 LTS

    • nodemon - Latest version

    • git - Latest version - On WINDOWSR, perform the installation via the Git Bash shell. Performing the installation via native commandline terminal (cmd.exe) or PowerShell is not recommended.

    • gulp - Install gulp via npm, which gets installed when nodejs is installed

    • WINDOWS(R) users install @angular/cli thru npm

  2. API Keys The Sunbird developer instance is powered by cloud hosted Sunbird APIs, which require an API key. To get an API key, submit an API Key Request. In the form, provide information about your team and what brings you to Sunbird.

It may take up to a couple of business days (IST) to send you the API key. We regret the inconvenience caused due to such delays.

Set up the Application

These instructions install Sunbird version 1.10.1. The code examples provided here are Linux based. However, they should not differ when executed on Windows(R).

  1. Launch a command-line terminal

  2. Ensure that the system PATH variable contains the paths where git, node, nodemon and gulp are located

If you are unable to find an executable with the name node, check for nodejs

  1. Change the directory into the folder that you have designated as the top level folder of the Sunbird application

  2. Clone the Sunbird portal github repository using the following command:

     git clone
  3. Checkout the files tagged with version 1.10.1 using the following commands:

     cd sunbird-portal
     git checkout tags/v1.10.1 -b 1.10.1
  4. Build the nodejs packages that are required by the Sunbird application using the following commands:

     cd src/app
     npm install
     gulp download:editors
     cd client
     npm install

Configuring the Environment and Services Stack

  1. Configure the following system environment variables in the terminal which you have opened
Environment Variable Value Data Type
sunbird_environment local string
sunbird_instance sunbird string
sunbird_default_channel sunbird string
sunbird_default_tenant sunbird string

The initialization of these environmental variables can take place in a common place like in your .bashrc or .bash_profile

  1. Edit the file sunbird-portal/src/app/helpers/environmentVariablesHelper.js and ensure that the following tokens are set to the values indicated. Enclose all string values within double quotation marks. Add any token, that is mentioned in the table, but which is not present in the environmentVariablesHelper.js file.
Token Value Data Type
DEFAULT_CHANNEL sunbird string
PORTAL_API_AUTH_TOKEN (The API key you received from your API key request) string
PORTAL_ECHO_API_URL (empty string) string
PORTAL_PORT 3000 number
PORTAL_REALM sunbird string

Run the Application

  1. Update the Sunbird application with the modified configuration file values. Run the following command in the sunbird-portal/src/app/client folder:

  2. Wait for the following message before proceeding to the next step

     [nodemon] clean exit - waiting for changes before restart
  3. Open a new commmand-line window and run the application server and populate the following system environment variables once again

Environment Variable Name Value Data Type
sunbird_environment local string
sunbird_instance sunbird string
sunbird_default_channel sunbird string
sunbird_default_tenant sunbird string
  1. Run the following commands to change to the application directory and start the server

     cd sunbird-portal/src/app
     node server.js
  2. Launch the Google Chrome browser and navigate to


Login into the Sunbird portal

After successfully installing Sunbird use any of the following user IDs, the password to which you should have recieved along with the API key, to explore Sunbird’s workflows. Each user ID corresponds to a specific role.

User ID Role
adopterorgadmin@adopter Org administrator
adoptercreator@adopter Content creator
adopterreviewer@adopter Content reviewer
adopterbookcreator@adopter Boook creator
adopterbookreviewer@adopter Book reviewer
adopterflagreviewer@adopter Flag reviewer
adoptercoursementor@adopter Course mentor

Edit | Report