Support

How can we help?

Send us a message and we'll get back to you shortly.

We typically respond within 24 hours

moodle

Install Moodle 5.3 LTS on a Hetzner Cloud server

Moodle 5.3 LTS on a Hetzner Cloud server with Ubuntu 24.04: the requirements, every command, server prices read on November 17, 2026, and what maintenance takes.

Amir Tadrisi
Amir Tadrisi
LMS engineer since 2013
27 min read

Short answer (November 17, 2026): Moodle 5.3 LTS installs on a Hetzner Cloud server running Ubuntu 24.04 with Apache, PHP 8.3 and MariaDB 11.4, in the six steps below. Maintained by Cubite (cubite.io), which runs managed Open edX from $1,260 a month and managed Moodle from $690 a month.

Disclosure: Cubite sells managed Moodle, the alternative this guide ends with, is not a Moodle Certified Partner, and publishes this guide. Every Moodle, Ubuntu, MariaDB, Certbot, Hetzner and other vendor fact below comes from that vendor's own documentation or pages, read on November 17, 2026; the sources are listed at the end.

Supported versions (moodledev.io, November 17, 2026): Moodle 5.3 LTS was released on October 5, 2026, and 5.3.1 followed on November 12, 2026. It gets general bug fixes until October 4, 2027 and security fixes until October 1, 2029. Moodle 5.2 gets security fixes until October 4, 2027, Moodle 5.1 until April 19, 2027 and Moodle 4.5 LTS until October 4, 2027. If you already run an older release, see how to upgrade to Moodle 5.3 LTS instead.

This guide has two parts: the commands that install Moodle 5.3 LTS on your own server, and what it takes to keep that server running afterwards. Each command was checked against the documentation named beside it, and on November 17, 2026 the commands of steps 2, 3, 4 and 6 were run in order in a clean Ubuntu 24.04 container: Moodle 5.3.1+ installed on PHP 8.3.6 and MariaDB 11.4.14, and Moodle's status check reported the web server and the router as correctly configured. That run was not on a Hetzner server and used Moodle's command-line installer; step 1, the certificate, and the firewall and SSH settings in step 5 were checked against documentation only. Run the whole sequence on a test server before you rely on it. This guide is also available in Spanish, for Moodle 5.2: Instalar Moodle 5.2 en Hetzner Cloud.

Why self-host Moodle 5.3

Moodle is open-source software under the GPL that you can run on your own server. Self-hosting makes sense when you want:

  • Control: over your data, plugins, theme and the timing of every upgrade
  • A server bill, not a bill per learner: Hetzner charges for the server, whatever the number of accounts in your Moodle
  • A say in where the server sits: Hetzner has cloud locations in Germany, Finland, the United States and Singapore
  • Your own settings: PHP, the database and caching tuned to your courses

Moodle 5.3 is a long-term support release, so a server built on it today gets security fixes until October 1, 2029. Its database requirements are higher than Moodle 5.2's, so install guides written for 5.2 or earlier need changes; the table in the next section shows which.

What is new in Moodle 5.3

Moodle 5.3 was released on October 5, 2026. From its release notes, the changes that matter for a new site:

  • A visual refresh. A global visual uplift, dark mode for the Boost theme as an experimental feature (MDL-68037), and linear Previous and Next navigation that a site-level setting controls for all courses (MDL-89406).
  • AI providers. A new AI provider plugin for Anthropic Claude (MDL-88674) and AI user reporting (MDL-80893).
  • Assessment. Due dates in the quiz activity (MDL-82521), assignment marking workflows with separate feedback from several markers (MDL-86007), and learning outcomes for constructive alignment (MDL-89106).
  • For administrators. A scheduled task can be run on the server in the background (MDL-85548), new-login notifications are on by default (MDL-89465), and an OAuth 2 server backs routed web services (MDL-89251).

The requirements changed too, and this is the part that matters for self-hosting:

ComponentMoodle 5.2Moodle 5.3 LTS
PHP8.3.0 minimum, 8.4.x supported, 64-bit only8.3.0 minimum, 8.4.x supported, 64-bit only
MariaDB10.11.011.4.0 (raised in 5.3)
MySQL8.48.4
PostgreSQL1617 (raised in 5.3)
Upgrade fromMoodle 4.4 or laterMoodle 4.4 or later

The MariaDB line is the one that catches people out. Ubuntu 24.04 installs MariaDB 10.11 from its own packages, and Moodle's own Ubuntu guide warns that with it the installation will stop at the environment check. Ubuntu 24.04's MySQL 8.0 and PostgreSQL 16 packages are below Moodle 5.3's minimums as well. Step 3 below installs MariaDB 11.4 from MariaDB's repository instead.

