Chamilo 3 installation guide

This is the official Chamilo installation guide for version 3+. There are many ways to install Chamilo, depending on your needs. Some of these ways, from easiest but less flexible, to most complex but most flexible, are: The instructions below focus on the most difficult installation procedures.
We believe third-party installers will make it easier for you by abstracting the complexities of your own setup.
This ease of installation is usually balanced with a lower scalability or adaptability, but they are good solutions to start.

1. Requirements

This version of Chamilo requires the following software stack. It might be installed in other contexts, as PHP is very portable, but the following has been thoroughly tested for production environments. Within PHP, Chamilo requires or benefits from the following modules, which might already be included in PHP on your system:

2. Web-panel installation

2.1. Database

Make sure you have a database available with full permissions.
Do not share that database with another application as Chamilo might need to create a table that has the same name as a table in the other application.

2.2. Virtual host

Define a new virtual host/subdomain name you will use for Chamilo (Chamilo 3 does *not* work as a sub-folder of an existing website, you need a subdomain like "elearning.yourdomain.com").
Upload and/or unzip your Chamilo files inside your web folder (usually inside a folder called "public_html/").
Configure a virtual host pointing at the "public" directory inside your Chamilo directory. For example, this could be "/home/elearning.yourdomain.com/public_html/chamilo/public/".

2.3. Files permissions

Make sure the following files and folders are writeable by the web server. Set permissions to 0770 for example: The .env is the *file* where Chamilo will write the data collected during the installation.
You can create an empty file called ".env" at the root of your Chamilo folder ("/home/elearning.yourdomain.com/public_html/chamilo/.env" in the example above), or temporarily give write permissions to the web server on the entire Chamilo folder ("/home/elearning.yourdomain.com/public_html/chamilo/"). If you do the whole folder, don't forget to write down the permissions it had initially, and return it to its original permissions when the installation is over.

WARNING: Folders permissions are the most common and most critical way for hackers to damage a Chamilo system. Make sure to follow the "Clean up" steps below.

2.4. PHP settings

Some PHP settings are recommended, but the default values should be enough to get you started.
If you prefer to set them previously, here are the settings to change:

2.5. Installation wizard

You are ready to go. Open your browser on your subdomain (elearning.yourdomain.com in the example above), keep your database credentials at hand, and let the Chamilo installer guide you.

2.6. Sessions and Redis

Redis is an in-memory non-relational database server that can be used to manage PHP sessions. Under high loads, PHP sessions management can be a bottleneck. Using Redis can considerably alleviate that bottleneck but should not be an issue for low to moderate uses (up to 10 *simultaneous* users or so). Check the command line instructions for more about this.

2.7. Clean up

Important: As recommended by the installer's last page, make sure you change permissions on the config/ dir and the .env file, and you delete the public/main/install/ folder.
        sudo chown -R root: config/ .env
        sudo rm -r public/main/install/
    

3. Command line installation

3.1. Software stack

Assuming you are using a dedicated Ubuntu 24.04 LTS, these commands should help you have the software stack installed in a breeze. Otherwise, please review the requirements above and make sure they are met before moving on to the next section. Please note Redis is optional. It is included for efficiency reasons for self-managed servers, but can be skipped on shared hosting.

sudo -s
apt update && apt -y upgrade
apt -y install apache2 libapache2-mod-php mariadb-client mariadb-server redis-server php-{apcu,bcmath,curl,exif,gd,iconv,intl,ldap,mbstring,mysql,opcache,soap,xml,zip,redis}
a2enmod rewrite
cd /var/www/
mkdir chamilo
wget https://github.com/chamilo/chamilo-lms/releases/download/v3.0.0-beta.1/chamilo3.0.0-beta.1.tar.gz
# about 400MB
tar zxf chamilo3.0.0-beta.1.tar.gz
rm chamilo3.0.0-beta.1.tar.gz
cd chamilo
touch .env
chown -R www-data: var/ config/ .env
mysql -u root -e "GRANT ALL PRIVILEGES ON chamilo.* TO chamilo@localhost IDENTIFIED BY '[choose a password here]'";
mysql -u root -e "FLUSH PRIVILEGES;"
mysql_secure_installation
# give a MariaDB root password twice and answer the default "Y" to anything else. The root password is *not* the one you gave above here.

