In this section we are going to make our local system ready to install and develop the demo projects.


If Node.js, NPM and Java v8 (JRE SE) (On Windows, the JDK is required) are already installed on your computer, you can jump directly to the installation of the Magnolia CLI.

Setup Java

There is no Java Programming required to develop applications with Magnolia.
However Magnolia does require the Java Environment (JRE) version 8 or higher. Type java -version in a terminal or command prompt. If the system reports a version number, Java is installed on your computer.

$ java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

Be sure to use a compatible version of Java from the Magnolia Certified Stack (At the time of writing: Java 8,11,14)

If you don't have Java, or it is not a compatible version, install it on your system.

The easiest way to install Java on your Mac is using [Homebrew](

First update homebrew

brew update

Then install java

brew install homebrew/cask/java

Type java -version to verify your installation.

Alternatively you can Download the latest Java from Oracle Website.

Setup Node.js and npm

Type node -v and npm -v in a terminal or command prompt. If the system reports a version number, Node.js and npm are installed on your computer.

$ node -v
$ npm -v

If Node.js and/or npm is not installed you can follow these instructions.

Our system is prepared and ready. Next install the Magnolia CLI.

Install Magnolia CLI

The Magnolia Commandline Interface (CLI) helps you to download, install and start Magnolia. It also provides many handy tools for developing Light Modules

$ npm install @magnolia/cli -g

Depending on your permissions and the Node.js installation location, you may have to execute the above command with root permissions. On Linux or OS-X, to run this command as root, use:

$ sudo npm install @magnolia/cli -g

Test that it is installed correctly:

$ mgnl -v
Magnolia CLI: 4.0.0 (node.js: v12.15.0)

You can find more information in the Magnolia CLI Documentation.

Your system is ready to go

Let's build a headless app, shall we?