How to set up a blog on VPS

  • Mordka
  • Post Specjalny

Hello World!

I've just set up my first VPS and domain to open this blog. It's good opportunity to describe how to do it. It took me a few hours to analyse the market of web hosting and domain registrars. I'll share the results with you below just to save your precious time.

My criteria

  1. Price
    I wanted it as cheap as it could be. One dollar a month is 120 bucks in 10 years time.
  2. Scalability
    I'm planning to run few other Node.js apps on the same machine. These are pet projects I want to test out. If suddenly, one of the projects gains some more users, I don't want to run out of resources.
  3. Customizability
    I want to experiment with Node.js and some other MEAN stack tools. BTW: I'm using Ghost.js to run this blog.
  4. Speed
    Page load time matters. Simple facts:
  • perceived instantaneous access is 0.1 seconds,
  • user's flow of thought is interrupted when they wait 1 second
  • user might leave a website after 10 seconds of waiting.

Hosting

I considered the following possibilities.

  1. Home server or NAS (Network-attached storage) - might be good for sandbox projects. It might be the cheapest option. It's worth considering for home projects if you have good broadband and live in a country with a stable energy supply. It didn't fill my criteria tough.
  2. Dedicated server - that's definitely not an option for personal projects hosting. Even though it offers unlimited server's parameters it's not really scalable and still more expensive then cloud hosting options.
  3. Cloud hosting - a 'cloud' is a buzz word and means nothing so let's break it down:
    • SaaS - Software as a Service - I could have just created WordPress account or used a wonderful Ghost.js hosting services and that could be enough in most of the cases. But in the price of premium subscription you can have a server where you can run anything.
    • PaaS - Platform as a Service - hassle-free hosting, you have control over the deployed applications and configuration details. The infrastructure layer is hidden behind the dedicated software.
      Examples:
      • OpenShift - I used it to host my thesis app written in Grails. I'm quite happy with them. Good support and stable platform. It's one of the few JVM hosting services. I deployed the app in 2012 and it's still running! (have look, you might refresh the page to awake the server - http://didas-mistral.rhcloud.com/didas)
      • modulus.io - quite popular recently for node.js apps. But you pay for the convenience. The server costs 10 times more than I pay now for similar parameters.
      • CloudFoundry - Open Source software to run your own PaaS platform (Java, Ruby, Python, Go, PHP or Node.js.) You can host it on dedicated or IaaS server, so this way you can have PaaS in the price of IaaS. This is amazing software crafted and maintained by Pivotal.
    • IaaS - Infrastructure as a Service - this is what I went for (Vultr.com).
Result

I'm using Vultr as VPS running on IaaS for its considerably low price and decent parameters - the crucial one is the amount of RAM and Vultr offers 768MB for 5$ which is $0.007/h. The performance is quite good - 3.3GHz Intel CPUs and SSD make the website snappy.
To make it even cheaper, I found a promo code website - https://vultrcoupons.com. Vultr offers free 2-month trial with $50 credited to your account. That's impressive.
If you are going for Vultr, please use my referral link
http://www.vultr.com/?ref=6830681 - this will give me 2 months of running this blog for free ;)

Domain

I searched a few domain providers and found .com domain for £1/year from 1and1.com. I heard some horror stories related to unwanted billing for the next year even after issuing a cancel. It's cheap anyway so I bought two domains for £2 and will extend it with other provider in the future.

Wiring up

The real work starts here and the way of doing that depends on the previous chooses.

  1. Add DNS entry to point to your VPS
    It's pretty straightforward. You have to map hostname to IP address of the host. It's done in your domain registrar dashboard, DNS record of type A.
  2. Set up a website/blogging CMS
    It's never ending task. I'm playing with Ghost.js.
  3. Set up email notifications
    It's an optional step. Good for having user accounts verification and follow up notifications (read: spam). I don't need it but I used mailgun.com because it's free and wanted to test it out.

Conclusion

Setting this all up is very cheap nowadays. The most expensive factor is our time. That's why I created this blog post to save others time. Let me know your suggestions and please correct if I'm wrong anywhere.

Mordka

Czytaj więcej wpisów od Mordka.

Podoba Ci się ten wpis?

Otrzymuj powiadomienia o nowych wpisach

użyj czytnika RSS!

Polub nas na Facebooku

Zostaw komentarz