To install Learning Locker using our deploy script, please follow the below instructions.
For more information, you can view the deployment repository’s documentation.

You must run this script as root user. Typically this can be done by running sudo su -

Install with cURL

curl -o- -L > && bash

Install with Wget:

wget -qO && bash


You may choose to upgrade your Learning Locker to take advantage of new features and bug fixes. To make this process easier, it is strongly recommended that any Learning Locker running for production use has the database (Mongo) running on different servers to that of the application. This means you can seamlessly update your application without having to move your data.

You can run the install script below on your existing EC2 server and that will grab and rebuild the code directly on the server. Please note: this requires an EC2 instance with at least 2GB of RAM. You will be asked if you wish to “upgrade” any existing instance, or perform a fresh install.

If you plan on keeping the Mongo database on the same server as the application, you will need to perform a backup and restoration of your Mongo data between upgrades. For this reason we strongly recommend placing your database separate to your application.


By default, logs are written to /var/log/learninglocker/


If there is a problem installing the script, you can view the full install log output here: /var/log/learninglocker/install.log


Individual logs for the different services outputs (stdout) and errors (stderr) are available in this directory under the following names:


  • xapi_stdout***.log

  • api_stdout***.log

  • ui_stdout***.log

  • worker_stdout***.log


  • xapi_stderr***.log

  • api_stderr***.log

  • ui_stderr***.log

  • worker_stderr***.log

  • **

Logs may have slightly different names due to rotation


To restart the services, simply run the following command:

service pm2-learninglocker restart

Where learninglocker is the system user you chose to install with in the script (defaults to learninglocker)


The PM2 service manages the 4 micro-services that Learning Locker requires. This is installed by default with the install script under the system user you chose.

In order to use the pm2 service, first ensure you are in as the correct system user:

(using the default learninglocker system user):


To view the status of your processes (using the default learninglocker system user):



You can view a tail of the logs by running:

Or view the logs for a particular service (by name or ID):

To view more lines:


You can restart all the services by running:

Or individual services by their name or ID:


There are two main repositories that are installed as part of a fresh Learning Locker installation, the Learning Locker application and xAPI service. An in depth look at what both these packages do can be read in the Architecture Overview.

When installing your LL instance using the install script, these packages will be (by default) installed to /usr/local/learninglocker/current (as a symlink to a directory inside /usr/local/learninglocker/release/...).

Inside current/webapp/ lives the Learning Locker application which controls the User Interface, API and worker.

We also install the xAPI Service here, inside the current/xapi/ directory.


Each of these applications has their own .env. These hold all the configurations that the applications require in order to run, from database settings to logging configuration.

By default the install script will copy the (.env.example) from both repos respectively.

It is likely you will wish to configure your application to connect to external databases, and whilst setup and configuration of these is beyond the scopes of this documentation, you will need to ensure that both .env files contain the same configuration values where appropriate.

A full description of all configuration values in both repositories is available in the Configuration Guide


For production installations, we recommend the minimum configuration:

This setup ensures good performance and a reasonable degree of redundancy in case of failures in some parts. Depending on the scale of data you are ingesting and processing you will need to scale up the numbers of servers and may consider separating the API and Worker processes across different server groups. We recommend that you back up your Mongo database regularly depending on your own data requirements.

If this sounds too costly or challenging, you may wish to consider using the Learning Pool Data Cloud SaaS enterprise solution. If you require more advice for your setup, please get in touch via


Please follow instructions here if you wish to install Learning Locker manually.

Learning Locker and the Squirrel logo are trademark of Learning Pool 2020 | Learning Locker is licensed under GPL 3.0.