Self-host MediaWiki with Docker
The wiki engine behind Wikipedia, for large collaborative knowledge bases with rich version history.
This page describes the Levelrail template for MediaWiki (Applications). It deploys the services below as one Docker Compose app on your own server.
Project site: https://www.mediawiki.org/wiki/Manual:Contents.Recommended memory: about 512 MiB.
Services, ports and volumes
| Service | Image | Container ports | Volumes |
|---|---|---|---|
db | postgres:16-alpine | none | mediawiki_db_data -> /var/lib/postgresql/data |
mediawiki | mediawiki:1.43 | 80 | mediawiki_images -> /var/www/html/images |
Environment variables
| Service | Variable | Value |
|---|---|---|
db | POSTGRES_DB | Preset in the template |
db | POSTGRES_PASSWORD | Generated at deploy |
db | POSTGRES_USER | Preset in the template |
Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.
Deploy MediaWiki with Levelrail
In the dashboard, open Apps, choose New app, then Browse templates, and select MediaWiki. Review the Compose body and deploy.
With the CLI:
levelrail-cli templates deploy mediawiki --name my-mediawikiSee Service template catalog for how templates work, and Getting started if you have not installed Levelrail yet.
More Applications templates
All templates are listed in the self-host gallery.