Get your own LaTeX-enabled wiki in the cloud with Instiki on Heroku

Wednesday, November 21st, 2012 | Author:

I guess you all know what a WikiWikiWeb (short: wiki) is, it's a website where you can easily add new pages and modify existing ones. MathOverflow is some kind of hybrid between Q&A and a wiki, since users with enough reputation can edit other people's questions and answers. MathOverflow made the Markdown syntax very popular, and people got used to using LaTeX online. Some of my readers surely know the nLab, a collaborative wiki on n-categorical math(ematical physics) and stuff. The nLab runs on a software called Instiki, which is a wiki written in Ruby (an intepreted language similar to Python, and somewhat similar to Lisp, Perl and JavaScript; which is often used for web applications like wikis). The good thing about Instiki is that it supports editing pages in Markdown syntax with embedded LaTeX, so it is able to support your personal knowledge management needs. In addition, Instiki is small (thus not many bugs are to be expected), fast and the code is quite readable; something I wouldn't say about MediaWiki, the software behind Wikipedia.

In this post, I will tell you how to run your own wiki like the nLab. [UPDATED 2013-01-07; easier fix]

To run your own wiki like the nLab (for personal or public purposes), you need a webserver, so in principle some computer which runs all day and all night with internet access, and on this webserver an installation of Ruby and Instiki (or you just have the wiki on a single computer, like your computer at work; which is what I used to have before the tablet-era). Since nowadays you can outsource this stuff, you probably just buy a virtual machine, i.e. something that feels as if someone else has a webserver reserved somewhere, running all day and all night, just for you. In fact, there might be a real computer with thousands of virtual machines running on this single computer, but you wouldn't notice. They might even spread the single virtual machine over several computers, to avoid problems if the internet connection of one single computer is flaky. That's then what they call the cloud (I'm simplifying).

The part about "buy something" feels bad, right? If you investigate a bit, it feels even worse, since the prices are not meant to be for end-consumers but for web application developers with thousands of customers, who need a big scalable architecture (unlike a single person).

Go to Heroku, those guys allow you to have one single virtual machine with Ruby support and a database (so, in principle, the possibility to install an Instiki wiki) for free. Now the bad thing is that Heroku apps have to come in a specific format, which isn't the case for Instiki (as of now, 2012-11-15). Maybe also kind of bad is that Heroku uses their own language for the cloud stuff, i.e. they call their virtual machines "dynos". But there are also good things to say: their interface looks very clean, I haven't experienced any bugs, the documentation is superb, they use GIT for version control...

If you know a tiny little bit about computers or programming (maybe even without that), you can install Instiki on Heroku, to get your personal math-wiki. Here are the steps to take (on Ubuntu Linux 12.10, by the way. I don't know of anything else, but Mac/Windows should not pose any obstacle here).

Installing Instiki on Heroku:

Probably soon the problem will be fixed. Then it should be possible to write a smart shell script that does everything for you. Right now I don't know enough Ruby to be smart enough to fix the database naming problem, but I know that it shouldn't be hard to do that. Maybe I should do my first github fork / pull / etc. but then I don't know the GIT details. If that happens, I will update this post.

Oh and by the way, I remember that it was once possible to get your own sub-wiki of the nLab, like Joyal's CatLab. I din't find these right now, do they still exist?

Category: English, Mathematics, Not Mathematics

Comments are currently closed.


2 Responses

  1. Hi Konrad,

    eine schöne Idee, so ein eigenes Mathe-Wiki. Würde das gerne ausprobieren und bin gerade dabei, deiner Anleitung zu folgen. Leider habe ich keine Ahnung, was ich da tue. Ich habe nichts von einer PostgreSQL-Datenbank gefunden, daraufhin ein Addon "Heroku Postgres Dev :: Crimson" hinzugefügt. War das richtig?

    Nun habe ich bei den Einstellungen dieses Addons auch eine Datenbank, ist diese gemeint? Der Name steht aber nicht in NAVY oder COPPER. Und wie muss ich nun die instiki/config/environments/production.rb anpassen?

    Schöne Grüße

  2. In my Heroku Dashboard, when I go to my app, I see under "Add-ons" the entry "Heroku Postgres Dev :: Copper".

    Crimson is also a color (which I didn't know before), so that fits :-)

    I figured that the Add-on is added automagically once one attempts to install Instiki, but maybe that isn't universally the case (it was for me, somehow).

    It is the right thing you did, adding the PostgreSQL Dev database Add-on manually. Probably you can just continue using the description, by modifying in your production.rb the string "navy" to "crimson".

    Good luck!

    By the way: I found it quite easy and recommendable to install Instiki locally on your machine, to experiment a little bit. That is so easy that I didn't have to write anything about that.