This page explains how to install the Magnolia Community Edition (CE) bundle . We then build a website on that base.
Get Java
Magnolia needs a Java Runtime Environment (JRE). But you don't need Java skills to do this tutorial.
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 "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
If you don't have Java, install it:
Mac OS X
Java is not pre-installed on Mac OS X 10.7 and later. Download the latest Java from Oracle.
Windows
On Windows you need a Java SE Development Kit (JDK). The Java Runtime Environment (JRE) is not enough because the Tomcat application server does not recognize it.
What is the difference?
- JRE is for users who run Java programs on their computer.
- JDK is for developers who write Java-based applications.
Download and install JDK. By default JDK is installed in C:\Program Files\Java\jdk-10.0.xx\
. You can choose another location.
Check JAVA_HOME environment variable
- Open the command prompt.
- Type
set
and press ENTER. - Find
JAVA_HOME
in the command output and verify that the path points to your JRE installation directory, for example
C:\Program Files\Java\jdk-10.0.xx
. - If
JAVA_HOME
is missing or it points to the wrong directory, see Set JAVA_HOME environment variable below.

Set JAVA_HOME environment variable
- Right-click My Computer and select Properties.
- Go to the Advanced tab.
(In Windows 7+, right-click Computer and select Advanced System Settings, then Environment variables.) - If the
JAVA_HOME
environment variable does not exist in User variables or System variables, create it:
- User variables apply to the currently signed-in user only. Create
JAVA_HOME
here if you want it to apply only to the currently logged in user. These variables take precedence over system variables. - System variables apply to all users. Create
JAVA_HOME
here if you want it to apply to all users. You must be an administrator to modify a system environment variable.

- Set the value of
JAVA_HOME
to the path of your JDK installation directory, for example C:\Program Files\Java\jdk-10.0.xx
. - Optional step: Add the Magnolia
bin
directory to the PATH
variable, for example C:\Program Files\magnolia\apache-tomcat-x.y\bin
. Setting the PATH
allows you to issue the Magnolia start
and stop
commands from anywhere without navigating to the installation directory first. Separate the path from existing paths with a semicolon ( ; ). If you do this, you also need to add CATALINA_HOME
to environment variables. Set the value of CATALINA_HOME
to the Tomcat installation directory, for example C:\Program Files\magnolia\apache-tomcat-x.y
- Click OK.
- Go back to Check JAVA_HOME environment variable above and test that the variable is found and has the correct value. You need to open a new command prompt since environment variables are session specific.
Alternatively you can set JAVA_HOME with a batch file. Add this line to /apache-tomcat/bin/magnolia_control.bat
:
set JAVA_HOME=C:\Program Files\Java\jdk-10.0.1
The set
command creates the JAVA_HOME
environment variable and sets its value to the JDK directory. The command is executed when Magnolia starts.
Linux
Download the latest Java from Oracle. The installation directory varies from one Linux system to another. For example, on Ubuntu Linux 10 the OpenJDK Runtime Environment is installed in /usr/lib/jvm/java-10-openjdk/jre
by default.
Solaris
Download the latest Java from Oracle. You can install it in any directory such as /usr/java
.
Download Magnolia
To start with the development, we recommend using a fresh ("vanilla") Magnolia CE bundle.
Extract the zip to your computer.
magnolia-x.y/
├── add-ons/
└── apache-tomcat-x.y/
├── bin/
├── conf/
├── lib/
├── logs/
├── temp/
├── webapps/
| ├── magnoliaAuthor/
| ├── magnoliaPublic/
| └── ROOT/
└── work/
Where to extract:
Mac OS X
Extract the zip to /Applications
or another directory on your computer.
Windows
Extract the zip to C:\Users\<username>\magnolia
or another directory on your computer.
Linux
If you are installing Magnolia for personal use extract the zip to /usr/home/<your account>
or equivalent directory. If you are installing onto a production server extract the zip to /usr/local
or /opt
. A normal user account may not have permissions to extract files into a target directory such as /opt
. If this is the case extract the zip in the folder where you downloaded it, open a terminal window, and move the extracted folder using sudo mv magnolia-x.y
. The sudo
command will execute the mv
(move) command as superuser, prompting you for a password.
Solaris
If you are installing Magnolia for personal use extract the zip to /usr/home/<your account>
or equivalent directory. If you are installing onto a production server extract the zip to /usr/local
or /opt
. A normal user account may not have permissions to extract files into a target directory such as /opt
. If this is the case extract the zip in the folder where you downloaded it, open a terminal window, and move the extracted folder using sudo mv magnolia-x.y
. The sudo
command will execute the mv
(move) command as superuser, prompting you for a password.
Don't start Magnolia yet.
Download a content app
should use a content app to manage structured content. Content apps make it easy to manage items such as products, or in our case cars.
* magnolia-app-tutorial-1.4.8.jar
Add the jar file in the $<your-magnolia-installation>/apache-tomcat-x.y/webapps/magnoliaAuthor/WEB-INF/lib
folder.
Note: We are reusing a content app that was created in another tutorial: My first content app. If you are interested in creating your own content app do that tutorial later.

