Moodle: step 1. Installing on a CloudPanel server

In the examples my-school.com is your site domain, myschool is the site user and 203.0.113.10 is the server address. Use your own values.

1. Create the site

  1. Log in to CloudPanel. Click "+ Add Site" → "Create a PHP Site".
  2. Application: Moodle 5. The panel sets up the web server for Moodle.
  3. Domain Name: my-school.com. PHP Version: 8.4.
  4. Site User and password: you log in over SSH with them. Save the password.
  5. Click "Create".
New PHP site: Moodle 5 application, PHP 8.4
New PHP site: Moodle 5 application, PHP 8.4

2. Create the database

  1. Site → "Databases" tab → "Add Database".
  2. Database name: my-school-db. User: my-school-user. Generate and save a password.
  3. Click "Add Database".
New database for Moodle
New database for Moodle
Database and user created
Database and user created

3. Upload Moodle

Connect via SSH as the site user: ssh myschool@203.0.113.10. Run the commands one by one:

cd ~/htdocs
wget https://download.moodle.org/download.php/direct/stable503/moodle-5.3.tgz -O ~/tmp/moodle.tgz
rm -rf my-school.com/*
tar xzf ~/tmp/moodle.tgz --strip-components=1 -C my-school.com
mkdir ~/moodledata
rm ~/tmp/moodle.tgz
  • Moodle files end up in /home/myschool/htdocs/my-school.com.
  • The /home/myschool/moodledata folder holds course files. It is outside the site and not reachable from the internet.
File Manager: moodledata in the home folder
File Manager: moodledata in the home folder

The latest Moodle is on download.moodle.org. Replace the version number in the link.

4. Set the root directory

Moodle 5 is served from the public folder. Without this setting Moodle shows an error.

  1. Site → "Settings" tab → "Domain Settings".
  2. Root Directory: my-school.com/public.
  3. Click "Save".
Root directory: my-school.com/public
Root directory: my-school.com/public

5. Run the installer

Open https://my-school.com/install.php in the browser. Without a certificate yet, the browser warns — click "Advanced" → "Proceed".

  1. Language — the installer language. Click "Next".
Installer language
Installer language
  1. Paths. The web address and Moodle directory are filled in. Data directory: /home/myschool/moodledata. Click "Next".
Web address, Moodle directory and data directory
Web address, Moodle directory and data directory
  1. Database driver: "Improved MySQL (native/mysqli)". Click "Next".
Database driver
Database driver
  1. Database settings: host localhost, database name, user and password from item 2. Keep the mdl_ prefix. Click "Next".
Database connection
Database connection
  1. License: click "Continue".
  2. Server checks: every line must be "OK". Click "Continue".
Moodle license
Moodle license
Server checks: all requirements met
Server checks: all requirements met
  1. Installation takes 5–10 minutes. Keep the page open. When the "Continue" button appears at the bottom, click it.
Installing Moodle components
Installing Moodle components

6. Administrator and site settings

  1. Administrator account: username, password (8+ characters: a digit, lower and upper case letters, a special character), first and last name, e-mail. Click "Update profile".
Administrator account
Administrator account
  1. Front page settings: full and short site name, time zone Europe/Kyiv, no-reply address. Click "Save changes".
Site name and time zone
Site name and time zone

Installation is complete. The administrator dashboard opens.

Moodle administrator dashboard
Moodle administrator dashboard

Next: step 2. SSL and cron.

Questions and answers
From the official Moodle website.
Yes, Moodle requires a MySQL database.
Check file location and database settings.
Yes, using the File Manager.