How to download and install the Adapt Authoring Tool [Ubuntu Server]

This tutorial will walk you step by step through how to install Adapt Authoring Tool on a Ubuntu 22.04 LTS server. Everything from installing the prerequisites, through to accessing the tool in the web browser.

How to download and install the Adapt Authoring Tool [Ubuntu Server]

Introduction

This tutorial will walk you step by step through how to install Adapt Authoring Tool on a Ubuntu 22.04 LTS server. Everything from installing the prerequisites, through to accessing the tool in the web browser.

💡
If you're just starting out or testing, I'd recommend following this tutorial with a Virtual Ubuntu Server or Desktop environment on a Virtual Box machine rather than your local Windows computer. This way you can easily destroy the Virtual machine without having to uninstall all of the prerequisites.

This tutorial assumes you already have a virtual machine or server ready to work with, and that you are familiar with the basics of using the terminal. This is tutorial written as a quick start guide and not an in-depth tutorial. For more detailed steps, follow the official documentation here.

Installing the Prerequisites

In your terminal, enter the following command to update your local package index.

sudo apt update 

Git

Git is a version control system, all you really need to know for the purpose of this tutorial is that it helps you to keep the Authoring tool up to date.

Git is distributed with Ubuntu 22.04 LTS and is likely already installed on a server, you can confirm this by running the following command:

git --version

If Git is not installed you can install it with:

sudo apt install git

Configure Git with your name and email address if needed:

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

Node.js

Think of node as the engine that drives the Adapt Authoring tool, as well as a way to install additional parts with NPM, which is installed when you install Node.

With the intention of keeping this tutorial snappy, I'm only going to show you one of many ways to install Node.js.

We're going to use nvm in this tutorial. nvm makes it easy to install and use different versions of Node via the terminal.

Run the following command which will download and run a script to install nvm.

If you want to audit the script first or find more info you can find that here

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash

Verify the install worked by running:

command -v nvm

If you get nothing back try closing the current terminal and open a new one, then run the command again. It should now return nvm.

Still not working? Find more detailed troubleshooting instructions here

Install the latest Node.js supported by Adapt, which is v14.19.0 (at the time of writing) by running the following command:

nvm install v14.19.0

Confirm node install:

node --version

Confirm npm install:

npm --version

Configuring Global NPM

When you install a script using npm install "-g" you're installing it globally on the system rather than in a local folder. This may cause an 'npm ERR! code EACCES' error. To prevent this, without having to install using SUDO which can cause problems later, run the following:

npm config set prefix '~/.local/'
prefix=~/.local/
mkdir -p ~/.local/bin
echo 'export PATH=~/.local/bin/:$PATH' >> ~/.bashrc
npm install -g packagename
For more information about these steps review the response to this question on Stack Overflow.

Grunt

Grunt is the task runner which handles all the necessary actions required to build the course.

We're going to install Grunt using NPM with the following command.

npm install -g grunt-cli

MongoDB

MongoDB is the database for the authoring tool.

As a reminder, the following steps are essentially a QuickStart guide, for a more detail set of instructions follow the official MongoDB guide here

Import the public key used by the package management system

Install gnupg if it isn't already.

sudo apt install gnupg

Import the MongoDB public GPG key:

curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
   --dearmor

The following steps apply to Ubuntu 22.04(Jammy) Check here for other systems https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/

Create a list file for MongoDB

echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

Reload the local package database

sudo apt update

Install the MongoDB packages

This will install the latest stable version of MongoDB packages.

sudo apt install -y mongodb-org

Start MongoDB

Now we need to make sure MongoDB is running before proceeding. Otherwise the subsequent steps wont work.

To start MongoDB:

sudo systemctl start mongod

Check MongoDB is now running

sudo systemctl status mongod

You should see something like 'Active:' active (running) since [...] if everything is working correctly.

If you want to start MongoDB automatically after rebooting the server run the following command:

sudo systemctl enable mongod

Installing Adapt

We need to download a copy of the Adapt Authoring tool to our server ready to run the install script.

First create a folder in your desired location for the Adapt Authoring files.

I created a folder in my users home directory called adapt.

mkdir adapt

Next move into the newly created directory and download the files we need from Github.

git clone https://github.com/adaptlearning/adapt_authoring.git

Once that's downloaded we're ready to run the first install script. Change into the adapt_authoring directory and run the following command:

cd adapt_authoring
npm install --production

When the installation is complete, it's worth running the following to fix vulnerabilities that are not breaking changes.

npm audit fix

Now we can install and configure the Authoring tool!

node install

Don't worry if you don't have the answers to all of the questions, you can change these after the install has completed successfully.

For Server name and database host, write 127.0.0.1. This the same as local host but should prevent errors.

When asked about using a full database connection URI, enter no, unless you intend to connect to a remote database

When you reach the end of the script you'll recieve a message which says the installation is completed and that you can start the application by running the following:

node server

Running the above command will start the node.js server, listening on the port you specified in the installation.

You should now be able to access the Adapt Authoring tool from your web browser. In your browser URL/search bar type the server IP, followed by the port number which the node server is listening on. For example:

192.168.0.1:5000

If everything has worked successfully you will see an Adapt sign-in page where you can login with the username and password you created for your Super Admin account.

🥳


Troubleshooting

If you run into problems during install, be sure to check the official documentation and forums for further help and explanations.

Failed to determine user's tenant!

If you get an error which says 'Failed to determine user's tenant!' follow the steps in this discussion to resolve it.