Setup ILIAS LMS on Ubuntu 18.04/16.04 with Nginx

By on July 10th, 2020

ILIAS is an Open-Source Learning Management System. ILIAS LMS offers to develop and realizing web-based eLearning for free of cost. This software is packed with powerful modules to build and manage online courses for students, teachers, and more.

ILIAS LMS supports collaboration, communication, evaluation, and assessment and is built with popular web tools like PHP, MySQL, Jquery, Bootstrap, and more. This software is robust and mobile-friendly and helps students, teachers, and others to enjoy reading and interact with the portal from any device. It also provides an out-of-the-box response.

This software comes with an intuitive and powerful backend, so it is the best solution to get you started with large businesses, universities, schools, individual learning scenarios, and more. This software feature makes ILIAS the best solution to build and manage courses for your organization without any technical skills.

To start with ILIAS installation on Ubuntu with Nginx, you can follow the below steps:

Install Nginx HTTP Server

A web server is essential to run ILIAS, and Nginx HTTP server is the most popular open-source web server available in today’s market. You can install the same using the below commands.

To install the Nginx server, run the following commands:

$ sudo apt update
$ sudo apt install nginx

After installing the Nginx web server, you can use the below commands to start, stop, or enable Nginx service.

$ sudo systemctl start nginx.service
$ sudo systemctl stop nginx.service
$ sudo systemctl enable nginx.service

To test whether the webserver is working after the installation, you can open your browser and browse the following URL. If you see the below screen, then the installation is successful



Install MariaDB Database Server

ILIAS needs a database server to store the contents. MariaDB is an open-source database server, so it can be used to store the ILIAS contents.

To install MariaDB, you need to run the following command.

$ sudo apt-get install mariadb-server mariadb-client

After installation, you can run the below commands on Ubuntu to stop, start, and enable MariaDB service always to start up when the server boots.

$ sudo systemctl stop mariadb.service
$ sudo systemctl start mariadb.service
$ sudo systemctl enable mariadb.service

To secure MariaDB by creating a root password and disallowing remote root access, you need to run the following command.

$ sudo mysql_secure_installation

While running the above command, the system prompts with different questions like the following. Fill the details as per your requirements.

Enter current password for root (enter for none): <press the Enter button>
Set root password? [Y/n]: Y
New password: <Enter password>
Re-enter new password: <Repeat password>
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]:  Y
Reload privilege tables now? [Y/n]:  Y

Restart MariaDB service by using the following command

$ sudo systemctl restart mariadb.service

To verify the database status, you can run the following command.

$ sudo systemctl status mariadb

To connect to MariaDB, you can run the following command and enter the password you created earlier for a successful login to the database.

$ sudo mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 47
Server version: 10.3.10-MariaDB-1:10.3.10+maria~bionic binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

Install PHP 7.2-FPM and Related Modules

ILIAS is a PHP based CMS. PHP 7.2-FPM is not available in Ubuntu default repositories. So, to run the PHP 7.2-FPM on Ubuntu 16.04 and previous, you need to run the following commands.

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:ondrej/php

Update and upgrade to PHP 7.2-FPM by running the below command.

$ sudo apt update

Run the following command to install PHP 7.2-FPM and related modules.

$ sudo apt install php7.2-fpm php7.2-common php7.2-sqlite3 php7.2-mysql php7.2-gmp php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-gd php7.2-bcmath php7.2-xml php7.2-cli php7.2-zip

After installation, run the following command to open the PHP default configuration file for Nginx.

$ sudo nano /etc/php/7.2/fpm/php.ini

Update the below details in the configuration file and save the file.

file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
cgi.fix_pathinfo = 0
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = <timezone(America/Chicago)>

After making the changes in the configuration file, you need to restart Nginx web server.

$ sudo systemctl restart nginx.service

ILIAS Database

After installing all the packages, you need to follow the below steps to configure the server.

Create an ILIAS database by logging into MariaDB.

$ sudo mysql -u root -p

> CREATE DATABASE ilias CHARACTER SET utf8 COLLATE utf8_general_ci;

Create a database user called ‘iliasuser’ with the new password.

> CREATE USER ‘iliasuser’@‘localhost’ IDENTIFIED BY ‘<new_password_here>’;

Grant the user ‘iliasuser’ full access to the ‘ilias’ database.

> GRANT ALL ON ilias.* TO ‘iliasuser’@‘localhost’ WITH GRANT OPTION;

Save the changes and exit by using the following commands.



Download ILIAS LMS Latest Release

After installing the server and packages, you need to download a copy of the latest ILIAS from its download site.

Extract the archived content into the Nginx root directory using the following command.

$ cd /var/www/
$ sudo apt install git
$ sudo git clone ilias

Create a directory outside the ilias root directory.

$ sudo mkdir /var/www/extras

Run the following commands to set the correct permissions for the ILIAS root directory and also give Nginx control.

$ sudo chown -R www-data:www-data /var/www/extras/
$ sudo chmod -R 755 /var/www/ilias/


Configure Nginx

Configure Nginx site configuration file for ILIAS, as this file controls how users’ access ILIAS content.

Create a new configuration file called ‘ilias’ by running the following command.

$ sudo nano /etc/nginx/sites-available/ilias

Copy and paste the following content into the file and save it. Replace the ‘<domain_name> <directory_root_location>’ with your domain name and directory root location.

server {
    listen 80;
    listen [::]:80;
    root   /var/www/ilias;
    index  index.php;
    access_log /var/log/nginx/;
    error_log /var/log/nginx/;

    client_max_body_size 100M;
    autoindex off;

    location / {
        try_files $uri $uri/ /index.php?$query_string;


    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        include fastcgi_params;
        fastcgi_intercept_errors on;


Enable ILIAS LMS and Rewrite Module

1) After configuring the Virtual Host, enable it by running the following commands.

$ sudo ln -s /etc/nginx/sites-available/ilias /etc/nginx/sites-enabled/
$ sudo systemctl restart nginx.service

2) In the browser, enter the server domain name and then set up the ILIAS.


3) ILIAS LMS should begin its installation wizard, and you can validate all the requirements and then continue by clicking the button “Installation”.

4) Enter the base data directory, log file location, and the paths to third-party tools on the next page. These settings are also valid for a new user created later on.

Data Dirctory: /var/www/extras
Path to Log File: /var/www/extras/logs

5) Create a Client ID. Note that it allows any letter (except umlauts) or a number and also in one word.

6) On the next page, enter the database connection data. It establishes a test connection to verify your settings and to test if the database exists. If not created yet, the system prompt set up in the next installation step to create the database for you.

7) In the next process, choose a database type and continue.

8) Set the preferred language and additional languages on the next page.

9) Add the additional client information and the contact data of the system administrator of this client.

10) On the next screen, you can register your installation at the ILIAS open-source project server. This process is optional.

11) In the next screen, you can skip the registration. After that, your site should be up and ready to use.

12) Then, log in with the admin account created and start building your courses.


If you need any further help, please do reach our support department.

Leave a Reply