Skip to content

Installation guide

Installation guide for OpenOlat 18.2 and greater

This guide walks you through installing OpenOlat Version 18.2.x or newer on a local GNU/Linux or similar system using Tomcat 10.1, Java 17 and PostgreSQL 12. If you already have an up and running installation, see our Update Guide

If you really want to install OpenOlat using MySQL as database, have a look at the Special topics -> MySQL DB section and try mixing it with the information found in here. Please keep in mind that this is not recommended.

Supported releases

Currently supported releases are:

  • 19.0.x Latest release
  • 18.2.x Old release with long term maintenance

Older releases are not supported anymore and don't get any security updates. Long term releases are normally not under active development, but will get critical security updates.

Please upgrade as soon as possible if you have an older unsuppored release installed.


Security relevant issues are only visible to members of the OpenOlat partner program. Make sure you always update to the latest release to get all security patches.

Create a user for OpenOlat

The username is openolat in this guide with home directory in /home/openolat/. From here onwards, do everything as the user openolat (unless pointed out differently). To create the user, you can simply use the command

useradd -m -s /bin/bash openolat

Download software

We recommend using the following software packages:

Create a directory downloads and keep the downloaded files there:

openolat~$ cd && mkdir downloads && cd downloads
openolat~$ ls -l downloads
-rw-rw-r-- 1 openolat openolat  12127326 Feb  9 10:51 apache-tomcat-10.1.5.tar.gz
-rw-rw-r-- 1 openolat openolat 191502157 Feb  9 10:51 OpenJDK17U-jdk_x64_linux_hotspot_17.0.6_10.tar.gz
-rw-rw-r-- 1 openolat openolat 181853117 Mar 17 15:41 openolat_18211.war

You do not need to use the exact versions from this manual, this is just an example. We recommend that you use the newest version within the given major version: Java 17, Tomcat 10.1. As for OpenOlat, please use the newest release. If not, make sure to use a version 18.2.x or newer. Note that you do not need a JDK to run OpenOlat, a JRE will work as well.

Prepare home directory

In the home directory:

openolat~$ cd
openolat~$ tar xvf downloads/apache-tomcat-10.1.5.tar.gz
openolat~$ ln -s apache-tomcat-10.1.5 tomcat

openolat~$ tar xvf downloads/OpenJDK17U-jdk_x64_linux_hotspot_17.0.6_10.tar.gz
openolat~$ ln -s jdk-17.0.6+10 jre

openolat~$ unzip -d openolat-17.2.3 downloads/openolat_18211.war
openolat~$ ln -s openolat-18.2.11 webapp

Note that this setup allows you to switch between different versions of JRE and tomcat by adjusting the symlinks jre and tomcat. An update works the same way, just stop OpenOlat, remove the symlink to webapp, unzip a new version and make a new symbolic webapp link.

Create tomcat dirs

Set up tomcat in home directory

openolat~$ mkdir bin conf lib run logs

web.xml and

Link the following files:

openolat~$ cd ~/conf
openolat~$ ln -s ../tomcat/conf/web.xml web.xml
openolat~$ cd ~/bin
openolat~$ ln -s ../tomcat/bin/

Create additional, handy links:

openolat~$ cd
openolat~$ ln -s tomcat/bin/ start
openolat~$ ln -s tomcat/bin/ stop

Create the file ~/bin/ containing


-Xmx1024m -Xms512m -XX:MaxMetaspaceSize=512m \ \
-Duser.timezone=Europe/Zurich \ \
-Djava.awt.headless=true \ \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=. \

The scripts of tomcat will parse this file at startup.


Create the file ~/conf/server.xml

<?xml version='1.0' encoding='utf-8'?>
<Server port="8085" shutdown="SHUTDOWN">
  <Service name="Catalina">
    <Connector port="8088" protocol="HTTP/1.1" />
    <Engine name="Catalina" defaultHost="localhost">
      <Host name="localhost"  appBase="webapps" />

Make sure the chosen ports (8085 and 8088 in this example) are available. Set the environment variables CATALINA_HOME and JRE_HOME, for example by appending the following to your ~/.bashrc

export CATALINA_HOME=~/tomcat
export JRE_HOME=~/jre

and activate them by issuing

openolat~$ . .bashrc

Test tomcat

openolat~$ ./start

... should output look something like this:

Using CATALINA_BASE:   /home/openolat
Using CATALINA_HOME:   /home/openolat/tomcat
Using CATALINA_TMPDIR: /tmp/openolat
Using JRE_HOME:        /home/openolat/jre
Using CLASSPATH:       /home/openolat/tomcat/bin/bootstrap.jar:/home/openolat/  tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:   -Xmx1024m -Xms512m -XX:MaxMetaspaceSize=512m -Duser.timezone=Europe/Zurich -Djava.awt.headless=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=.
Using CATALINA_PID:    /home/openolat/run/
Existing PID file found during start.
Removing/clearing stale PID file.
Tomcat started.

