ℹ️ About Alpine Moodle
A lightweight Moodle Docker image built on Alpine Linux.
Attribution
This documentation is a fork of erseco/alpine-moodle. The upstream documentation is available here.
What is this image?
ruseler/alpine-moodle packages Moodle into a single, small (~250 MB) container based on
ruseler/alpine-php-webserver. It runs
Nginx + PHP-FPM under a non-privileged user, includes Moosh CLI,
and is configured entirely through environment variables.
Highlights:
- PHP 8.3 FPM with
ondemandprocess manager — low idle footprint - Works with PostgreSQL, MariaDB/MySQL, or SQLite (single-container dev mode)
- Optional Redis session handler for HA deployments
- Supports Moodle 4.x, 5.0, 5.1 (with
/publicdirectory) andmainbranch - Internal cron via
runit(configurable) - Logs go straight to
docker logs - Extensible via pre/post configuration hooks and
POST_CONFIGURE_COMMANDS
Where to start
- 🚀 Quick Start — Get a Moodle instance running in under a minute.
- 🐳 Docker Compose — Practical stacks for dev, production, and proxied setups.
- 🔒 Reverse Proxy — Traefik, Nginx, NPM, Apache, Caddy recipes.
- 🗄️ Environment Variables — Every supported knob, with defaults.
- 💾 Persistence & Volumes — What to mount and what to back up.
- 🔄 Upgrading — How to move between Moodle versions safely.
- 💡 Troubleshooting — Solutions to the most common deployment issues.
- ❓ FAQ — Short answers to recurring questions.
Minimal example
docker run -d \
-p 80:8080 \
-e MOODLE_DATABASE_TYPE=sqlite3 \
-e MOODLE_PASSWORD=ChangeMe123! \
-v moodledata:/var/www/moodledata \
ruseler/alpine-moodle
Open http://localhost and log in with moodleuser / ChangeMe123!.
SQLite is for development and demos only
Use PostgreSQL or MariaDB for any real deployment. See Docker Compose for production-grade examples.
Project links
- Source code: https://github.com/AdrianoRuseler/alpine-moodle
- Docker Hub: https://hub.docker.com/r/ruseler/alpine-moodle
- GitHub Container Registry:
ghcr.io/ruseler/alpine-moodle - Issue tracker: https://github.com/AdrianoRuseler/alpine-moodle/issues
This documentation is a fork of erseco/alpine-moodle. The upstream documentation is available here.