The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →To install Moodle on a VPS, prepare a supported Linux server, one web server, the PHP version and extensions required by your Moodle release, and a relational database. Then install Moodle’s code, store moodledata outside the public web root, run the installer, and finish by enabling HTTPS, tightening permissions, and arranging backups. Requirements differ by Moodle branch: Moodle 5.3 is identified as the latest update on the official downloads page, while the documented Moodle 4.5.15 requirements include PHP 8.1 or later and a supported database.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Choose a Moodle release before configuring the VPS
Moodle is a PHP application that uses a relational database. A VPS therefore needs a compatible PHP runtime and extensions, a database server, and a web server configured to serve Moodle and pass PHP requests to PHP-FPM or another supported PHP setup. Moodle’s installation documentation describes this basic stack and notes that Nginx and OpenLiteSpeed are options when the selected release’s requirements are met. Moodle 4.5 server requirements
As an Amazon Associate I earn from qualifying purchases.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Pick the release first, then match every component to that branch. The official downloads page identifies Moodle 5.3 as the latest update at the time of writing. The Moodle security-supported releases page lists Moodle 4.5.15, released on 3 October 2026, with minimum requirements of PHP 8.1, MariaDB 10.6.7 or MySQL 8.0, PostgreSQL 13, Microsoft SQL Server 2017, or Oracle 19c. Those are the stated requirements for Moodle 4.5.15; do not assume that the same table applies to Moodle 5.3 or another branch.
| Moodle release information | What is established | What to check before installing |
|---|---|---|
| Moodle 5.3 | Identified as the latest update on the official downloads page. | Check the requirements for the exact 5.3 release and update you plan to install; the figures listed below are for 4.5.15, not 5.3. |
| Moodle 4.5.15 | Listed on the security-supported releases page as released 3 October 2026. Minimum PHP: 8.1. Minimum database versions listed: MariaDB 10.6.7, MySQL 8.0, PostgreSQL 13, Microsoft SQL Server 2017, or Oracle 19c. | Confirm that the chosen web server, PHP extensions, database and operating-system packages meet the requirements for the exact release. |
The Moodle downloads page offers packages and Git as ways to obtain Moodle. Choose a release deliberately and keep the source method consistent with your update process. The database versions above should not be treated as a sizing recommendation or a promise that every database option is equally convenient on every Linux distribution.
#1 Best Overall
Plan the VPS and choose one web server
There is no single CPU or memory figure established here as a universal minimum for a Moodle VPS. Resource needs depend on concurrent users, the amount and type of course files, database activity, and the volume of scheduled or background tasks. A small personal course site and a busy learning environment are not equivalent workloads. Estimate the load you expect, monitor the service after launch, and leave room to grow rather than treating an arbitrary VPS size as a guarantee.
Decide whether to administer the full stack yourself. Self-hosting gives you control over the operating system, web server, PHP and database configuration, but also makes you responsible for security updates, Moodle upgrades, backups and restore testing. Moodle documentation points people who want to avoid self-installation toward MoodleCloud. Another hosting provider may also be an option, but it must support the requirements of the Moodle branch you select. Compare the actual maintenance and backup features, support, service location and total cost rather than assuming a managed service includes every task you need.
Free tools Windows power users keep installed
One-click scans. No signup required.
For a self-managed Ubuntu VPS, begin with a fresh server without a desktop environment and make sure you have root or sudo access. Set the domain name you intend to use, or use a temporary IP address during setup. Install either Apache or Nginx, not both as competing front ends for the same site. Moodle’s Ubuntu guide describes Apache as having strong community support and Nginx as a possible fit for busier sites; neither choice removes the need to configure PHP and Moodle correctly.
Rank #2
| Decision point | Apache | Nginx |
|---|---|---|
| PHP integration | Configure the site’s PHP handling to match the installed PHP packages and chosen deployment. | Configure PHP-FPM integration for the site. |
| URL handling | Set the virtual host and the required rewrite or fallback behavior for Moodle. | Set the server block and the required rewrite or fallback behavior for Moodle. |
| Best practical fit | A reasonable option if your administrator is more familiar with Apache and its operational tools. | A possible choice for a busier site, provided you can maintain its configuration and PHP-FPM setup. |
| Logs and operations | Use the logging and management tools you can reliably monitor and troubleshoot. | Use the logging and management tools you can reliably monitor and troubleshoot. |
This is an operational choice, not a universal performance ranking. Expected traffic, administrator experience, configuration familiarity, logging and existing tooling matter. Install and configure one server for the site, then test its configuration before reloading it.
Update Ubuntu and install the stack
Use the Ubuntu server installation guide as the starting point for a text-based installation. Package names vary with Ubuntu releases and the PHP version in the repository, so confirm that the packages you install provide the PHP version required by your chosen Moodle branch. The Moodle Ubuntu example installs PHP-FPM and PHP CLI, PHP extensions, MariaDB and supporting packages.
- Update the server. Log in with your administrative account and apply Ubuntu package updates before installing Moodle. Keep a record of the Ubuntu release and packages in use so you can repeat the setup and plan maintenance.
- Install PHP and its extensions. The example lists PHP-FPM, PHP CLI, and extensions including
curl,zip,gd,xml,intl,mbstring,xmlrpc,soap,bcmath,exif,ldapandmysql. Treat this as the Ubuntu guide’s package set, not a substitute for the requirements of your chosen Moodle release. Check that the packages correspond to the PHP version you are installing. - Install the database. The Ubuntu example uses MariaDB. If you select a different supported database, install and configure that database instead, and verify its version against the selected Moodle release.
- Install Apache or Nginx. Add only the web server you chose. Configure its virtual host or server block for the Moodle application path and connect it to the PHP runtime, including PHP-FPM where used.
- Verify the combination. Before running the Moodle installer, make sure the web server can reach PHP and the database, and that the PHP version and extensions satisfy the release requirements. Fix missing packages or incompatible versions at this point rather than attempting to work around them in the installer.
For Moodle 4.5, PHP 8.1.0 is the stated minimum in the release documentation. The server must also meet the applicable database minimum: for Moodle 4.5.15, the listed options are MariaDB 10.6.7, MySQL 8.0, PostgreSQL 13, Microsoft SQL Server 2017 or Oracle 19c. Use the release-specific requirements rather than treating a PHP or database version from one branch as valid for every branch.
Rank #3
- Used Book in Good Condition
Create a dedicated database and account
Create a database for Moodle using the utf8mb4 character set, and create a separate database account for the Moodle application. Grant that account the privileges Moodle needs on its own database. The Ubuntu guide’s example uses MariaDB and a local database account; keep credentials private and do not reuse an administrator or application account from another service.
- Record the database type, database name, database account and connection details for the installer.
- Restrict database access to the application and trusted administration paths rather than exposing it unnecessarily to the public internet.
- Use a strong, unique database password and protect any file or note where you store it.
- Confirm that the database service is running and that the credentials work before beginning the web installer.
The installer needs the database type and credentials, but the correct database connection settings depend on the database server and deployment you configured. Follow the database’s own operational procedures for account creation and service security rather than copying a credential or privilege pattern from an unrelated host.
Place Moodle code and moodledata safely
Moodle has two distinct directories to plan for: the application code served by the web server and the data directory, commonly called moodledata. Put the code under the configured site path or web root. Put moodledata outside the publicly served web root so a visitor cannot browse course files or application data directly. The web-server account must be able to write to the data directory.
Rank #4
- Choose the Moodle code location that matches the virtual host or server block you configured.
- Choose a separate path for
moodledatathat is not reachable as a public website directory. - Set ownership and permissions so the web-server account can write where Moodle needs to store data without making the directory publicly writable.
- Keep the database credentials and administrative credentials out of public directories and source-control repositories.
Do not fix a permission problem by making the whole site or data directory writable to every local user. The Ubuntu guide’s production section resets directories to mode 755 and files to 644 after installation. Those are the guide’s post-installation modes; ownership and any special writable paths still need to be appropriate for the server account and your configuration. Recheck permissions after upgrades or file transfers.
Run the Moodle installer
You can install Moodle through the browser or use Moodle’s command-line installer, admin/cli/install.php. The CLI route is useful for a non-interactive setup, while the browser route walks you through the same essential configuration choices. In either case, have the site URL, Moodle data directory, database type and credentials, and administrator credentials ready before starting.
- Open the installer. For the browser installer, visit the site through the domain or temporary address configured in the web server. For a command-line installation, invoke
admin/cli/install.phpfrom the Moodle application and provide the values required by the CLI installer. - Set the site address and data path. Use the URL visitors should use and the private
moodledatalocation outside the public web root. - Enter database settings. Select the database type you installed and supply the dedicated database name, account and password.
- Create the administrator account. Choose unique credentials and store them securely. This is a high-privilege account for the Moodle site.
- Review installer checks. If Moodle reports a missing PHP extension, unsupported version, database connection failure or unwritable directory, correct that underlying issue and run the check again.
- Complete installation and sign in. Confirm that the site loads and that the administrator can log in before proceeding to production hardening.
Do not change the site’s canonical URL casually after installation. If you first configure Moodle on a temporary HTTP address and later move to a domain or HTTPS, update the stored Moodle URLs as part of the migration so links and redirects use the intended address.
Best Value
Enable HTTPS and harden the production site
A working installation is not yet a finished public service. Before inviting users, secure access to the site, restrict unnecessary network exposure, and make sure you can recover from both system failure and human error. The Ubuntu guide includes installing Certbot, enabling HTTPS, testing the web-server configuration, reloading the service and updating stored URLs when changing from HTTP to HTTPS.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
- Point the domain at the VPS. If you are using a domain, make sure it resolves to the server before requesting a certificate. A temporary IP address is useful during setup, but it is not a replacement for confirming the final site address.
- Install and configure Certbot. Use the appropriate Certbot setup for your Ubuntu and web-server configuration to obtain and install an HTTPS certificate.
- Test the web-server configuration. Run the configuration test for the selected web server before reloading it. Correct any reported syntax or configuration issue first.
- Reload the web server and verify HTTPS. Confirm that the public site loads using its secure URL and that the certificate is being served.
- Update Moodle’s stored URL when changing protocols or address. If the installation was initially configured for HTTP or a temporary address, update its stored URLs to the final HTTPS address using Moodle’s supported administration process.
- Review firewall rules and permissions. Allow only the network access the service needs, protect administrative access, and ensure application and data files retain appropriate ownership and permissions.
- Secure and back up the database and Moodle data. Keep recoverable copies of the database and the site’s important files off the VPS. A backup that has never been restored is not a verified recovery plan.
HTTPS protects traffic between users and the server, but it does not replace database security, operating-system updates, permission controls or backups. Treat those as continuing maintenance tasks, not one-time installation options.
Common installation failures and how to resolve them
- The installer rejects PHP or reports a missing extension. Check the installed PHP version against the Moodle branch’s requirements, then verify that each required extension is installed for that same PHP version. Installing an extension package for a different PHP version may not resolve the check.
- The database connection fails. Confirm the database service is running, the selected database type matches the server, the database name and account are correct, and the dedicated account has the necessary privileges on the Moodle database.
- Moodle cannot write to its data directory. Confirm the path is outside the public web root and that the actual web-server account has the required write access. Avoid broad, world-writable permissions as a shortcut.
- The site shows a server error after selecting a web server. Check that only the intended front-end is serving the site, its virtual host or server block points to the Moodle code location, and PHP integration is correct. Test the web-server configuration before reloading it.
- Links or redirects use the old HTTP URL or temporary address. Update Moodle’s stored site URL when moving to a final domain or HTTPS address, then test navigation and sign-in again.
- The VPS becomes slow under real use. Compare the observed load with concurrent users, course file activity, database load and background-task volume. The available guidance does not establish a universal CPU or RAM minimum, so use monitoring and workload evidence to decide whether to tune or resize.
What to maintain after installation
Moodle on a VPS is an ongoing service. Maintain Ubuntu and the web, PHP and database stack; follow the maintenance path for the Moodle branch you installed; and check compatibility before changing major component versions. Keep the database and Moodle data covered by backups, store copies away from the VPS, and test restoration. Monitor disk space as course files and logs accumulate, and watch resource use as enrollment and activity change.
Record the Moodle release, operating-system version, PHP version and extensions, database type and version, web server, code location and data location. This inventory makes upgrades and incident recovery less error-prone. Also document how HTTPS is renewed, how the web server is tested and reloaded, and who can access administrator and server accounts.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




