Install Moodle 4.3 on Ubuntu 22.04: A Step-by-Step Tutorial

Moodle website

Moodle, an acronym for Modular Object-Oriented Dynamic Learning Environment, is a robust open-source platform designed to facilitate online learning and course management. Developed by Martin Dougiamas in 2002, Moodle has evolved into one of the most widely used Learning Management Systems (LMS) globally.

Whether you are an educator, administrator, or learner, Moodle offers a robust and flexible environment for creating and participating in online courses. In this tutorial, we will learn how to install Moodle 4.3 with the following specifications:

  • Vultr Cloud Server: 1 CPU, 1 GB RAM, 32 GB Storage
  • Operating System: Ubuntu 22.04 LTS
  • Subdomain: lms.aminlabs.my.id
  • SSL: Let’s Encrypt
  • Web Server: Apache
  • PHP: PHP v8.1
  • Database: MariaDB v10.6
  • Moodle: Moodle v4.3.2

Note: Register here to get $100 free credit from Vultr.

Step 1: Update system packages

Connect to your server and ensure your system packages are up-to-date:

Note: This tutorial uses the root user.

Step 2: Install dependencies

Install the required dependencies for Moodle, Apache web server, PHP, and MariaDB database:

Open the php.ini configuration file:

Activate and configure the following settings:

Step 3: Create a Database

Login to MariaDB:

Creating a database for Moodle:

Step 4: Download Moodle

Download Moodle v4.3.2 from download.moodle.org:

Extract moodle-4.3.2.tgz:

Move the moodle directory to /var/www/lms.aminlabs.my.id/moodle-app:

Create the moodle-data directory:

Change user-group and permissions for the lms.aminlabs.my.id directory.

Step 5: Configure Virtual Host

Create a virtual host configuration for the subdomain lms.aminlabs.my.id:

Insert the following virtual host configuration:

Enable the rewrite module, virtual host, and restart Apache:

Check the status of the UFW firewall:

If UFW is active, allow HTTP and HTTPS ports:

Browse the subdomain to test whether Moodle is accessible:

Moodle with HTTP protocol
Moodle with HTTP protocol

Step 6: Configure HTTPS using Let’s Encrypt SSL

Install certbot:

Requesting an SSL certificate for the subdomain:

Example message displayed when the SSL certificate request is successful:

Browse the subdomain to test the results of the HTTPS configuration:

Moodle with HTTPS protocol
Moodle with HTTPS protocol

Step 7: Web installation

Continue the installation in the web browser. Choose the language, for example English (en), then click the Next.

Enter the path for the Moodle Data directory, which is /var/www/lms.aminlabs.my.id/moodle-data, then click the Next:

Confirm path
Confirm path

Database driver, choose MariaDB (native/mariadb), then click Next.

Enter database settings. Input Database name, Database user, and Database password. Then click Next:

Database settings
Database settings

Copyright notice, click Continue to confirm.

Checking if the server environment meets all the requirements. Click Continue if everything is OK:

Check software requirements
Check software requirements

The installation is in progress, click Continue when it’s finished:

Progress of Moodle installation
Progress of Moodle installation

Creating an admin account, then click Update profile.
Configure Site home settings, then click Save changes:

Site home settings
Site home settings

The installation of Moodle has been completed. Site registration, click Skip.

Moodle dashboard
Moodle dashboard

Congratulations! We have successfully installed Moodle 4.3 on Ubuntu 22.04. Let’s explore the platform’s features, customize our courses, and embark on a journey of seamless online learning with Moodle.

Leave a Reply

Your email address will not be published. Required fields are marked *