Private Server Upgrade

I started this blog 4 years ago to learn how to run a website by signing up for a shared hosting plan. Since then I’ve learned how to manage WordPress, work with DNS, up my SEO game, look at analytics, and hack simple web pages. However, the limitations of the shared host have also limited my ability to learn more advanced topics. I didn’t want to simply use the stack that made up a website; I wanted to set it up myself and understand the structure of my website on a more fundamental level. More than anything else, this motivated me to make the switch.

Just like with shared hosts, they’ve saturated the market for private servers. My only requirement was to keep my hosting bills the same so this limited me to those cheap $5/mo VPS. In this space, the major players are Linode and Digital Ocean; everyone else looked as ephemeral as the VMs they spawned. I ended going with Digital Ocean because of the $50 credit from Github’s developer pack. What made me stay though were all the great tutorials they publish in their community. These were incredibly informative and gave me confidence that I was setting everything up correctly.

So what exactly did I gain from switching over to a VPS? To start off, I lost a lot of the value added features such as CPanel, analytics, email, and one click installs. On the other hand I went from jail shell to root which means I could set all that up and more. With virtualization, I’m also able build my own data center by spawning VMs and configuring the network. The trade-off for this level of control though is time spent, but it’s well worth it for the learning experience.

In bringing up my VPS I had to replace all of my original website’s services and make sure that I configured these all properly. To start off, I took security into my own hands using this Hacker News post as a checklist for securing my server. I then worked to bring up LAMP for WordPress where I gained experience setting up a full stack and the abstraction layers they rely on. What surprised me was how easy it was to port over my entire website from one server to the next. Once the stack is in place, it was a matter of restoring the MySQL database and wp-content directory (guide). It is a testament to flexibility of the web stack’s abstraction layers. After that, all I had to do was bring up email before I can fully commit to the new server. What I learned quickly is that email is a pain to deal with. The easiest solution was to use Zoho by adding a few DNS records to my domain’s zone file. After that, I replaced all the services of my old host and could now focus on adding new capabilities.

One of the things I was most excited to implement was SSL via Let’s Encrypt. It always bothered me that I couldn’t easily setup SSL on my shared host. This meant I was logging into CPanel, web mail, and wp-admin over HTTP up until this point… Along the same crypto vein, I also setup OpenVPN to encrypt my traffic over public Wi-Fi networks for when I’m extra paranoid. I also setup an outgoing mail relay with Mailgun for future projects that will need bots sending out email notifications.

Overall, it was a pleasant experience setting up my droplet and I learned so much in the process. 10/10 will recommend setting up a VPS over any managed hosting solution if you’re an engineer looking to learn something new. Now that I have this VPS up and running though I’m excited about all the new project domains this unlocks for me.

Leave a Reply

Your email address will not be published.