Two deployment pathways for your educational platform. Complete walkthrough of LAMP manual configuration on Ubuntu Server versus deploying local Virtual Appliances, Docker containers, or Amazon Cloud images.
sudo apt update && sudo apt upgrade -y
sudo apt install apache2 mariadb-server mariadb-client -y
sudo apt install php8.2 php8.2-cli php8.2-common php8.2-mysql php8.2-xml php8.2-curl php8.2-gd php8.2-intl php8.2-mbstring php8.2-zip php8.2-soap php8.2-bcmath libapache2-mod-php8.2 -y
sudo apt install git nano cron sendmail certbot python3-certbot-apache unzip rsync net-tools -y
sudo a2enmod rewrite ssl headers
sudo systemctl restart apache2
sudo mysql_secure_installation
CREATE DATABASE moodle_ulo2026demo CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'moodleDemo2026'@'localhost' IDENTIFIED BY '2026DemoRegular!!';
GRANT ALL PRIVILEGES ON moodle_ulo2026demo.* TO 'moodleDemo2026'@'localhost';
FLUSH PRIVILEGES;
sudo nano /etc/php/8.2/apache2/php.ini
upload_max_filesize = 1080M; post_max_size = 1080M; max_execution_time = 3600
memory_limit = 512M; max_input_vars = 7000; max_input_time = 300
opcache.enable=1; opcache.memory_consumption=256
sudo systemctl restart apache2
cd /var/www
sudo git clone -b MOODLE_500_STABLE git://git.moodle.org/moodle.git moodl_ulo2026demo
sudo chown -R www-data:www-data /var/www/moodl_ulo2026demo
sudo chmod -R 755 /var/www/moodl_ulo2026demo
sudo fdisk /dev/sdb # n → p → Enter → w
sudo mkfs.ext4 /dev/sdb1
sudo mkdir -p /var/moodledata
sudo mount /dev/sdb1 /var/moodledata
sudo blkid /dev/sdb1 | tee -a /etc/fstab # add UUID line with defaults,noatime 0 2
sudo chown -R www-data:www-data /var/moodledata && sudo chmod -R 770 /var/moodledata
cd /var/www/moodl_ulo2026demo && sudo cp config-dist.php config.php
$CFG->dbtype='mariadb'; $CFG->dbhost='localhost'; $CFG->dbname='moodle_ulo2026demo';
$CFG->dbuser='moodleDemo2026'; $CFG->dbpass='2026DemoRegular!!';
$CFG->wwwroot='https://classroom.ulo2026demo.com'; $CFG->dataroot='/var/moodledata';
$CFG->directorypermissions=02775; $CFG->disablelogintoken=true;
sudo nano /etc/apache2/sites-available/moodle.conf
sudo a2ensite moodle.conf; sudo a2dissite 000-default.conf
sudo certbot --apache -d classroom.ulo2026demo.com
sudo certbot renew --dry-run
sudo crontab -u www-data -e
* * * * * /usr/bin/php /var/www/moodl_ulo2026demo/admin/cli/cron.php > /dev/null
sudo systemctl enable cron; sudo systemctl start cron
sudo -u www-data php /var/www/moodl_ulo2026demo/admin/cli/cron.php
sudo apt install sendmail -y; sudo sendmailconfig
sudo mount -a; df -h | grep moodledata
mysql -u root -p moodle_ulo2026demo -e "DELETE FROM mdl_task_adhoc WHERE classname LIKE '%restore%';"
mysql -u root -p moodle_ulo2026demo -e "DELETE FROM mdl_backup_controllers;"
sudo rm -rf /var/moodledata/temp/backup/* /var/moodledata/cache/*
sudo apt install redis-server php8.2-redis -y
sudo systemctl enable redis
sudo chown -R www-data:www-data /var/moodledata /var/www/moodl_ulo2026demo
sudo chmod -R 755 /var/www/moodl_ulo2026demo
sudo chmod -R 770 /var/moodledata
sudo ufw allow 22/tcp; sudo ufw allow 80/tcp; sudo ufw allow 443/tcp
sudo ufw enable
# Download Bitnami Moodle VM from bitnami.com
# Import to VirtualBox/VMware
# Default credentials: user / bitnami
# Access Moodle at http://SERVER-IP
# SSH: ssh bitnami@SERVER-IP
docker run -d --name moodle -p 8080:8080 -p 8443:8443 \
-e MOODLE_USERNAME=admin \
-e MOODLE_PASSWORD=bitnami123 \
-e MOODLE_EMAIL=admin@example.com \
-e MOODLE_SITE_NAME="ulo2026 demo LMS" \
bitnami/moodle:latest
/opt/bitnami/moodle.
# Launch from AWS Marketplace "Bitnami Moodle"
# SSH into instance: ssh -i key.pem bitnami@PUBLIC_IP
# Moodle located at /opt/bitnami/moodle
# Data directory: /bitnami/moodledata
/opt/bitnami.
# Installation paths
/opt/bitnami/moodle # Moodle application code
/bitnami/moodledata # User uploaded files (persistent storage)
/opt/bitnami/mysql/bin # Database binaries
/opt/bitnami/apache2/conf # Apache configuration
/opt/bitnami/php/etc/php.ini # PHP configuration
# Control script
sudo /opt/bitnami/ctlscript.sh start|stop|restart|status
# Backup first!
sudo mv /bitnami/moodle /bitnami/moodle.backup
# Download new Moodle version
wget http://download.moodle.org/download.php/direct/stable500/moodle-latest-500.tgz
sudo mkdir /bitnami/moodle
sudo tar -xzvf moodle-latest-500.tgz -C /bitnami/moodle --strip 1
# Restore config and customizations
sudo cp -a /bitnami/moodle.backup/config.php /bitnami/moodle/
sudo cp -a /bitnami/moodle.backup/theme/YOUR_THEME /bitnami/moodle/theme/
# Fix permissions (Bitnami uses 'daemon' user)
sudo chown daemon:daemon -LR /opt/bitnami/moodle
sudo chmod -R g+rwX /opt/bitnami/moodle
sudo chown root /opt/bitnami/moodle/config.php
sudo chmod 640 /opt/bitnami/moodle/config.php
sudo php /opt/bitnami/moodle/admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci
# Update config.php with:
# $CFG->dboptions = array('dbcollation' => 'utf8mb4_unicode_ci');
sudo /opt/bitnami/ctlscript.sh restart
# Web Interface: Site admin -> Plugins -> Install plugins
# Manual upload: Upload plugin zip, then:
unzip plugin.zip -d /opt/bitnami/moodle/mod/
# Dev git clone:
cd /opt/bitnami/moodle/mod && git clone https://github.com/USER/plugin.git
# HTTP_HOST undefined error fix inside config.php:
$CFG->wwwroot = 'http://YOUR-SERVER-IP/moodle';
# Enable debugging mode inside config.php:
$CFG->debug = 32767;
$CFG->debugdisplay = 1;
# Watch log sheets:
sudo tail -f /opt/bitnami/apache2/logs/error_log
sudo tail -f /opt/bitnami/php/logs/php_error.log
$CFG->dbname='moodle_ulo2026demo';
$CFG->dbuser='moodleDemo2026';
$CFG->dbpass='2026DemoRegular!!';
$CFG->wwwroot='https://classroom.ulo2026demo.com';
$CFG->dataroot='/var/moodledata';
As of August 2025, Bitnami moved Moodle to legacy/unmaintained status. Use for development/testing or be prepared to maintain your own container.
sudo /opt/bitnami/ctlscript.sh start
sudo /opt/bitnami/ctlscript.sh stop
mysqldump -u root -p bitnami_moodle > backup.sql