The CloudSOE Moodle image gives you a complete Moodle 5.2 LMS (Apache, PHP 8.4, MariaDB, phpMyAdmin and SFTP) on a hardened Debian 12 base. The image contains no baked-in passwords: on first boot the VM creates its database, generates a per-instance TLS certificate and runs the Moodle command-line installer with a fresh admin password. There is no web installer to click through: you log in with generated credentials.

What you’ll need

  • An Azure subscription
  • An SSH public key (password login is disabled in the image)
  • About ten minutes

Step 1: Create the VM

  1. Find the CloudSOE Moodle offer in the Azure Marketplace and click Create.
  2. Choose a resource group, region and VM name.
  3. Pick a size: 2 vCPU / 4 GB (for example Standard_B2s or Standard_D2as_v4) suits small-to-medium sites.
  4. Under Administrator account, select SSH public key, pick a username (e.g. azureuser) and paste your key. This account is the uid-1000 admin user that owns the credentials file and gets SFTP write access to the Moodle data directory.
  5. Create or attach a public IP so you can reach the site. For production, make it Static so the address survives stop/start.

Step 2: Open the firewall ports

In the VM’s network security group, allow inbound:

PortProtocolPurpose
22TCPSSH and SFTP administration
80TCPHTTP (redirects to HTTPS)
443TCPHTTPS (Moodle)

Restrict port 22 to your own IP range where possible.

Step 3: Let first boot finish

On the very first boot the VM runs a one-time setup service that:

  • creates the Moodle database and a unique database password,
  • generates a self-signed TLS certificate for your VM’s public IP,
  • runs the Moodle CLI installer with your public IP as the site URL,
  • generates the Moodle admin password and saves all credentials to a protected file.

The install takes a few minutes. You can watch it:

ssh <admin-user>@<public-ip>
systemctl status moodle-firstboot

Step 4: Retrieve your credentials

SSH in with the admin username you chose at deployment. The login banner (MOTD) shows the VM’s public IP and points at the credentials file:

sudo cat /opt/moodle/default-moodle-credentials.txt

This file (mode 600) holds the Moodle admin password generated on first boot, plus the MariaDB credentials (also your phpMyAdmin login).

Step 5: Log in to Moodle

From your own machine (note: an Azure VM often cannot reach its own public IP from inside), browse to https://<public-ip>/ (plain HTTP redirects to HTTPS automatically). Your browser will warn about the self-signed certificate, which is expected on a fresh instance; see the configuration guide for switching to a trusted certificate and your own domain.

Log in as admin with the password from the credentials file, then change it under your profile preferences. Moodle is fully installed. Start creating courses.

Next steps