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 its first boot the instance 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 AWS account subscribed to the CloudSOE Moodle listing on AWS Marketplace
- An EC2 key pair in your target region (SSH is key-based only; password login is disabled)
- About ten minutes
Step 1 — Launch the instance
- Open the Moodle listing on AWS Marketplace and click Continue to Subscribe, then Continue to Configuration.
- Pick your region and click Continue to Launch → Launch through EC2.
- Choose an instance type.
t3.medium(2 vCPU, 4 GB RAM) is a good starting point for a small-to-medium site. - Select your key pair, and give the root volume at least 30 GB — course files live on this disk.
Prefer the CLI? Once subscribed:
aws ec2 run-instances \
--image-id <ami-id-from-the-listing> \
--instance-type t3.medium \
--key-name my-key \
--security-group-ids sg-xxxxxxxx \
--subnet-id subnet-xxxxxxxx \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=moodle-01}]'
Step 2 — Open the firewall ports
Your security group needs exactly three inbound rules:
| Port | Protocol | Purpose |
|---|---|---|
| 22 | TCP | SSH and SFTP administration |
| 80 | TCP | HTTP (redirects to HTTPS) |
| 443 | TCP | HTTPS (Moodle) |
Restrict port 22 to your own IP range where possible.
Step 3 — Let first boot finish
On the very first boot the instance runs a one-time setup service that:
- creates the Moodle database and a unique database password,
- generates a self-signed TLS certificate for your instance’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 debian@<public-ip>
systemctl status moodle-firstboot
Note the SSH user: this image is built on Debian 12, so the admin user is debian, not ubuntu.
Step 4 — Retrieve your credentials
The login banner (MOTD) shows your instance’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
Browse to https://<public-ip>/ (plain HTTP redirects here automatically). Your browser will warn about the self-signed certificate — that’s 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
- Configure Moodle — file locations, database access, HTTPS and domains
- Tips & tricks — backups, cron, performance and troubleshooting