---
title: "Deploy MediaWiki"
description: "Self-hosted wiki — the software that runs Wikipedia"
category: "CMS"
url: https://railway.com/deploy/mediawiki-2
---

# Deploy MediaWiki

Self-hosted wiki — the software that runs Wikipedia

**[Deploy MediaWiki on Railway](https://railway.com/template/mediawiki-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/mediawiki-2/manifest.json

- **Creator:** INAPP
- **Category:** CMS
- **Total deploys:** 1

## Template content

### mediawiki

- **Source:** https://github.com/INAPP-Mobile/mediawiki
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.com/deploy/mediawiki-1?utm_campaign=mediawiki)

![MediaWiki main page](https://raw.githubusercontent.com/INAPP-Mobile/mediawiki/main/assets/mediawiki-main-page.png)

MediaWiki is the open-source wiki software that runs Wikipedia — collaborative pages with full revision history, file uploads, and a complete API. This template ships MediaWiki 1.43.13 (LTS) pinned by digest as a single service with its database built in (SQLite on a persistent volume), so the deploy form has one field: the admin password.

## About Hosting

One click deploys a single MediaWiki service with a persistent volume at `/data`. The SQLite database, uploads, and settings all live on the volume — no separate database service to wire up. The first boot runs a silent CLI install, so the deploy lands on a working wiki with no wizard to click through. Railway's injected `PORT` is honored on every boot, and the public URL is derived from the live domain.

What gets deployed:

- **mediawiki** — MediaWiki 1.43.13 (PHP 8.3 + Apache) with SQLite, volume `/data`
- **Admin account** — username `Admin` with the password from the deploy form; log in at Special:UserLogin

## Why Deploy

- **Zero-fuss start:** no database service, no wizard — the first boot installs itself and the admin account is ready.
- **The real wiki:** the same software as Wikipedia — pages, revisions, talk pages, categories, templates, uploads, and the action API.
- **Always-on by design:** the wiki runs continuously, so your team always has a live knowledge base.

## Common Use Cases

- Run a team knowledge base or internal docs wiki with full revision history.
- Replace a shared docs folder with a wiki anyone on the team can edit and link.
- Keep a personal notebook wiki with categories, templates, and file uploads.
- Host a public community wiki with account creation open to readers.

## Dependencies for MediaWiki Hosting

- The mediawiki service with a volume at `/data`, created by the template. A custom domain is optional.

### Deployment Dependencies

| Setting | Value |
|---|---|
| Runtime | MediaWiki 1.43.13 (PHP 8.3 + Apache) with SQLite |
| Plan | Hobby; one service |
| Port | Railway's injected `PORT`, honored on every boot (default 8080) |
| Persistence | One Railway volume at `/data` |
| Healthcheck | `/health` (static file, unauthenticated 200 when Apache is up) |

| Variable | Value | Notes |
|---|---|---|
| `MW_ADMIN_PASSWORD` | _(generated)_ | Deploy-form field; password for the `Admin` account created at first boot |
| `MW_WIKI_NAME` | `My Wiki` | Baked in the image; wiki name ($wgSitename) |
| `MW_ADMIN_USER` | `Admin` | Baked in the image; admin username |
| `MW_DB_NAME` | `mediawiki` | Baked in the image; SQLite file `/data/mediawiki.sqlite` |
| `PORT` | _(injected by Railway)_ | Apache is remapped to it on every boot |
| `RAILWAY_PUBLIC_DOMAIN` | _(derived at boot)_ | $wgServer is re-derived from it on every boot |

Baked internals: `MW_WIKI_NAME=My Wiki`, `MW_ADMIN_USER=Admin`, `MW_DB_NAME=mediawiki`; SQLite at `/data`, uploads at `/data/images`, LocalSettings.php on the volume.


## Similar templates

- [Libredesk - Complete Setup](https://railway.com/deploy/libredesk-complete-setup) — Complete self-hosted omnichannel customer support desk.
- [Paperless-ngx](https://railway.com/deploy/paperless-ngx-3) — Paperless-ngx — document management with OCR and full-text search
- [Instatic CMS - Postgres](https://railway.com/deploy/instatic-cms-postgres) — Design, build and manage powerful static sites from state-of-the-art CMS

Open this page in a browser: https://railway.com/deploy/mediawiki-2