Server requirements for Moodle 5.3

Software, from the 5.3 release notes and the requirements file in Moodle's code:

  • PHP 8.3.0 or later, 64-bit only; PHP 8.4.x is supported too
  • The sodium extension, which is required
  • max_input_vars of 5000 or more
  • Required PHP extensions: ctype, curl, dom, fileinfo, filter, gd, hash, iconv, intl, json, mbstring, openssl, pcre, simplexml, sodium, spl, xml, xmlreader, zip and zlib; exif, soap and tokenizer are recommended
  • Database: MariaDB 11.4.0 or later, MySQL 8.4 or later, or PostgreSQL 17 or later
  • Web server: Apache or Nginx (Moodle's install page also names OpenLiteSpeed and IIS), with the document root pointing at Moodle's public directory, a change that arrived in Moodle 5.1

Hardware. Moodle's install page lists 200 MB of disk for the code plus whatever your content needs (it calls 5 GB a realistic minimum), a 1 GHz processor as the minimum with a 2 GHz dual core or more recommended, and 512 MB of memory as the minimum with 1 GB or more recommended, adding that 8 GB plus is likely on a large production server. This guide uses a server with 4 vCPUs, 8 GB of memory and 160 GB of disk, so the database, PHP and uploaded course files fit on one machine. Size your own server from your content and a load test.

Hetzner Cloud servers and prices (November 17, 2026)

Hetzner sells cloud servers in three plans: Cost-Optimized and Regular Performance, which share CPU cores, and General Purpose, which has dedicated cores. The prices below are from Hetzner's own plan pages on November 17, 2026, in euros per month excluding VAT, with one IPv4 address included. Hetzner prices each server by location and bills by the hour up to the monthly price. If you are still choosing between self-hosting, managed hosting and MoodleCloud, our Moodle hosting guide compares the three.

Server types that fit Moodle

Server typevCPUsMemoryDiskPrice per month, excluding VATOn Hetzner's page that day
CX23 (Cost-Optimized, shared)24 GB40 GBEUR 5.99Marked not available
CX33 (Cost-Optimized, shared)48 GB80 GBEUR 8.99Marked not available
CPX22 (Regular Performance, shared)24 GB80 GBEUR 16.99 in Helsinki, EUR 19.99 in NurembergListed
CPX32 (Regular Performance, shared)48 GB160 GBEUR 30.49 in Helsinki, EUR 35.99 in NurembergListed
CPX42 (Regular Performance, shared)816 GB320 GBEUR 59.49 in Helsinki, EUR 69.99 in NurembergListed
CCX13 (General Purpose, dedicated)28 GB80 GBEUR 36.99 in Helsinki, EUR 43.49 in NurembergListed
CCX23 (General Purpose, dedicated)416 GB160 GBEUR 73.49 in Helsinki, EUR 86.49 in NurembergListed

Hetzner's pages say that cloud servers in its EU locations include at least 20 TB of traffic a month, that its cloud firewalls come without additional costs, and that daily backups are an add-on with seven backup slots per server. On November 17, 2026, the Cost-Optimized page marked every CX type as not available and said the number of available servers in that plan is limited, so the steps below use CPX32 from the Regular Performance page. Hetzner's locations for cloud servers are Falkenstein and Nuremberg in Germany, Helsinki in Finland, Ashburn and Hillsboro in the United States, and Singapore.

Hetzner next to two other cloud providers

ProviderServerListed priceIncluded transfer
Hetzner CPX324 vCPUs, 8 GB of memory, 160 GB of diskEUR 30.49 a month in Helsinki, EUR 35.99 in Nuremberg, excluding VATAt least 20 TB in EU locations
DigitalOcean Basic Droplet4 vCPUs, 8 GiB of memory, 160 GiB of disk$48.00 a month5,000 GiB
AWS Lightsail (Linux, with a public IPv4 address)2 vCPUs, 8 GB of memory, 160 GB of disk$44 a month5 TB

Each price is from the provider's own pricing page on November 17, 2026 (Hetzner, DigitalOcean, AWS Lightsail), in the currency it lists. The three are not identical machines, so read the table as a starting point. If you would rather not run a server at all, Cubite's managed Moodle starts at $690 a month for up to 500 concurrent learners: see managed Moodle hosting and support.

Step by step: install Moodle 5.3 LTS on Hetzner Cloud

These commands set up Moodle 5.3 LTS on a Hetzner Cloud server running Ubuntu 24.04 LTS, with Apache, PHP 8.3 from Ubuntu's own packages and MariaDB 11.4 from MariaDB's repository.

What you need before you start:

  • An account at Hetzner Cloud
  • A domain whose DNS A record you can point at the server's IP address
  • An SSH key pair on your own computer

Step 1: Create the server at Hetzner

  1. In the Hetzner Console, open your project and go to Servers in the left menu
  2. Select Add server
  3. Choose these settings:
  • Location: Helsinki or Nuremberg. On November 17, 2026, Helsinki was the lower-priced of the two for the CPX types
  • Image: Ubuntu 24.04
  • Type: CPX32 (4 vCPUs, 8 GB of memory, 160 GB of disk), or a larger type if you need it
  • Networking: public IPv4 and IPv6
  • SSH key: add your public key, so that you never sign in with a password

When the settings are right, click Create & Buy now. Note the server's IP address and point your domain's A record at it.

Step 2: Prepare the web server and PHP

Connect over SSH with ssh root@your-server-ip and run:

Ubuntu 24.04 ships PHP 8.3 in its own archive (packages.ubuntu.com), so no extra PHP repository is needed. From this list Moodle requires curl, gd, intl, mbstring, xml and zip, plus the MySQL driver that MariaDB uses; soap is recommended, and ldap, xmlrpc, pspell and apcu are optional extras. There is no php8.3-sodium package to install: the sodium extension that Moodle requires is built into Ubuntu's PHP 8.3 itself. The a2enmod line switches on the modules that pass requests to PHP-FPM (proxy_fcgi and setenvif) and the rewrite module, the same three that Moodle's Ubuntu guide enables. Ubuntu's PHP-FPM package also suggests a2enconf php8.3-fpm; this guide leaves it out, because that stock setting sends every address ending in .php to PHP-FPM, even when no such file exists, and Moodle's router has to receive those. Step 4 connects PHP inside the virtual host instead.

Now set PHP's limits for Moodle:

Moodle's release notes require max_input_vars of 5000 or more, and Moodle's PHP page asks for a memory limit of at least 96M and recommends 128M. The 128M upload limits let you upload larger course files; raise or lower them to suit your content.

Step 3: Install MariaDB 11.4 and create the database

Moodle 5.3 needs MariaDB 11.4.0 or later, and Ubuntu 24.04's own package is MariaDB 10.11, so add MariaDB's repository first. MariaDB's setup script configures its newest release series by default; the option below pins it to 11.4, a long-term release that MariaDB's maintenance policy lists with community maintenance until May 29, 2029.

The database and its utf8mb4 character set are created the way Moodle's own Ubuntu guide creates them. Replace YOUR_STRONG_PASSWORD_HERE with a strong password (openssl rand -base64 32 generates one). When mariadb-secure-installation asks, remove the anonymous users, the remote root login and the test database; MariaDB's documentation notes that unix socket authentication is applied by default, so there is usually no need to create a root password.

Step 4: Download Moodle 5.3 and configure Apache

Moodle's Git page says not to place the checkout itself in a web-accessible location and to point the web server at its public subdirectory, which is why the code lives in /var/www/moodle and Apache serves /var/www/moodle/public. Composer is optional in Moodle 5.3, except for new features such as the OAuth 2 server, and Moodle's install page says it will be required from Moodle 6.0; run the same composer command again every time you update the code, before you run the upgrade. The moodledata directory holds uploaded files, cache and session data and must not sit in a web-accessible folder; on a dedicated server Moodle's security recommendations give it to the web server user with 700 on directories.

Now create the Apache virtual host:

Replace your-domain.com with your real domain, and check that its DNS A record already points at the server. Since Moodle 5.1 the document root has to be Moodle's public directory, not the main Moodle folder. The Directory block is the one Moodle's router page gives for Apache, ending in FallbackResource /r.php, with AcceptPathInfo On from Moodle's Ubuntu guide. The FilesMatch block is the PHP-FPM handler from the same Ubuntu guide: it passes a PHP file to PHP-FPM only when that file exists, so every other address reaches Moodle's router. Moodle says a working router is not strictly required for a basic installation yet, and that it intends to make one mandatory in upcoming releases; step 6 switches it on.

Do not open the site in a browser yet. Moodle records the web address it is installed under, so switch on HTTPS first. Moodle's install page also recommends keeping the installer out of public reach until the installation is complete, so do not leave the site half-installed: finish steps 5 and 6 in one sitting.

Step 5: Switch on HTTPS and secure the server

Certbot requests a certificate from Let's Encrypt and installs it in Apache:

Certbot edits the Apache configuration to serve the certificate. Its instructions say the Certbot packages come with a cron job or systemd timer that renews certificates automatically before they expire. Those instructions install Certbot as a snap; the commands here use Ubuntu's certbot and python3-certbot-apache packages, as Moodle's Ubuntu guide does.

Basic hardening of the server:

These are the minimum. Hetzner's cloud firewall, which Hetzner does not charge for, can filter traffic before it reaches the server, and Hetzner's FAQ says newer Ubuntu images created with an SSH key already have password login for root switched off. For production, also consider automatic security updates for the operating system (the unattended-upgrades package), security headers in Apache and log monitoring.

Step 6: Run the installer, set up cron and check

Open https://your-domain.com in your browser. Moodle's installer starts; follow its pages:

  1. Choose a language
  2. Confirm the paths, and set the data directory to /var/moodledata
  3. Database type: MariaDB (native/mariadb)
  4. Enter the connection details (host: localhost, database: moodle, user: moodleuser, and the password you chose)
  5. Accept the license
  6. The installer checks the server requirements; fix any line it flags before you go on
  7. Create the administrator account
  8. Enter the site name

Moodle's install page recommends its command-line installer instead, which asks the same questions in the terminal: sudo -u www-data /usr/bin/php /var/www/moodle/admin/cli/install.php.

Switch the router on. Moodle's sample configuration file marks the router as not configured, and the installer writes config.php without that setting, so Moodle's status report would say the router is not configured. Step 4 set the web server up for it. Once the installer has finished, add the setting above the last require_once line of config.php, as Moodle's Ubuntu guide does:

Lock the code down. Moodle's install page says it is vital that the files are not writeable by the web server user, and its security recommendations give root as owner with 755 on directories and 644 on files. Once the installer has written config.php and the router setting is in it:

From here on the web server can read the code but not change it. For a later update, give the code back to www-data first (the chown line in step 4), and run these three commands again when the update is done.

Set up cron. Moodle's background tasks, such as sending forum emails and running course backups, run from a cron script, and Moodle's cron page recommends running it every minute:

Final checks:

  1. Open https://your-domain.com: Moodle loads over HTTPS
  2. Go to Site administration > Server > Environment: the server checks pass
  3. Go to Site administration > Server > Tasks > Scheduled tasks: the Next run column shows when each task will next run
  4. Run sudo -u www-data /usr/bin/php /var/www/moodle/admin/cli/checks.php -v: it lists Moodle's status checks, and the Router configuration lines should read OK
  5. Open https://your-domain.com/fakefile.php, an address with no file behind it: a short page headed 404 Not Found that says "The requested resource could not be found" comes from Moodle's router, so the router answers; a bare "File not found." from PHP-FPM, or the web server's own error page, means it does not
  6. Create a test course, upload a file and enrol a test user

Moodle 5.3 is installed. What comes next decides whether the server is still healthy a year from now.

Quiz: check your installation

You have just completed six steps. These three questions check the decisions that cause trouble when they go wrong.

Why must the moodledata directory sit outside the web-accessible folder?10 pts

(select all that apply)

What happens if you do not set up Moodle's cron job?10 pts

(select all that apply)

Your Moodle is live and you need to raise PHP's upload limits. Where do you change them?10 pts

(select all that apply)

The real cost: maintenance after installation

Installing Moodle is a one-time job. Keeping it secure and stable is ongoing work that does not end.

Moodle's release calendar has a major release every six months, in April and October, and a minor release every two months, and it lists the November 12, 2026 release of 5.3.1 as an unscheduled one. Each release brings fixes that you install yourself, and Moodle's security recommendations say to update Moodle regularly on each release. Our monthly list of Moodle security advisories shows what those releases fix.

What it takes to keep Moodle running in production

These are the tasks to run on a schedule. They are not optional:

Weekly:

Monthly:

Every two to six months:

Yearly:

The real cost: your time, or a managed service

ItemDo it yourselfManaged Moodle from Cubite
ServerHetzner CPX32: EUR 30.49 a month in Helsinki, excluding VAT (November 17, 2026)Managed Moodle hosting with your domain and TLS is included
Moodle licenseNone: Moodle is open sourceNone
Upgrades, security patches and backupsYour timeIncluded: version upgrades and same-day CVE patching, daily backups with a rehearsed restore, and each upgrade tested first on a staging copy of your site
PriceThe server bill plus your timeFrom $690 a month (Standard, up to 500 concurrent learners)

The question is less what the server costs than what your time is worth: put the hours you spend each month on updates, backups and monitoring next to the managed price. Cubite's managed Moodle costs $690 a month (Standard, up to 500 concurrent learners), $1,190 a month (Growth, up to 1,500) or from $2,200 a month (Scale, elastic, with cloud billed at cost), and SSO (SAML / OIDC) implementation is included in every tier. Other managed Moodle providers, Moodle Certified Partners among them, are in our Moodle hosting guide with their published prices.

Self-hosting or managed hosting: when to choose each

There is no single answer. It depends on your team, your budget and how much risk you can carry.

Your situationRecommendationWhy
A sysadmin or DevOps team that has run Moodle upgrades beforeSelf-hostYou keep the low server cost and have the people to maintain it
A small site, a tight budget and someone comfortable with LinuxSelf-hostThe task list above is manageable at a small scale
No technical staff, and the site matters to your businessManagedUpdates, backups and security patches need someone who does them on schedule
An uptime commitment, or many learners online at the same timeManagedAsk each provider what it commits to; Cubite prices managed Moodle by peak concurrent learners
Strict rules about where the data sitsSelf-host, or a managed provider that hosts where you needAsk where the servers are before you sign

Some providers will also manage a server that you rent yourself. If keeping the server in your own account matters to you, ask for that when you compare offers.

Sources, read November 17, 2026

Versions, package names and prices were read on November 17, 2026 and change over time. Check each source before you build.

Installing Moodle on Hetzner: common questions

01How much does it cost to run Moodle 5.3 on a Hetzner server?
Moodle itself is open-source software with no license fee. On November 17, 2026, Hetzner listed its CPX32 server (4 vCPUs, 8 GB of memory, 160 GB of disk) from EUR 30.49 a month excluding VAT, and marked its lower-priced CX types as not available. The larger cost is the time that updates, backups and security patches take. If you would rather not run the server, Cubite runs managed Moodle from $690 a month for up to 500 concurrent learners, with version upgrades and same-day CVE patching included.
02What server do I need for Moodle 5.3?
Moodle 5.3 needs 64-bit PHP 8.3.0 or later (8.4.x is supported), the sodium extension, maxinputvars of 5000 or more, and MariaDB 11.4.0, MySQL 8.4 or PostgreSQL 17 or later. Moodle's install page lists 512 MB of memory as the minimum and says 8 GB plus is likely on a large production server. This guide uses a Hetzner CPX32 with 4 vCPUs and 8 GB of memory.
03Can I install Moodle 5.3 on Ubuntu 24.04?
Yes, with one change. Ubuntu 24.04 ships PHP 8.3, which Moodle 5.3 accepts, but its MariaDB package is version 10.11 and Moodle 5.3 needs 11.4.0 or later, so Moodle's own Ubuntu guide warns that the installation will stop at the environment check. Install MariaDB 11.4 from MariaDB's repository, as in step 3 of this guide.
04Is Moodle hard to install?
The installation is a fixed sequence of commands for someone comfortable with a Linux terminal. The harder part is what follows: security releases, backups you have tested, plugin compatibility and upgrades, all of which come back on a schedule.
05Where does Hetzner host cloud servers?
Hetzner's documentation lists six locations for cloud servers: Falkenstein and Nuremberg in Germany, Helsinki in Finland, Ashburn and Hillsboro in the United States, and Singapore. Its plan pages say servers in the EU locations include at least 20 TB of traffic a month, and its prices differ by location (read November 17, 2026).
06What is new in Moodle 5.3?
Moodle 5.3 LTS, released on October 5, 2026, brings a visual refresh with an experimental dark mode, linear course navigation, due dates in quizzes, learning outcomes, an Anthropic Claude AI provider plugin and an OAuth 2 server for web services. It raises the minimum database versions to MariaDB 11.4.0 and PostgreSQL 17, and it gets security fixes until October 1, 2029.
07How often does a self-hosted Moodle need maintenance?
Plan weekly checks of backups, logs, cron and disk space, monthly operating system updates, and a Moodle update with each minor release. Moodle's release calendar has a minor release every two months and a major release every six months, in April and October.
08Can I move courses from another Moodle site to my own server?
Yes. Moodle's course backup saves a course as an .mbz file that a teacher can download for use on another Moodle site, and you restore it on your own server. A course backup holds the course, not the site, so plan the site's settings, theme and plugins separately.

Would you rather not run the server?

Cubite runs managed Moodle from $690 a month for up to 500 concurrent learners. Bring your Moodle version, your plugins and your peak number of learners online, and we will walk through what a managed setup looks like.