Start Magnolia
Open a terminal, go to the magnolia-x.y/apache-tomcat-x.y/bin
directory, and type:
./magnolia_control.sh start
In a successful startup the last line printed to the terminal reads: INFO: Server startup in 12345 ms
.
- Open a browser and go to
http://localhost:8080
Detailed instructions:
Mac OS X
- Open a terminal window in Applications > Utilities > Terminal.
Go to the Magnolia installation directory
cd /Applications/magnolia-x.y/apache-tomcat/bin
Start Magnolia.
./magnolia_control.sh start && tail -f ../logs/catalina.out
The first part of the startup command ./magnolia_control.sh start
launches Magnolia. The second part && tail -f ../logs/catalina.out
displays log messages written to /apache-tomcat/logs/catalina.out
log file. This makes it easier to troubleshoot startup errors.Magnolia reports startup information. If startup fails, look for the reason in the report. In a successful startup the last line reads: INFO: Server startup in 12345 ms
.
Windows
- Open a command prompt and go to the Magnolia installation directory.
(To do this, type cd C:\Users\<username>\magnolia-x.y\apache-tomcat\bin
) -
magnolia_control.bat start
and press ENTER.
Magnolia reports startup information in a new Tomcat window. If startup fails, look for the reason in the report. In a successful startup the last line : INFO: Server startup in 12345 ms
Linux
- Open a terminal window.
- Go to the Magnolia installation directory:
cd /home/<your account>/magnolia-x.y/apache-tomcat/bin
Your path may be different. - Start Magnolia:
./magnolia_control.sh start && tail -f ../logs/catalina.out
The first part of the startup command ./magnolia_control.sh start
launches Magnolia. The second part && tail -f ../logs/catalina.out
displays log messages written to /apache-tomcat/logs/catalina.out
log file. This makes it easier to troubleshoot startup errors.Magnolia reports startup information. If startup fails, look for the reason in the report. In a successful startup the last line reads: INFO: Server startup in 12345 ms
Solaris
- Open a terminal window.
- Go to the Magnolia installation directory:
cd /home/userAccount/magnolia-x.y/apache-tomcat/bin
Your path may be different. - Start Magnolia:
./magnolia_control.sh start && tail -f ../logs/catalina.out
The first part of the startup command ./magnolia_control.sh start
launches Magnolia. The second part && tail -f ../logs/catalina.out
displays log messages written to /apache-tomcat/logs/catalina.out
log file. This makes it easier to troubleshoot startup errors.Magnolia reports startup information. If startup fails, look for the reason in the report. In a successful startup the last line reads: INFO: Server startup in 12345 ms
Install Magnolia
To install Magnolia:
- Open a browser and go to
http://localhost:8080
- Click Run the Web update on the author instance, then Start installation.
- Click Run the Web update on the public instance, then Start installation.


Magnolia installs its modules. When the installation is complete on the author and public instances, click Start up Magnolia on both:

Log in
Go to
http://localhost:8080/magnoliaAuthor/.magnolia/admincentral
and sign in as:
- Username:
superuser
- Password:
superuser
Add a car
Open the Products app installed by the app-tutorial
module and get familiar with it.

Since the items in the app are cars let's talk about cars from now on. Try the tree, list and thumbnail views. Add a car of your own.

Next: Creating a light module