3.2. Database

You will need a database user with privilege to fully use (and optionally create) a database.
Although progress has been made to support multiple database management systems, Chamilo currently only supports MariaDB and MySQL.
Setup a new user in your database system either through visual tools or directly in the terminal. If you have followed the command lines above, you can skip this.

mysql> GRANT ALL PRIVILEGES ON [db-name].* TO [db-user]@[db-host] IDENTIFIED BY '[db-password]';
mysql> FLUSH PRIVILEGES;
mysql> exit;
where:

3.3. Web server

Chamilo 3+ only requires a working web server setup to work. You can run it on localhost with the default installation of any web server, provided you configure your DocumentRoot as the path pointing to Chamilo's public/ subfolder.
Here is an example Apache vhost configuration file for an installation on the http://my.chamilo.local/ URL (replace all values between brackets, including the brackets, to your custom values).
It includes PHP settings which will only affect this vhost. If you prefer to set those PHP settings in php.ini, you are welcome to do so.
We also assume you will be using a default Redis installation to manage sessions (see notes in the web panel install section).
Reminder: Redis is optional. If you don't use it, do not use the lines about "session.save_handler" and "session.save_path" below.
cd /etc/apache2/sites-available
vim [my.chamilo.local].conf
<VirtualHost *:80>
    ServerAdmin [your-email]
    ServerName [my.chamilo.local]
    DocumentRoot [/var/www/chamilo]/public/
    # The following might not even be required
    ErrorLog /var/log/apache2/[my.chamilo.local]-error.log
    CustomLog /var/log/apache2/[my.chamilo.local]-access.log combined
    DirectoryIndex index.php index.html
    Options Indexes FollowSymLinks
    <Directory [/var/www/chamilo/public]>
      AllowOverride all
    </Directory>
    php_value display_errors Off
    php_value file_uploads On
    php_value session.auto_start Off
    php_value short_open_tag Off
    php_value session.cookie_httponly On
    php_value upload_max_filesize 100M
    php_value post_max_size 100M
    php_value memory_limit 256M
    php_value pcre.jit 0
    #php_value session.save_handler "redis"
    #php_value session.save_path "tcp://127.0.0.1:6379"
</VirtualHost>
After setting up this virtual host, don't forget to enable it (example here on Debian/Ubuntu's command line):
a2ensite [my.chamilo.local]
systemctl restart apache2

Behind a reverse proxy

If you are installing Chamilo behind a reverse proxy that will handle the HTTPS communication, you will need to check for these two elements: You should then reload Apache to take this new VHost configuration into account.
Enabling mod_rpaf and defining TRUSTED_PROXIES in .env *without* adding the SetEnvIF above in your VHost config will result in some links (quiz answers, quarter stats, ...) being called in AJAX mode, using an HTTP version of the link.

JWT Authorization and PHP-FPM

If you are using PHP-FPM behind Apache, make sure you tell Apache to transfer the Authorization header to PHP-FPM, otherwise tools like ONLYOFFICE who require a JWT authentication might not work. This is done by adding this to your VirtualHost block
  SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    
