Community Edition on Windows
Magnolia CMS Community Edition and STK are GPL v3 licensed. By downloading and installing either package, you agree to the conditions of the license.
- Check prerequisites
- Java Runtime Environment (JRE)
- Check JAVA_HOME environment variable
- Set JAVA_HOME environment variable
- Download install and run Magnolia CMS
- Run the Web update
- Log in to author instance
- Troubleshooting
Check prerequisites
Java Runtime Environment (JRE)
Magnolia CMS needs a Java Runtime Environment (JRE). Use the Java Tester to check if you already have JRE. Java Development Kit (JDK) works too.What is the difference? JRE is an implementation of the Java Virtual Machine which actually executes Java programs. JDK is a bundle of software that you can use to develop Java based applications. If you plan to write your own Java code get JDK. If you just want to run Magnolia CMS JRE works fine.
If you don't have JRE, download and install it from http://java.sun.com/javase/downloads/index.jsp. By default JRE is installed in C:\Program Files (x86)\java\jre6 on Windows 7. You can choose another location.
Check JAVA_HOME environment variable
- Open a command prompt window.
- At the command prompt, type
setand press ENTER. - Find
JAVA_HOMEin the command output and verify that it matches the path to your JRE installation directory, for exampleC:\Program Files (x86)\java\jre6. - If
JAVA_HOMEis missing or points to the wrong directory, see Set JAVA_HOME environment variable. If everything is OK, go to Download Magnolia CMS.
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_HOMEenvironment variable does not exist in User variables or System variables, create it: - User variables apply to the currently signed-in user only. Create
JAVA_HOMEhere 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_HOMEhere 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_HOMEto the path of your JDK installation directory, for exampleC:\Sun\SDK\jdk. - Optional step: Add the Magnolia CMS
bindirectory to thePATHvariable, for exampleC:\Program Files\magnolia\apache-tomcat-5.5.27\bin. Setting thePATHallows you to issue the Magnolia CMSstartandstopcommands 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 addCATALINA_HOMEto environment variables. Set the value ofCATALINA_HOMEto the Tomcat installation directory, for exampleC:\Program Files\magnolia\apache-tomcat-5.5.27 - Click OK.
- 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.
/apache-tomcat/bin/magnolia_control.bat:
set JAVA_HOME=C:\Program Files (x86)\java\jre6
set command creates the JAVA_HOME environment variable and sets its value to the JDK directory. The command is executed when Magnolia CMS starts.
Download install and run Magnolia CMS
Download
Download the Magnolia CMS Tomcat bundle zip file from http://sourceforge.net/projects/magnolia/files/. This will install Tomcat servlet container, one Magnolia author instance and one Magnolia public instance. The file name depends on the release, for example magnolia-tomcat-bundle-4.2.3-bundle-jdk15.zip. Get the latest.
Install
Extract the zip to C:\Program Files or another directory on your computer.
The extracted folder structure looks like this:
magnolia-4.2.3
add-ons
apache-tomcat
bin
conf
logs
webapps
MagnoliaAuthor
MagnoliaPublic
ROOT
Run
- Open a command prompt and go to the Magnolia CMS installation directory.
(To do this, typecd C:\Program Files\magnolia-4.2.3\apache-tomcat-5.5.27\bin) - Type
magnolia_control.bat startand press ENTER.
INFO: Server startup in 12345 ms
To stop Magnolia CMS, type magnolia_control.bat stop and press ENTER.
Run the Web update
- Open a browser and go to
http://localhost:8080. - Click the Run the Web update on the author instance link.
A list of modules that need updating is displayed. - Click Start install.
The modules are updated. - Click Start up Magnolia.
- Open a browser and go to
http://localhost:8080. - Click the Run the Web update on the public instance link.
A list of modules that need updating is displayed. - Click Start install.
The modules are updated. - Click Start up Magnolia.
Log in to author instance
- Open a browser and go to
http://localhost:8080/magnoliaAuthor/.magnolia. - At the login page, sign in with:
- Username:
superuser - Password:
superuser

Superuser is a system administration account that has permission to every function. End users should not use this account. See Users for instructions how to create new user accounts and Default users for accounts that you can use for testing right away.
Troubleshooting
Port 8080 is already in use
Port 8080 is the default port for Tomcat. You can see it at the end of the default addresshttp://localhost:8080. If another application on the computer is already using the same port you may need to change it.
- Open
/apache-tomcat/conf/server.xmlin a text editor. This file is under your Magnolia CMS installation directory. - Find the following section and set the value of
portto something other than 8080, for example 8090:
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port="8090" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" />
Change the defaultBaseUrl property which is used to generate links in emails or other external systems. To do this, you need to now access Magnolia at the new port 8090.
- Log into the author instance at http://localhost:8090/magnoliaAuthor/.magnolia.
- Go to Configuration.
- Set the value of
/server/defaultBaseUrlproperty tohttp://localhost:8090/magnolia/. - Log into the public instance at http://localhost:8090/magnoliaPublic/.magnolia.
- Go to Configuration.
- Set the value of
/server/defaultBaseUrlproperty tohttp://localhost:8090/magnolia/.
The port also needs to be changed in publishing configuration, otherwise activating changes from the author to public instance fails.
- On the author instance, go to Configuration > Subscribers.
- Edit the
magnoliaPublic8080subscriber. Set theURLproperty tohttp://localhost:8090/magnoliaPublic. - Rename the subscriber to
magnoliaPublic8090. - Activate the modified subscriber including its subnodes.
Windows Firewall is blocking Java
Allow an exception in Windows Firewall for Java.
- Go to Control Panel > Windows Firewall.
- Go to the Exceptions tab.
- Click Add Program and browse to the java.exe file in the Java installation directory, for example
C:\Sun\SDK\jdk\bin\java.exe. - Click OK.

CATALINA_HOME environment variable is not defined
CATALINA_HOME environment variable identifies the Tomcat home directory, for exampleC:\Program Files\magnolia\apache-tomcat. Usually Magnolia CMS finds this directory automatically. When you type magnolia_control.bat start in the bin directory to start the system, a second script named startup.bat tries to find Tomcat home. It assumes that Tomcat home is one level above the bin directory where you issued the command, and sets the value of CATALINA_HOME to that directory.
C:\Program Files
magnolia
apache-tomcat <-- Tomcat home directory
bin <-- magnolia_control.bat is here
However, if you added the bin directory to your PATH environment variable you can execute magnolia_control.bat from anywhere. This means startup.bat does not find Tomcat home directory by simply moving up one level from where you are and displays the following error:

To correct this define CATALINA_HOME in environment variables. Follow the instructions in Set JAVA_HOME environment variable.
Java out of memory
If the Java Virtual Machine (JVM) does not have enough memory you may see a java.lang.OutOfMemoryError in the startup log. Magnolia CMS fails to start.
Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap space
at org.apache.jackrabbit.core.query.lucene.IndexingQueue.getFinishedDocuments
- Stop the server.
- Open file
/apache-tomcat/bin/setenv.batin a text editor. - Edit the
Xmxparameter to set a new maximum heap size. Default size for Magnolia CMS is 512M, try a higher amount such as 1024M. - Save the file and start the server.