Moodle server requirements define the minimum hardware, software, and database setup needed to run a Moodle learning platform reliably. You need a web server (Apache or Nginx), a database (MySQL, MariaDB, or PostgreSQL), and PHP, plus enough CPU, RAM, and storage for your user count and course size. This guide breaks down each requirement, explains how to choose the right setup, and answers common questions about sizing and performance.
Core Software Requirements
Moodle is a PHP application, so the foundation is a server running PHP with a compatible database and web server. As of Moodle 4.x, the officially supported stack is:
- PHP: version 8.1 or later (8.2 and 8.3 are recommended for better performance). PHP extensions like
intl,curl,zip, andgdare required. - Database: MySQL 8.0+, MariaDB 10.6+, or PostgreSQL 13+. The database stores all course content, user data, and logs.
- Web server: Apache 2.4+ or Nginx 1.18+. Both work well; Apache is more common in shared hosting, Nginx often performs better under load.
- Operating system: Linux (Ubuntu, Debian, CentOS) is the standard, but Windows Server and macOS are also supported for smaller installs.
These are the versions that Moodle officially tests against. Using older versions may still work but can cause security or compatibility issues.
Hardware Requirements by Scale
The hardware you need depends almost entirely on how many concurrent users you expect and how large your courses are. Moodle’s official documentation gives a rough guide:
- Small deployment (up to 50 concurrent users): 2 CPU cores, 4 GB RAM, 50 GB disk. Suitable for a small school or training company.
- Medium deployment (50–500 concurrent users): 4 CPU cores, 8 GB RAM, 150 GB disk. This handles a typical university department or mid-size organization.
- Large deployment (500–2000 concurrent users): 8–16 CPU cores, 16–32 GB RAM, 500 GB+ disk. Requires separate database and web servers, plus caching.
- Very large (2000+ concurrent users): Clustered setup with load balancers, multiple web nodes, and a dedicated database server with replication.
These are starting points, not guarantees. A course with many video files or simultaneous quizzes will need more resources than a text-only course.
Storage and File Handling
Moodle stores course files, user uploads, and backups. The default file system stores everything on the server’s disk, but you can also use external storage like Amazon S3 or an NFS mount. Key considerations:
- Disk space: Plan for at least 10 GB per 1,000 users, plus room for course content. A single video-heavy course can easily exceed 5 GB.
- Backups: Moodle’s own backup system creates compressed archives of courses. These can double your storage usage, so factor that in.
- Performance: Use SSD storage for the database and for the Moodle data directory. Traditional spinning disks become a bottleneck with many concurrent file reads.
You can also configure a separate filedir on a different disk, which helps isolate I/O load.
Database Tuning and Choice
The database is often the first thing to slow down as your user count grows. MySQL and MariaDB are the most common choices, but PostgreSQL is also fully supported and some administrators report better performance with large datasets. What matters most is configuration:
- Set
innodb_buffer_pool_sizeto about 70% of available RAM for MySQL/MariaDB. - Enable query caching where appropriate (though MySQL 8 removed it; use performance schema instead).
- Use a dedicated database server when you exceed 200 concurrent users. Running web and database on the same box is fine for small sites but causes contention under load.
- Schedule regular maintenance:
OPTIMIZE TABLEandANALYZE TABLEkeep indexes efficient.
Moodle also supports multiple database read replicas for large installations, but that requires custom configuration and is not for beginners.
Caching and Performance Extras
Moodle has a built-in caching system that can dramatically reduce server load. For production, you should configure a cache backend other than the default file cache:
- Redis – recommended for session storage and application cache. Fast, in-memory, and easy to set up.
- Memcached – another in-memory cache, slightly older but still supported.
- MUC (Moodle Universal Cache) – lets you assign different cache stores for different purposes (e.g., Redis for sessions, file cache for language strings).
Also enable HTTP caching for static files (CSS, JS, images) via your web server. This reduces the load on PHP and the database for repeat visitors.
Common Problems and Misconceptions
A frequent misconception is that Moodle’s minimum requirements (which are quite low) are enough for a real deployment. The official minimums are just enough to install and test – they will not handle more than a handful of users without severe lag.
Another common issue is running Moodle on shared hosting. Most shared plans do not allow the required PHP extensions or give you enough memory. Moodle needs at least 128 MB of PHP memory per request, and many shared hosts cap at 64 MB.
Also, people often forget about the cron job. Moodle runs scheduled tasks (sending emails, processing gradebook updates) via a cron script. If cron is not set up, the site appears to work but background tasks fail silently. Set it to run every minute on Linux via crontab.
How to Choose the Right Setup
Start by estimating your peak concurrent users – not total users, but how many will be online at the same time. A school with 1,000 students might only have 100 concurrent during a test hour. Then consider:
- Will you host video? If yes, stream from a separate service (like YouTube unlisted or Vimeo) to avoid loading your server.
- Will you run big quizzes or assignments at a fixed time? That creates a spike.
- Do you need high availability? If downtime is unacceptable, you need redundancy.
For most small to medium deployments, a single server with 8 GB RAM, 4 cores, and an SSD is a safe starting point. You can always scale up later – Moodle is designed to move to a cluster as you grow.
Frequently Asked Questions
Can I run Moodle on a Raspberry Pi?
Technically yes, but only for testing. A Raspberry Pi 4 with 4 GB RAM can run a small Moodle site for a few users, but it will be slow and is not suitable for any real production use.
Does Moodle work with cPanel shared hosting?
Some cPanel hosts work if they offer PHP 8.1+ and allow you to change PHP settings. However, most shared hosts lack the memory and CPU for more than a handful of users. A VPS is strongly recommended.
What is the best database for Moodle?
MySQL and MariaDB are the most widely used and have the most community support. PostgreSQL is also excellent and may handle very large sites better, but you’ll find fewer tutorials. Stick with MySQL/MariaDB unless you have a reason to switch.
How much RAM do I need for 100 concurrent users?
Roughly 8 GB is enough if you have a separate database server or a well-tuned single server. Each PHP process can use 128–256 MB, and you’ll have several running at once.
Do I need SSL/HTTPS for Moodle?
Yes, absolutely. Moodle sends login credentials and session cookies. Without HTTPS, passwords are transmitted in plain text. Modern browsers also block some features on non-secure pages. Let’s Encrypt provides free SSL certificates.
Can I upgrade from a small to a large setup without reinstalling?
Yes. You can move Moodle to a bigger server by copying the files and database, then updating the config.php paths. For clustering, you can add web nodes behind a load balancer, but that requires more advanced configuration.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Business partnership due diligence checklist what to verify before you sign?
- Does the FCC Protect Internet Privacy?
- Disaster Robbers Codes? Meaning & Origin
- Repair a Disk with Mac Disk Utility
- Sharp Smart TV TiVo OS Available February?
- Streamlabs Stream Boss: Setup Guide