How can we help?
< All Topics

Setting Up Moodle on Server Stadium


Moodle is a free and open-source learning management system (LMS) widely used by educational institutions and organizations to create online courses. By setting up Moodle on a Server Stadium dedicated server or VM, you can leverage powerful server capabilities to deliver a seamless and scalable e-learning experience. This guide will walk you through installing Moodle on Server Stadium’s infrastructure.


  • A Server Stadium VM or dedicated server running Ubuntu 20.04 LTS or 22.04 LTS. Ensure your server has at least 2GB of RAM for optimal performance. If you do not have one, sign up here.
  • Administrative or sudo privileges on your server.

Step 1: Prepare Your Server

  1. Update and Upgrade Your Server
    Start by ensuring your server’s packages are up-to-date:

    sudo apt update
    sudo apt upgrade

  2. Install Apache, MySQL, and PHP
    Moodle requires a web server, a database, and PHP. Install Apache, MySQL, and PHP along with necessary PHP extensions:

    sudo apt install apache2 mysql-server php php-mysql libapache2-mod-php php-xml php-cli php-curl php-zip unzip curl

Step 2: Install Moodle

  1. Download Moodle
    Download the latest version of Moodle from the official website:

    curl -O
    tar -zxvf moodle-latest-404.tgz

  2. Move Moodle Files to Web Directory
    Move the extracted Moodle files to your web directory:

    sudo mv moodle /var/www/html/moodle
    sudo chown -R www-data:www-data /var/www/html/moodle
    sudo chmod -R 755 /var/www/html/moodle

  3. Create a Moodle Data Directory
    Create a directory for Moodle to store uploaded files:

    sudo mkdir /var/www/moodledata
    sudo chown -R www-data /var/www/moodledata

Step 3: Configure Database for Moodle

  1. Create MySQL Database and User
    Log into MySQL and create a database and user for Moodle:

    sudo mysql -u root -p
    CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    GRANT ALL PRIVILEGES ON moodle.* TO 'moodleuser'@'localhost' IDENTIFIED BY 'password';

Step 4: Complete Moodle Installation

  1. Configure Moodle through the Web Installer
    Open your web browser and go to http://<your-server-ip>/moodle to start the Moodle installation process. Follow the on-screen instructions to complete the configuration.


Setting up Moodle on Server Stadium allows you to host your own e-learning environment, providing educational institutions with a scalable and reliable platform for online learning.

For further assistance or to explore more about our hosting solutions, visit our knowledge base or the Server Stadium website.

Table of Contents