Back in 2013 I made the decision to dip my big toe into the Linux world by setting up a Wordpress blog using Web Faction as a hosting provider. Having spent over a decade firmly entrenched in the Windows world as a .Net developer this was virgin territory for me: I’d never SSH’ed into a server, worked with MySQL, and certainly never looked too closely at PHP code.
And what a wonderful experience it was! Seriously, I can’t say enough good things about Web Faction and how easy they make it to set up an account and spin up a fresh Wordpress blog. I’d say it took me 2 hours total to go from account sign up to blog up and running with minimalist styling (articles came much later).
It was during this experience that I started to get a real taste for Linux and working via the command line to explore the operating system. I was using the $9.95 a month plan which came with SSH access to a shared Centos 6 server. Because this is a shared server you’re obviously not allowed “free rein” to do as you please; there are other blokes using the same server and they certainly don’t want you mucking around with their processes and applications!
As I became more proficient at Linux I also started running into roadblocks that started getting in the way of my self-education. I was attempting to set up MongoDB, compile Go from source, explore ways of keeping long processes running, and delve into the blossoming world of ASP.NET vNext and Mono. All except the last I was able to pull off using work-arounds (the Webfaction documentation is quite useful) but non of the approaches matched other documentation found online; I found that I was having to adapt my approach to solving these problems based on the restrictions imposed due to the shared environment.
Disclaimer: There’s a very good chance that all of the roadblocks I encountered had very reasonable solutions and workaround. The Webfaction environment really is wonderful.
None-the-less, I made the decision over the past week to really learn Linux. I mean, REALLY learn it. As in set up a brand new VPS from scratch learn it. And I figured it might be time to do away with Wordpress and its constant upgrades/security holes while I was at it. The time had come to move my blog to a static Go based blogging platform!
The solution I chose was Hugo, a static site generator written in Go. There was nothing about my blog that really needed dynamic components and it gave me a great excuse to get my hands dirty in Linux with the following end goals in mind:
- Move my blog from Wordpress to Hugo
- Serve the static files generated by Hugo from Nginx
- Learn how to tune Nginx for performance
- Button up security on the server
- Correctly configure SSH (non-root) access
- Use firewall software to block all non-necessary ports
- Set up some form of intrusion detection
- Set up a monitoring tool like [New Relic] for server monitoring