How I set up a wiki for "Game of Rôles", the French better "Critical Role"

How I set up a wiki for "Game of Rôles", the French better "Critical Role"

Sonny Alves Dias

Published on Jan 3, 2021

3 min read

Subscribe to my newsletter and never miss my upcoming articles

Listen to this article

There is a show I love on Twitch on the channel of MisterMV: Game of Rôles. It is an actual play of an original table RPG created by FibreTigre. To help the show, I decided at the time to create a wiki for it: https://gameofroles.wiki. And here is how I did it.

Prerequisites:

Everybody knows Wikipedia. But few know that Wikipedia is actually running on open-source software. The Wikimedia Foundation develops its own wiki engine. And they use it for all their projects, including Wikipedia, Wiktionary, and others. This wiki engine is named MediaWiki. That being said now, that's what we are going to use here to set up our own wiki :-)

First, you need a server with Docker installed on it. So obviously I would recommend a Linux server for that matter. For example, Digital Ocean proposes a Droplet image with Docker preinstalled on Ubuntu. With a couple of clicks, you can get a Droplet setup with Ubuntu and Docker ready to go. AWS and others have likely similar images in their inventory too.

In Docker Hub, you can find this Docker image: hub.docker.com/mediawiki. This is the official docker image from the Wikimedia Foundation itself. This is definitely what we want to use.

Then, considering your wiki project, decide whether you need a MySQL-like database or the default embedded SQLite. In my case, I decided to use SQLite. Why? I knew the community watching the show was not huge. Hence, I did not need the database to scalable, and a simple SQLite is pretty enough. The show had regularly 2-4K viewers at the time I created the wiki in 2018. Actually nowadays in 2021, it has 16-20K viewers. And the wiki is still standing pretty well.

Now to warn you, there's a little trick to deploy your MediaWiki with Docker. First, create a folder wherever you want to store all the files related to the wiki. Then, start the wiki. Visit your wiki at yourdomain.com. Do the setup. And download the LocalSettings.php generated for you.

Here is the code I used to start the wiki:

# Create the folder
mkdir wiki; cd wiki
# Start the wiki setup
docker run --name my-wiki -d -v /wiki/data:/var/www/data -v /wiki/images:/var/www/html/images -v /wiki/extensions:/var/www/html/extensions  mediawiki

Once you have the file LocalSettings.php, upload it into your wiki folder. Finally, delete the current container. And restart a new container with this LocalSettings.php mounted, and you are ready to go.

docker rm -f my-wiki
echo -e "docker run --name my-wiki -d -v /wiki/data:/var/www/data -v /wiki/images:/var/www/html/images -v /wiki/extensions:/var/www/html/extensions -v /wiki/LocalSettings.php:/var/www/html/LocalSettings.php --restart=always mediawiki" > start.sh
chmod +x start.sh 
./start.sh

The command to start the container is kinda long. So I suggest saving it in a start.sh to avoid typing it ever again.

Voilà, then visit yourdomain.com and your wiki is ready to use.

Update

To continue, now set up a backup process for your wiki with the following article.

 
Share this