Adieu Posterous, moin moin self-hosting!

qr-code for this page's url

I used to host my two blogs (hdurer.posterous.com a seldom used blog for non-computer things and posterous.betareduction.info my slightly more used blog for things relating to computers) with Posterous, a nifty, easy-to-use system of keeping your blog and writing posts by emailing them to their servers. It was a bit restricting that no own Javascript could be embedded (which made it too hard to embed per-post Flattr buttons), and it didn't like the font formatting from email sent via gmail but overall I was fairly happy with the service. And for free, the price was certainly right.

Alas, Posterous is closing at the end of April. And I had to either move my stuff or let it disappear into the big bitbucket. Now, I have no delusions about the importance of my old post and suspect nobody would even notice but it would still have been sad to see them go so I looked for an alternative place for my digital drivel.

Having learned my lesson, I was not going to use another free service and at the same time I was not willing to spend money on this silly blog so the conclusion was to re-use existing facilities and just host it myself.

There are probably nearly as many ways to host your own blog as there are actual blogs out there but I wanted something simple and light because my $5.95/month VPS is severely underpowered.

Some googling quickly found that there are ways to write blogs via Emacs's Org mode (see e.g. here). I use Org mode a lot anyway and love it, so being able to write post in that seemed very promising. Especially the automatic code highlighting that comes with it would come in handy. From the various option with Org mode I quickly came to try out o-blog, mainly because it seemed the easiest thing to use and hack if needed (it's all Emacs lisp) and the output is simple static HTML plus other static assets.

o-blog's example blog uses lots of stuff like Bootstrap and runtime css generation via Less that seemed OTT for a simple blog (yes, I know, I am old-school and like it simple) but it is very flexible and thus I could just dumb-down the sample templates to be to my liking.

Converting the backup of the Posterous blogs into Org mode formatted content wasn't that much fun but fairly straightforward and not enough work to warrant any it automation other than a few keyboard macros.

Thankfully, I had hosted the main blog under my own domain (thank you, Posterous, for allowing that) so that I could just host that domain on my VPS as well with simple re-direct rules in nginx to permanently forward to the new blog's URLs:

server {
        listen   [::]:80;
        server_name  posterous.betareduction.info;

        access_log  /var/log/nginx/posterous.access.log;

        location / {
                rewrite ^/$ http://blog.hdurer.net/index.html permanent;
                rewrite ^/rss.xml$ http://blog.hdurer.net/index.xml permanent;

                rewrite ^/dabbling-with-clozure-cl$ http://blog.hdurer.net/posts/2012/08/04_dabbling-with-clozure-cl.html permanent;
                rewrite ^/hello-world-with-ecl-on-the-raspberry-pi$ http://blog.hdurer.net/posts/2012/07/25_hello-world-with-ecl-on-the-raspberry-pi.html permanent;
                rewrite ^/building-my-own-ecl-for-and-on-the-raspberry$ http://blog.hdurer.net/posts/2012/07/23_building-my-own-ecl-for-and-on-the-raspberry-pi.html permanent;

What you see here is the result of my efforts so far. There is still plenty of work to be done (I am only slowly learning CSS and have no design skills anyway) but I hope it is in a state where you at least don't have to claw your eyes out of their sockets looking at it and where you can find everything.