Using Nginx should be done through an Nginx configuration roughly in the vicinity of the following (this assumes you have a PHP8.3-FPM process running through sockers, that you will call your portal http://my.chamilo.net and that it's located in /var/www/chamilo/public:
        server {
  listen 80;
  server_name my.chamilo.net;
  root /var/www/chamilo/public;

  index index.php;

  add_header X-Frame-Options        "SAMEORIGIN"                      always;
  add_header X-Content-Type-Options "nosniff"                         always;
  add_header Referrer-Policy        "strict-origin-when-cross-origin" always;

  # Block hidden files (.env, .git, etc.) except Let's Encrypt
  location ~ /\.(?!well-known) {
    deny all;
  }

  # -----------------------------------------------------------------------
  # Pure static directories
  # -----------------------------------------------------------------------
  location ~* ^/(build|bundles|documentation|fonts|img|libs|sound)/ {
    expires 30d;
    add_header Cache-Control "public, immutable";
    try_files $uri =404;
  }

  # -----------------------------------------------------------------------
  # Legacy PHP trees — main/ and plugin/ execute .php files directly
  # -----------------------------------------------------------------------
  location ~ ^/(main|plugin)/ {
    try_files $uri $uri/ =404;

    location ~ \.php$ {
      fastcgi_pass  unix:/var/run/php/php8.3-fpm.sock;
      fastcgi_split_path_info ^(.+\.php)(/.*)$;
      include       fastcgi_params;
      fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
      fastcgi_param DOCUMENT_ROOT   $realpath_root;
      fastcgi_param PATH_INFO       $fastcgi_path_info;
    }
  }

  # -----------------------------------------------------------------------
  # Symfony front controller
  # -----------------------------------------------------------------------
  location / {
    try_files $uri /index.php$is_args$args;
  }

  # -----------------------------------------------------------------------
  # check.php — Symfony requirements checker.
  # PRODUCTION: block public access entirely.
  # DEV/TEST:   comment out this block to allow direct browser access.
  # -----------------------------------------------------------------------
  location = /check.php {
    deny all;
  }

  # -----------------------------------------------------------------------
  # legacy.php — bootstrap included by legacy PHP scripts via require/include.
  # Must never be served over HTTP in any environment.
  # -----------------------------------------------------------------------
  location = /legacy.php {
    deny all;
  }

  # -----------------------------------------------------------------------
  # PHP execution — Symfony entry point only.
  # `internal` ensures direct browser requests to /index.php return 404,
  # preventing duplicate content without needing a redirect.
  # -----------------------------------------------------------------------
  location ~ ^/index\.php$ {
    fastcgi_pass  unix:/var/run/php/php8.3-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include       fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    fastcgi_param DOCUMENT_ROOT   $realpath_root;
    fastcgi_param PATH_INFO       $fastcgi_path_info;
    internal;
  }

  # Deny direct access to any other .php at root level
  location ~ \.php$ {
    return 404;
  }
}
    

3.4. Files permissions

Make sure the following files and folders are writeable by the web server during the installation. Set permissions to 0770 or the owner to www-data, for example: Assuming your web server user is www-data, you can do that quickly with the following from inside the Chamilo root directory (already done in first example commands list for Ubuntu):
sudo touch .env
sudo chown -R www-data:www-data var/ config/ .env
Both .env and config/ should be changed back to less permissive permissions after the installation is over.

3.5. PHP settings

Some PHP settings are recommended, but the default values should be enough to get you started.
See vhost config's "php_value" section above for details.

3.6. Installation wizard

You should now be able to direct your browser to your URL (e.g. [http://my.chamilo.local]).
Chamilo will pick it up from there and offer the installation wizard to help guide you through the rest of the process.

3.7. Clean up

h3> As recommended by the installer's last page, make sure you change permissions on the config/ dir and the .env file, and you delete the public/main/install/ folder.
        sudo chown -R root: config/ .env
        sudo rm -r public/main/install/
    

4. Command line upgrade from 1.11.*

4.1. Database

Before you start, it is *critical* to delete the version table from your Chamilo 1.11.* database. Failure to do this will make the command line upgrade fail immediately after starting. The version table is not necessary for Chamilo 1.11.* to work, so don't leave it there.

4.2. Files

The files from Chamilo 1.11.* will be used as source but they will be copied and rearranged in the new Chamilo 3 installation, so you will have to indicate a source for the files to the (web or CLI) installer.
Note the extra pages created in 1.11.x and stored under app/home/ are *not* migrated. They will need to be created again in Chamilo 3 using the "pages" feature. In the VirtualHost configuration, don't forget to point the DocumentRoot towards the public/ subdirectory of Chamilo.

4.3. PHP settings

Make sure no setting is in the way of a command line upgrade. Limits such as memory_limit or max_execution_time should be vastly increased for the time of the upgrade.

4.4. E-mail settings

In Chamilo 1.11.*, the e-mail settings were stored in the app/config/mail.conf.php file.
This is *NOT* the case in Chamilo 3. Instead, the e-mail settings can be configured directly from the web panel (Administration > Settings > E-mail).
Those settings are *NOT* automatically migrated to the new format, so you will have to do it manually in the new, DSN, format. See settings page in your admin panel for more details.

4.5. Execution

Configure the new Chamilo 3 tree first: create the .env file with your database credentials (copy .env.dist and fill in DATABASE_HOST, DATABASE_PORT, DATABASE_NAME, DATABASE_USER and DATABASE_PASSWORD), and point them to the 1.11.* database you want to upgrade.
Then run the migrations from the root of the Chamilo 3 tree, with UPDATE_PATH set to the root directory of your 1.11.* installation. That variable tells the migrations where to read your course files and uploads from.
        cd [/var/www/chamilo3]
        UPDATE_PATH=[/var/www/chamilo-1.11] php bin/console doctrine:migrations:migrate --no-interaction
        php bin/console cache:clear --env=prod
        php bin/console cache:warmup --env=prod
        sudo chown -R www-data: var/
    
The command prints each migration as it runs and ends with "Successfully migrated to version". If it stops earlier, fix the reported cause and run it again: migrations already applied are recorded and are not repeated.
Duration follows the size of your database and of your course files. As a reference point, a 1.11.28 platform with 238 tables, 11 courses, 63 users and 1489 course files took 6 minutes and 1.7 GB of memory, and ran 393 migrations. A large production platform takes hours.
When the migration ends, set APP_INSTALLED=1 in your .env file, then follow section 3.7 to restrict permissions and delete the public/main/install/ directory.

4.6. Upgrading from Chamilo 2.x instead

Before you start, and before you upload this new Chamilo version package on top of your existing Chamilo folder, it is *critical* to The vendor folder contains PHP libraries and autoload configurations from Chamilo 1.11 which might leave folders that conflict with other folders in later versions of Chamilo.
An existing Chamilo 2.x installation keeps its own directory and its own database: you copy the new code over it and run the migrations, with no UPDATE_PATH.
One step comes first, and its order matters. Chamilo installs its schema directly from the entity definitions, so an installation created by the installer holds the final schema with an *empty* migration history. Installations created before Chamilo 3.0 were never given that history, and doctrine:migrations:migrate would then try to replay every migration from the beginning over a schema that is already current. The web installer also reads that history to decide whether an upgrade is pending, and refuses the request while it is empty.
So seed it once, *before* you copy the Chamilo 3 code, with your current version still in place. The commands mark every migration the deployed code carries as already executed; run them after copying the new code and they would mark the new migrations too, so your upgrade would never run.
        php bin/console doctrine:migrations:sync-metadata-storage --no-interaction
        php bin/console doctrine:migrations:version --add --all --no-interaction
        php bin/console doctrine:migrations:status
    
In the status output, "Executed" must equal "Available" and "New" must be 0. The first command creates the history table; the second one fails on its own if that table does not exist yet, so do not skip it.
Now copy the Chamilo 3 code over your installation and run the migrations as in section 4.5, without UPDATE_PATH.

4.7. Recovering when you copied the new code first

This section is for a platform that already carries the Chamilo 3 code over a 2.x database whose migration history was never seeded. Two symptoms identify it: the web installer answers "Chamilo is already installed" although the platform is a 2.x one, and doctrine:migrations:status reports "Executed" 0.
The history is empty, and the code on disk is no longer the code that created the database. So do not record it with --add --all: that marks every migration the deployed code carries, which records the migrations your upgrade still needs as already done. They then never run, and nothing warns you afterwards — the database simply misses the columns they create.
There are two ways out, and the first one needs no shell at all.
Way one, from the administration page. Open the Health check block and use the No migration history link. It reads your schema, records only the migration namespaces your database proves it already carries, and leaves the newer ones pending. The notification reports both counts: with the Chamilo 3.0.0 code over a 2.0.x database, 347 recorded and 46 still pending. Then run the upgrade, either through the wizard of section 5.4 or with the command of section 4.5.
Way two, from a shell. Seed everything, then remove from the history the namespaces your previous version did not carry. Every 2.0.x release, from 2.0.0 to 2.0.3, carries the same 344 migrations, all of them in the V200 namespace; Chamilo 3.0.0 carries 393, adding the V210 and V300 namespaces and three V200 migrations. Those three V200 ones are dated copies of migrations that also live in V210 and V300, added so the 1.11.x path applies their columns early, and each one checks the schema before it acts. So recording the whole V200 namespace loses nothing: their V210 and V300 twins stay pending and do the work.
        php bin/console doctrine:migrations:sync-metadata-storage --no-interaction
        php bin/console doctrine:migrations:version --add --all --no-interaction
    
Then, in your database, remove the migrations that must still run:
        DELETE FROM version WHERE version LIKE '%V210%' OR version LIKE '%V300%';
    
Check the result with doctrine:migrations:status. For a 2.0.x source and Chamilo 3.0.0, "Executed" must be 347, "Available" 393 and "New" 46. Then run the upgrade as in section 4.5, without UPDATE_PATH.

5. Web panel upgrade from 1.11.*

5.1. Database, Host, Permissions, Files and PHP settings

For all requirements previous to the installation wizard, see the command line upgrade instructions above. Note the installation folder for Chamilo 3 will be different from the installation folder from Chamilo 1, as explained in the "Files" section above.

If you used sublanguages in Chamilo 1.11, the upgrade converts them and writes their terms into var/translations/, which your web server already needs permissions to write to. Nothing else is required: the interface reads them from there, with no rebuild.

5.2. Enable the upgrade

The installer carries no login of its own, so it refuses to upgrade until you authorise the upgrade on the server. Create an empty file named UPGRADE_ENABLED in the project root, next to .env and composer.json:
        cd [/var/www/chamilo]
        touch UPGRADE_ENABLED
    
It goes in the project root, not in public/: from there nobody can ask over HTTP whether your platform is currently open for upgrading.
Only you create that file. The installer never writes it for you, whichever version you come from: the whole point of the file is that its presence proves a person decided on the server.
Coming from 1.11.*, the wizard opens without it, because your Chamilo 3 directory has no .env yet. It asks for the file on the requirements step, when you choose the upgrade and before it asks for your database. Coming from 2.x, the wizard answers "No UPGRADE_ENABLED found in the project root" straight away.
The installer deletes the file when the upgrade finishes. If your project root is read-only, it says so instead, and you delete the file by hand — until you do, the installer stays open.

5.3. Installation wizard

On step 2 of the installation wizard, make sure you select "Upgrade from a previous version of Chamilo" and click "Continue".
Follow the wizard to complete the upgrade.
Please be aware that upgrading your system might take hours or even days, depending on the size and complexity of your database. Refer to the Chamilo forum or to official providers for help.

5.4. Upgrading from Chamilo 2.x through the web panel

The wizard has no login of its own, so it answers only while it still has work to do. On an installed platform it opens when the database has migrations left to execute, and it answers "409 Conflict - Chamilo is already installed" once there are none.
This means an installation whose migration history was never seeded is refused, because nothing proves that an upgrade is pending. Seed it first, with your current version still deployed, as described in section 4.6, then copy the Chamilo 3 code, create the UPGRADE_ENABLED file of section 5.2, and open your URL.
If the wizard refuses your request and you expected an upgrade, run php bin/console doctrine:migrations:status. If "Executed" is 0 on a platform that works, the history is the cause. You are then in the case of section 4.7. The shortest way out needs no shell: the No migration history link of the administration page records what your schema proves and leaves the rest pending, after which the wizard opens.

6. Installing on Windows with WAMP

6.1. Introduction

Although Chamilo does work on Windows, it is not officially supported due to the fact that we have limited testing capabilities for this operating system. The following instructions have been tested on a Windows 11 (desktop) machine with the WAMP application. We do not recommend using Windows for production environments.

6.2. Installation for validation or production

6.2.1. WampServer

Download and install WampServer (accept default options if in doubt).
Restart WampServer to make these changes effective.
Open http://localhost/ in your browser. If the WampServer welcome screen with server configuration info appears, it means WampServer is working.
Click on the WampServer icon in your status bar and go to PHP -> Extensions. Make sure all the following extensions are enabled: php_curl, php_gd, php_intl, php_ldap, php_mbstring, php_mysqli, php_soap, php_xml, php_zip
Edit C:\wamp64\bin\php\php8.3\php.ini, locate ";extension=sodium" and remove the ";" from the beginning of the line.
Also, update the "memory_limit" setting from "128M" to "512M" and a few other settings as shown below.
    display_errors = Off
    memory_limit = 512M
    session.cookie_httponly = 1
    upload_max_filesize = 100M
    post_max_size = 100M
    short_open_tag = Off
    opcache.enable = 1
    opcache.memory_consumption = 128
    opcache.max_accelerated_files = 10000
    pcre.jit = 0
    #...
    extension=sodium
Save and restart WampServer.

Note: If you use your Windows machine for development, you might get errors related to VisualC++. The error itself will point to wampserver.aviatechno.net, which seem to be a valid source to download a VisualC++ patch. We do not take responsibility about software from other sources. Do your own research.

6.2.2. Database

Click on the WampServer icon in the status bar (bottom right) and select PhpMyAdmin.
Choose the MariaDB service and connect to the root user. Enter the root password you set during WampServer installation (probably still empty).

In the "Databases" tab, prepare a new database with the name "chamilo".

For encoding, choose "utf8mb4_general_ci".
We recommend setting a proper user and password for that specific database, but the root account should also be secured with a different password if you plan to expose this to the internet.
Click "Create".

6.2.3. Chamilo

Download the latest install-ready package available for version 3 from https://github.com/chamilo/chamilo-lms/releases.
Unzip the package in C:\wamp64\www\chamilo.
Create a ".env" file at the root of the chamilo2 folder (C:\wamp64\www\chamilo\.env).
If this is not a stable version package, edit the ".env.dist" file and set APP_ENV to "prod".

6.2.4. Apache

Open the Apache configuration file at C:\wamp64\bin\apache\apache2.4.*\conf\extra\httpd-vhosts.conf.
Modify the contents of the file to something like this:
  <VirtualHost *:80>
  DocumentRoot "C:/wamp64/www/chamilo/public"
  ServerName chamilo.local
  <Directory "C:/wamp64/www/chamilo/public">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>

6.2.5. Installation wizard

Open your browser on http://chamilo2.local. The installation wizard should appear.
Follow the instructions to complete the installation.
Note that it is difficult to change URLs later, so if you plan to publish this service online, make sure you have properly configured your domain name first.

6.3. Installation for developers

If you want to *develop* Chamilo, you will need still need to install WampServer as detailed above, but you will also need a few additional components to be able to prepare the package from Git.

6.3.1. WampServer

See above.

6.3.2. Composer

Download and install Composer (accept default options if in doubt).
If the installation is correct, you should be able to run "composer -V" in a command prompt (PowerShell or CMD) and see the version of Composer appear (probably 2.x).

6.3.3. Node.js

To install Node.js, you can use the official installer from https://nodejs.org/en/download/ using the .msi package.
Follow the default installation options (Next, Next, Install).
Once the installation is complete, you can run "node -v" in a command prompt (PowerShell or CMD) and see the version of Node.js appear (probably 16.x).
Then we need to install Yarn. In a command prompt *as administrator*, run "corepack enable".
Check the installation with "yarn --version", then run "corepack prepare yarn@stable --activate".

6.3.4. Database

See above.

6.3.5. Chamilo

In a PowerShell or CMD:
    cd C:\wamp64\www
    git clone -b master --depth 1 https://github.com/chamilo/chamilo-lms.git chamilo
    cd chamilo
    composer install
    yarn up
    yarn install
    yarn dev
Create a ".env" file at the root of the chamilo2 folder (C:\wamp64\www\chamilo\.env).

6.3.6. Apache

See above.

6.3.7. Installation wizard

Open your browser on http://chamilo.local. The installation wizard should appear.
Follow the instructions to complete the installation.
Note that it is difficult to change URLs later, so if you plan to publish this service online, make sure you have properly configured your domain name first.

6.4. Windows install with IIS

For performance reasons, you might want to install Chamilo on Windows using IIS as a web server.

The procedure described below is experimental, so if you believe you can improve this, please open an issue on Github for us with the proposed changes.

6.4.1. MariaDB

First install MariaDB from the official website (https://mariadb.org/download/) and follow the default installation options (Next, Next, Install).

Make sure you have a database Windows client at hand as we will have (preferrably) to define permissions for a Chamilo-specific user.

Once installed, open the database client and create a user through the interface or issuing the following query (adapted to your needs):
mariadb> GRANT ALL PRIVILEGES ON chamilo.* TO chamilo@localhost IDENTIFIED BY 'some-password';
Exit the SQL client.

6.4.2. IIS and URL Rewrite

If you are working on a Windows server, you should have IIS installed already. If not, you can download it from the official website (https://www.iis.net/downloads).

With IIS, you will need the URL Rewrite module. You can download it from the official website (https://www.iis.net/downloads/microsoft/url-rewrite).

Once installed, you will need to restart IIS, close the network manager window if open, and possibly reboot the whole Windows machine for it to appear in the Site management (not the server management section).

Before you move on, Make sure you visit the Request Filter page on the site that will be used to host Chamilo, and change the default filter to allow for a larger maximum authorized length of content (bytes). This value will otherwise limit the maximum upload you can send to Chamilo. 1GiB (i.e. 1,000,000,000 bytes) is a reasonable value if you start uploading big SCORM courses, for example.

6.4.3. IIS, CGI and PHP

Once you have installed IIS and the URL Rewrite module, you will need to configure the CGI and PHP settings.

CGI is an IIS module to enable (it's already present but needs activating) in the server manager. Open the server manager, click Manage > Add roles and features > pass screens until "Server roles". Select "CGI" under "Web Server (IIS) > Web Server > Application Development, then confirm the installation.

Download PHP 8.3 (or 8.4/8.5) for Windows from the official website (https://windows.php.net/download#php-8.3) (simple Zip version).

This might require (depending on your setup) to install the VC++ libraries in version 14, which come from VStudio v16 (between others). If you don't have them yet on the Windows Server, you can download them from here depending on your architecture: x64 or x86.

Add PHP to the PATH environment variable (e.g. C:\php): Settings > System > About > Advanced system settings > Environment variables, then select "Path", click "Modify", click "New" and introduce "C:\PHP", then validate twice.

In the IIS manager window, when the server is selected and you click on the Mappings manager, click on the "Add module mapping..." in the right panel and make sure request path "*.php" is mapped to the FastCgiModule. If not, add it.

Find the C:\php\php.ini file (or any other place you might have given the PHP installer script to register to).

Enable the following PHP extensions (look for ";extension=" and remove the ";" from the beginning of the line):
Make sure the [opcache] section has opcache.enable=1 *and* opcache.memory_consumption=256 or any higher value so that OpCache can be used. Otherwise it is present but not used. Save the file.

Set (or wait for the install wizard to tell you) the settings suggested by Chamilo's install wizard.

6.4.4. Chamilo

Once you have installed IIS, the URL Rewrite module and PHP, you can download Chamilo from the official downloads page (https://github.com/chamilo/chamilo-lms/releases).

Unzip the package in the "wwwroot" folder of your IIS installation (e.g. C:\inetpub\wwwroot).

Chamilo 3+ need you to configure the web server so the root path is the "public/" folder of Chamilo.

Create an empty ".env" file at the root of the chamilo folder (e.g. C:\inetpub\wwwroot\chamilo\.env).

Change permissions so the web server user is able to write to var/, config/ and .env during the installation. These permissions can be removed later on, to the exception of var/ which has to remain writable by the webserver. These permissions need to be set in a way that the owner of the IIS service (possibly "System" or "IIS_IUSRS") can read and write to those files and folders, otherwise the installation script (which needs to write some files) will not be able to proceed.

This is a specific change for IIS: edit the config\packages\monolog.yaml file and change all path: php://stderr for path: "%kernel.logs_dir%/%kernel.environment%.log" . This is due to an issue with file management for PHP on Windows with Symfony. Please note that until we find a portable solution, this will need to be modified again after each Chamilo update.

After this, load the URL in your browser, as you have defined it in the ISS site configuration.

The Chamilo installation wizard should appear.

Follow the instructions to complete the installation.

6.5. Redis

For better performance in the highly dynamic interfaces of Chamilo, you might want to install the PHP Redis extension from the official PHP website, for example (adapt PHP and Redis version numbers) https://downloads.php.net/~windows/pecl/releases/redis/6.*.*/php_redis-6.*.*-8.3-ts-vs16-x64.zip This is *not necessary* to install Chamilo (so you can do it afterwards or never do it at all if you don't experience session issues). Download, unzip and place the .dll file into C:\wamp64\bin\php\php8.3.*\ext\ then add "extension=php_redis.dll" at the end of C:\wamp64\bin\php\php8.3.*\php.ini and restart the WampServer and finally select the extension in PHP -> Extensions again). You will also need to have a Redis server running. This is tricky because there is no native implementation of Redis for Windows, so you have several choices but none is easy. The way we did it is to setup an Ubuntu virtual machine using HVM (Hyper-V Virtual Machine Manager) and install Redis on it. Once you spawned an Ubuntu 24.04 LTS virtual machine, you can issue those simple commands (we use 192.168.1.100 as the IP address of the virtual machine, make sure you update that depending on the effective IP address your VM is assigned):
    sudo apt update
    sudo apt install redis-server
    sudo vim /etc/redis/redis.conf
    # add "bind 192.168.1.100" at the end of the file and comment the "bind 127.0.0.1 -::1" line if you see it uncommented.
    sudo systemctl restart redis-server
Inside your WampServer configuration, in the httpd-vhosts.conf file, add the following lines *inside* the <VirtualHost> tag (only if you use Redis):
    php_admin_value session.save_handler "redis"
    php_admin_value session.save_path "tcp://192.168.1.100:6379"
Restart the WampServer and you should be able to access Chamilo.

7. Xapian text indexation

Xapian allows you to index texts and documents in Chamilo and search them using a full-text search engine.
However, installing Xapian is not trivial and requires a few manual steps.
This is probably not supported for Windows setups (untested), but it should work on Linux and macOS.
To install Xapian (a requirement to use the internal search engine), follow the instructions below.
      sudo apt install libxapian-dev catdoc html2text unrtf ghostscript poppler-utils build-essential php-dev
      cd /tmp
      wget https://oligarchy.co.uk/xapian/1.4.25/xapian-bindings-1.4.25.tar.xz
      # use 1.4.25 because this matches the version of the libxapian-dev package on Ubuntu 25.04
      tar -xJf xapian-bindings-1.4.25.tar.xz
      cd xapian-bindings-1.4.25
      ./configure
      make install
      cd /etc/php/8.3/mods-available
      echo "extension=xapian.so" >> xapian.ini
      cd /etc/php/8.3/apache2/conf.d
      ln -s ../../mods-available/xapian.ini 26-xapian.ini
      systemctl restart apache2
  
This should make the Xapian extension available from Chamilo.
Next, go to Settings -> Search -> Enable, and follow the instructions there.
Once this is done, a checkbox will appear in several tools when uploading, creating or editing different elements, to ask you wether to index these or not.
Finally, a search box appears in the "My courses" page, allowing you to search for content through the whole platform.

8. Help available

If you are struggling with this guide, don't hesitate to ask for help on our community forum.
If you have reasons to seek professional assistance and warranties, please contact one of our official providers. They contribute to the project and will be able to help you out quickly and efficiently, for configurations from 10 users to 1M users.

Last updated: 2026-07-28 Valid XHTML 1.0 Transitional Valid CSS

To be added to the installation/upgrade guides:
- yarn dev required on sub-language update if terms in assets/locales