Check whether these values make sense, then stop tomcat again

openolat~$ ./stop

Set up postgresql

This setupguide should work with all PostgreSQL Versions from 9.1 on. Our recommendation is to use the most recent, stable version. This manual has been tested with version 12.5.

User and DB

Do the following as root user:

root~# su - postgres

and then as user postgres (you may need the postgresql db password, but usually not):

postgres~$ psql

Now while logged in to postgresql, we create the user and the database:

postgres=# create user oodbu with password 'oodbpasswd';
postgres=# create database oodb with owner oodbu;

Test DB access

Test the account as openolat user:

openolat~$ psql oodb -U oodbu -h localhost

You should get the postgresql client prompt after providing your password.

Create DB schema

The database schema is created automatically when starting OpenOlat the first time. If you want to have more control over the process you can setup it yourself:

Create the openolat database schema, as user openolat:

oodb=> \i /home/openolat/webapp/WEB-INF/classes/database/postgresql/setupDatabase.sql


As of 17.2.2 the database files are not in the compiled war file anymore as all files in the classes directory are delivered in a jar. You can unpack the openolat/WEB-INF/lib/openolat-lms-xx.x-SNAPSHOT file to find the files or download it from GitHub.


Create a file named ~/.pgpass containing


This way you can access the database by typing psql -h localhost and will connect to the right db without pw

OpenOlat configuration

Create the file ~/lib/


Application context descriptor

Create the directory ~/conf/Catalina/localhost/ for the OpenOlat Application context descriptor:

openolat~$ mkdir -p ~/conf/Catalina/localhost/

and create the file ~/conf/Catalina/localhost/ROOT.xml containing:

<?xml version="1.0" encoding="UTF-8" ?>
<Context path="" docBase="/home/openolat/webapp" debug="0" reloadable="false" allowLinking="true">
     <Resource name="jdbc/openolatDS" auth="Container" type="javax.sql.DataSource"
         maxTotal="16" maxIdle="4" maxWaitMillis="60000"
         username="oodbu" password="oodbpasswd"
         validationQuery="SELECT 1" 

Make sure the values of username, password and the localhost:5432/oodb part in the url value are the ones of your postgresql account for openolat.

Configure log4j2

Create the file ~/lib/log4j2.xml containing

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
       <RollingFile name="RollingFile" fileName="/home/openolat/logs/olat.log"
                   pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %marker %c{1} ^%%^ I%X{ref}-J%sn ^%%^ %logger{36} ^%%^ %X{identityKey} ^%%^ %X{ip} ^%%^ %X{referer} ^%%^ %X{userAgent} ^%%^ %msg%ex{full,separator( )}%n" />
               <TimeBasedTriggeringPolicy interval="1" />
       <Logger name="org.apache.commons.httpclient" additivity="false" level="warn">
           <AppenderRef ref="RollingFile" />
       <Logger name="org.apache.pdfbox" additivity="false" level="fatal">
           <AppenderRef ref="RollingFile" />
       <Logger name="org.apache.fontbox" additivity="false" level="fatal">
           <AppenderRef ref="RollingFile" />
       <Logger name="org.hibernate.engine.internal.StatisticalLoggingSessionEventListener" additivity="false" level="fatal">
           <AppenderRef ref="RollingFile" />
       <!-- Change the level to debug to see the SQL statements generated by Hibernate -->
       <Logger name="org.hibernate.SQL" additivity="false" level="fatal">
           <AppenderRef ref="RollingFile" />
        <Logger name="org.hibernate.type.descriptor.sql.BasicBinder" additivity="false" level="fatal">
            <AppenderRef ref="RollingFile" />
        <Logger name="org.apache.activemq.audit" additivity="false" level="warn">
           <AppenderRef ref="RollingFile" />
        <Root level="info">
            <AppenderRef ref="RollingFile" />


Start OpenOlat


The file ~/log/catalina.out should say

INFO: Server startup in [19696] milliseconds

near the end (your numbers will vary).

The next file to check would be ~/logs/olat.log. It should say:

Velocity cache filled with 1517 templates in (ms): 5847

but again, your numbers will vary.

Try OpenOlat

Point your browser to:

username: administrator
password: openolat

Happy testing!


If you have problems or questions please use the public mailing list or ask for commercial support

Professional hosting

OpenOlat is a complex application. Installing and operating requires in-depth Java and OpenOlat application knowledge.

frentix is the company behind OpenOlat, we are not only specialists in developing OpenOlat but also for hosting and operating OpenOlat in our own infrastructure or on-premises. Let us do what we can do best so you can concentrate on your actual learning scenarios.

Learn more about the OpenOlat services on the OpenOlat website