Jump to content

Mediawiki Setting Up Guide: Difference between revisions

From MediawikiCIT
No edit summary
No edit summary
Line 1: Line 1:
== <strong>MediaWiki Docker Setup Guide</strong> ==
== <strong>MediaWiki Docker Setup Guide</strong> ==
 
<div style="font-size: 100%;">
This guide walks you through setting up MediaWiki using Docker and Dockhand. Follow the steps below carefully, as some paths are required for extensions and configuration to work correctly.
This guide walks you through setting up MediaWiki using Docker and Dockhand. Follow the steps carefully, as specific paths are required for extensions and configuration to work correctly.


== Getting Started ==
== Getting Started ==
Line 8: Line 8:
== Installation Steps ==
== Installation Steps ==


<strong>1. Install Docker and Docker Compose</strong>
'''1. Install Docker and Docker Compose'''


Ensure that Docker and Docker Compose are installed on your system. These tools are required to run MediaWiki and its supporting services in containers.
Ensure that Docker and Docker Compose are installed on your system. These tools are required to run MediaWiki and its supporting services in containers.


<strong>2. Set Up Dockhand</strong>
'''2. Set Up Dockhand'''


Dockhand provides a simple web interface for managing Docker stacks.
Dockhand provides a simple web-based interface for managing Docker stacks.


Run the following command in your terminal:
''Run the following command in your terminal:''


<pre> # Use matching paths with DATA_DIR docker run -d \ --name dockhand \ -p 3000:3000 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /opt/dockhand:/opt/dockhand \ -e DATA_DIR=/opt/dockhand \ fnsys/dockhand:latest </pre>
<syntaxhighlight lang="bash" style="font-size: 85%;">
# Use matching paths with DATA_DIR  
docker run -d \
  --name dockhand \
  -p 3000:3000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /opt/dockhand:/opt/dockhand \
  -e DATA_DIR=/opt/dockhand \
  fnsys/dockhand:latest
</syntaxhighlight>


Once the container is running, open your browser and go to:
Once the container is running, open your browser and go to:


<pre> http://localhost:3000 </pre>
<syntaxhighlight lang="text" style="font-size: 85%;">
http://localhost:3000
</syntaxhighlight>


You should now see the Dockhand web interface.
You should now see the Dockhand web interface.


<strong>3. Create the MediaWiki Stack Directory</strong>
'''3. Create the MediaWiki Stack Directory'''


Next, create a dedicated directory on the Docker host for your MediaWiki stack.
Next, create a dedicated directory on the Docker host for your MediaWiki stack.
This location is important because it will store your configuration files and extensions.
This location is important because it will store your configuration files and extensions.


Run the following commands:
Run the following commands:


<pre> sudo mkdir -p /opt/stacks/mediawiki sudo mkdir -p /opt/stacks/mediawiki/extensions cd /opt/stacks/mediawiki </pre>
<syntaxhighlight lang="bash" style="font-size: 85%;">
sudo mkdir -p /opt/stacks/mediawiki
sudo mkdir -p /opt/stacks/mediawiki/extensions
cd /opt/stacks/mediawiki
</syntaxhighlight>


<strong>4. Create the Docker Compose File</strong>
'''4. Create the Docker Compose File'''


Inside the /opt/stacks/mediawiki directory, create a Docker Compose file:
Inside the <code>/opt/stacks/mediawiki</code> directory, create a Docker Compose file:


<pre> touch docker-compose.yml </pre>
<syntaxhighlight lang="bash" style="font-size: 85%;">
touch docker-compose.yml
</syntaxhighlight>


This file will later contain the service definitions for MediaWiki, the database, and related components.
This file will later contain the service definitions for MediaWiki, the database, and related components.
 
</div>
 
 
== Need Help? ==
 
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ MediaWiki release mailing list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]

Revision as of 08:22, 6 February 2026

MediaWiki Docker Setup Guide

This guide walks you through setting up MediaWiki using Docker and Dockhand. Follow the steps carefully, as specific paths are required for extensions and configuration to work correctly.

Getting Started

Before proceeding, make sure you have access to a Linux server or local machine with sudo privileges.

Installation Steps

1. Install Docker and Docker Compose

Ensure that Docker and Docker Compose are installed on your system. These tools are required to run MediaWiki and its supporting services in containers.

2. Set Up Dockhand

Dockhand provides a simple web-based interface for managing Docker stacks.

Run the following command in your terminal:

# Use matching paths with DATA_DIR 
docker run -d \
  --name dockhand \
  -p 3000:3000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /opt/dockhand:/opt/dockhand \
  -e DATA_DIR=/opt/dockhand \
  fnsys/dockhand:latest

Once the container is running, open your browser and go to:

http://localhost:3000

You should now see the Dockhand web interface.

3. Create the MediaWiki Stack Directory

Next, create a dedicated directory on the Docker host for your MediaWiki stack.

This location is important because it will store your configuration files and extensions.

Run the following commands:

sudo mkdir -p /opt/stacks/mediawiki
sudo mkdir -p /opt/stacks/mediawiki/extensions
cd /opt/stacks/mediawiki

4. Create the Docker Compose File

Inside the /opt/stacks/mediawiki directory, create a Docker Compose file:

touch docker-compose.yml

This file will later contain the service definitions for MediaWiki, the database, and related components.