Docker image
Moodle in Docker. Your LMS, done right.
Moodle is the open source learning management system behind hundreds of millions of learners: courses, quizzes, grades, assignments and activities, self-hosted so the institution owns the data. The RemarkableCloud image is a from-source build on a digest-pinned PHP 8.
Prefer not to run it yourself? Managed Moodle from $6.67/mo
# Moodle in Docker, base pinned by digest docker pull ghcr.io/remarkablecloud/moodle:5.2.2-r1 docker compose up -d
- Current build
5.2.2-r1, updated Sep 12, 2026- Base
- Moodle 5 from source, PHP 8.4, digest-pinned
- What's inside
- Headless CLI install, plugins persist on a volume, PostgreSQL 17 pairing
- Upstream license
- Moodle: GPL-3.0-or-later.
The image
What our image adds.
What changes from upstream Moodle, and why it matters in production.
Headless CLI install
The browser install wizard never runs, so the operator is never made admin through a public page; the generated credentials land in the container log once.
Moodle code on a volume
Plugins and themes installed through the UI persist across container recreation and upgrades, which is where most containerized Moodle setups quietly lose work.
PostgreSQL 17 pairing
Moodle's best-supported open database, shipped and wired in the stack.
Current PHP
PHP 8.4 with the extensions Moodle 5 expects, rebuilt on our cadence.
Proxy-aware wwwroot
MOODLE_WWWROOT drives every generated URL; TLS terminates at your proxy.
Run it yourself, or not
Same image either way.
Pull it and run it anywhere, or let us run Moodle for you on a managed server with updates, monitoring and snapshots.
Run Moodle yourself
- Pull it from GHCR and run it on any Docker host
- The guide below: compose, environment, backups, upgrades
- You patch, back up and watch it
Moodle on a managed server
- Installed for you from this same image, $0 for the app
- Updates with a snapshot first, monitoring and a managed firewall
- A 2 GB server from $6.67/mo billed annually, with room for more apps
The guide
Run it in production.
Compose file, environment reference, hardening, backups and upgrades, written by the people who build the image.
On this page
Architecture at a glance
Two containers: moodle (Apache + PHP, port 80 internal) and db (Postgres 17). Three volumes: the database, the Moodle code (plugins, themes), and moodledata (course files, uploads, caches). All three are the system.
Docker Compose walkthrough
Set DB_PASSWORD and SITE_URL, bring the stack up, and wait: first boot installs Moodle from the CLI, which takes a few minutes, then prints the admin credentials to the log. Log in, set the site name, and build your first course. Moodle background tasks run via its cron entrypoint inside the container.
Environment variable reference
| Variable | Purpose |
|---|---|
| DB_HOST / DB_PORT / DB_USER / DB_PASS | PostgreSQL connection |
| MOODLE_WWWROOT | Public https URL; Moodle hard-depends on it being right |
| Admin (generated) | Created by the CLI install on first boot |
Hardening notes
The wwwroot must match the public URL exactly or logins and redirects misbehave; that is Moodle, not the container. Keep moodledata off the web path (the stack already does), keep the DB internal, and add plugins from the official directory only; plugins are PHP running as the site.
Backups
Database, moodle-code volume, and moodledata together are a complete site. moodledata grows with course content; watch disk and back it as files alongside scheduled pg_dump runs.
Upgrades
Pull the new tag and recreate; the entrypoint runs Moodle’s upgrade when the code version advances. Moodle majors deserve a staging pass if you run many third-party plugins.
Changelog
Each build is pinned by digest and recorded here, so you can see what changed before you pull a new tag.
-
5.2.2-r1Current Sep 12, 2026
Moodle and other product names are trademarks of their respective owners. RemarkableCloud is not affiliated with or endorsed by them.
FAQ
Moodle in Docker, answered.
Short answers from the people who build and run this image.
Do UI-installed plugins survive upgrades?
Yes, that is the point of the code volume. Incompatible plugins still need updating for new Moodle majors, same as any Moodle.
How many students can it handle?
RAM and PHP workers are the levers. A small-cohort site is comfortable at 2 GB; scale up with concurrent quiz-takers, which are the spike that matters.
MySQL instead of Postgres?
This stack standardizes on PostgreSQL 17, Moodle's best open pairing. Migrating between engines mid-life is painful; pick at the start.
Where are the admin credentials?
In the container log after the first-boot install completes; store them, then change the password in the profile.
Pull it, or let us run it.
The same image runs Moodle on our managed servers, updates and monitoring included.