Ivan Kusalic - home page

Blogging With Octopress and S3

For a few years now I’ve thought that blogging is something every developer should do. Unfortunately I’ve never gotten to it. Up until now.

It’s only appropriate to start with a guide describing how to set up a blog.

Intended usage

My main reason for blogging is to become a better writer. I also think that one understands things much better when trying to explain them to somebody else.

Keeping those goals in mind, I’m free of some usual constraints associated with blogging. In particular I’m free to use:

  • minimalistic design
    • just my preference, but also easier to get right
  • no comments
    • I agree with Matt on this one
  • no infinite gadgets
    • content is the only thing that matters
  • www subdomain


I’m using Octopress for blogging. Octopress is a blogging framework that uses Jekyll static site generator. I’ve chosen Octopress for a few reasons:

  • ‘A blogging framework for hackers.’
    • no DB
    • Markdown
    • blog in a Git repository
  • uses static pages
    • no admin interface
    • scalable
  • Open Source
    • customizable – Ruby
    • healthy community

One thing that I particularly like about Octopress – it’s easy to be minimalistic. More about that some other time.

Amazon S3

To exist, blogs need to be hosted somewhere. I was considering some PaaS offerings or dedicated hosting, when I stumbled upon a great idea. Why not just host the blog on Amazon S3? It’s all static anyway, and with S3 one gets infinite scaling for literally pennies.

It turns out that’s easy to do and there are no real downsides, at least considering my aforementioned intended usage.

Technical notes

What follows are some technical notes on how exactly to get a blog running.

Getting Octopress

One of the things I don’t like about Octopress – it’s not a gem. That leaves you with basically 2 options: fork it or add it as a remote.

I’ve decided to use my own repository. Also the probability of me submitting pull requests for blogging framework on a regular basis is quite slim. So I’ve decided to go with the second option.

When you’ve cloned the repository, get a quick taste of Octopress by running:

bundle exec rake -T

Octopress customization

One issue I had with Octopress after forking it was that gem directory_watcher was not working properly. I had to downgrade the version and add it explicitly to Gemfile:

Gemfile - development group
gem 'directory_watcher', '~> 1.4.1'

I like using gemsets, so I’ve modified .rvmrc:

rvm use ruby-1.9.3-p429@blog --create

I also installed Aron Cedercrantz’s blog theme, and tweeked it a bit. Don’t forget to at least use your own favicon.

Next, configure Octopress to your likings. To start, take a look at _config.yml file.

Use S3

Finally, set up Octopress to use S3 for deployment. Robert Brewitz has a great post that sums up the whole process.

Only one thing left to add: don’t forget to configure 404 page for S3. This can be done in bucket properties, under `Static Website Hosting’.


Setting up Octopress blog on Amazon S3 is easy and efficient. If it suites your requirements (you use only static content) you should consider doing so.

There are still many improvements possible. It is possible to use Amazon’s Cloudfront in addition to S3. But for my needs that would just add unnecessary complexity. Your mileage may vary.


I’ve since decided to use Cloudfront. Not for the performance optimisation, but to add HTTPS support to the site. You can find out more here.