One tool that has become absolutely essential to me for note taking and finding information again is a Wiki. A very long time ago, I initially used WOAS, a personal Wiki platform that was basically a local HTML file that could be modified in the browser. It was a nice system, but at some point, modifying local files from the browser became a security risk and was hence disabled. So I had to look for something else. That was 10 years ago in 2013, and I wrote about it on this blog at the time.
At the time, I decided to migrate my pages to the MoinMoin Wiki system, based on Python and an Apache web server. I liked MoinMoin a lot, because it was easy to use and it stored all pages as a file in a directory structure. Why complicated when things can be simple? Unfortunately, MoinMoin development pretty much came to a halt, and when I upgraded to Ubuntu 22.04, it stopped working. It turned out that MoinMoin was still based on Python 2.7, which has been unsupported for a long time now, and hence version 2.7 was not included anymore in the current Ubuntu Long Term Support version. As I got the impression that the situation is unlikely to change anytime soon, I started to have a look around for alternatives. From what I can tell there are two main options at the moment: DokuWiki and MediaWiki.
Which Wiki System To Go For?
I’ve installed a number of DokuWiki’s in the past, but the user interface and plugins seem to be a bit outdated these days. Or perhaps it is just me, I don’t know. So I had a closer look at MediaWiki, which is the basis for Wikipedia, so it’s very unlikely to go unmaintained and is unlikely to be replaced by something new without a good option to migrate data. After a bit of background research I found a good description of how to get a ‘dockerized’ instance up and running with a docker-comopse.yml file without too much hassle. As I already have a host with a reverse proxy that does all the Letsencrypt and TLS magic, I managed to get an instance up and running in less than 30 minutes. Like this blog, MediaWiki uses MariaDB to store text based data, and the file system to store images. In combination with docker-compose and storing everything including the database in a single directory tree, it’s also a no-brainer to back-up the complete installation and also to re-deploy the site on another host without complicated export/import procedures.
Migrating My Wiki Pages
Despite searching for a long time, I did not find a straight forward and simple method to migrate my substantial number of Wiki entries from MoinMoin to MediaWiki. There seem to be some scripts that could perhaps be adapted, but I decided against going down that road. In 2023, my Wiki contains entries from the past 15 years. Quite a large number of pages are not very useful anymore, technology has moved on. So this time around, I decided to just manually migrate the pages that are still useful. That’s still a lot of work, but MoinMoin at least has an easy way to convert all Wiki entries pages to static HTML pages. This way, I can still use the search function of the operating system and the web browser to find information in the retired Wiki. I can then copy/paste information that is still useful to my new MediaWiki instance. Fortunately, this is quite efficient, because copying / pasting HTML content triggers MediaWiki to format everything correctly, including headings and preformatted text. If I had to do all of this by hand, I would probably reconsider my manual approach.
So with a total effort of 2-3 hours, I now have a new online Wiki system that I can access from any device, which is read and write protected with a password, it’s dockerized, and it comes with easy procedures to backup and restore the data.