Until recently I’ve never had my own server; always hosted at friends, for free. Usually limiting me in terms of mobility regarding technologies. One of the first thing which made me stay away from Ruby — my host would only support PHP. That’s really an advantage for PHP, in terms of community growth.
A few months back, I decided to finally buy myself a server. I had been into Ruby for a while, and I wanted to deploy a cool personal site, handling some dynamic features as well like: pulling my Github repositories, and listing them directly at /projects.
I looked around for a low end box, since I didn’t need much power. While not being very server-wise, I still needed some. I had at this point already written What I wish a Ruby programmer had told me one year ago which became quite popular, with something like 20.000 hits the first day. A social media attack like that, requires some server power. Luckily, the server I had my blog hosted on at that point, could easily manage such a load. However, when I wanted to move my blog to a less powerful server, my own, I’d still need some power in order to handle these attacks. But the major problem here, is that I don’t want to pay for server power I’ll rarely take full advantage of, so I had to find balance between pricing a student could afford, and power.
I wanted to make the move because I didn’t want to be limited to Wordpress, or PHP-based stuff. I was set to develop my own little solution, for the fun and learning process of it.
I ended up buying a Fivebean (they are now called bluemile) node with 256 mb. of ram, and 512 mb. burst. This should do good, and would only be $16/month, which seemed fair. The first month, I used it a lot — I had never had a server before, so I learned a great deal on this node. I set it up with Arch Linux — following the philosophy:
For a personal Linux server, use the distro you feel the most comfortable with.1
As I’ve had previous experience with Arch Linux, I decided to go for it on the server-side too, even though Arch tends to be bleeding edge — it worked out just fine. I set the web server up with Nginx which I had heard great things about, mostly it was to try something else than Apache. I also set up Passenger for Ruby/Rack deployment. I even documented this process on the Arch Linux wiki.
This was all a great experience. I ended up having some issues with Fivebean, in terms of my node being DDOSSed, resulting in poor performance and occasional downtime; about 5 minutes per hour in average. I contacted the support, and they told me they’d move me — great! However, issues kept happening so I interpreted it as a sign: try this Linode thing everyone is buzzing about!
And I did. Linode is great, and appears fast — SSH worked much faster than what I had been used to with my Fivebean node. So I kept with Linode, and at their birthday, they even boosted the ram of all slices — for free!
At some point I realised something though: I just hosted static stuff on my site, I barely used it for anything dynamic anymore. I reminded myself Github had a service for just this: Github Pages:
The GitHub Pages feature allows you to publish content to the web by simply pushing content to one of your GitHub hosted repositories. There are two different kinds of Pages that you can create: User Pages and Project Pages.2
I had one issue with Pages though: I wanted my host my blog there. Quickly I found that Github already, of course – had internally developed a RubyGem called Jekyll:
Jekyll is a blog-aware, static site generator in Ruby3
By formatting your blog posts in either Markdown, Textile or HTML, you could use Liquid to format your pages. Resulting in the perfect environment for any hackers website. I’m using this right now, to write this post. Having a Textile file, editing it with Vim. Whenever I want to deploy a new post, or change something — I just push it to my site repository.
The best thing about Github Pages is, that it has allowed me to cancel my Linode, and I can also redirect my domain here. Furthermore, my blog should be able to handle Social Media attacks just fine now. And all this is for free.
If you can see yourself in some of this, I advice you to try out Github Pages — it’s been a great experience for me this far.
If you want to run a blog, and are already using another blog system, like Wordpress, Jekyll has some built in code for converting your blog posts for Jekyll!
My entire site is open source, hosted at Github — of course. Perhaps it could help you get started!
1 Own wisdom