– Source: Scott Rodgerson on Unsplash.
As promised (or threatened?) in the last post, this post is dedicated to exploring the available options for hosting a Jekyll-based website (or any other static site generator), whether for a personal blog like the one you’re reading, a professional studio, or a small business website.
I could summarize this in two lines and only refer you to what I wrote 6–7 years ago (here and here), but so much time has passed that a proper update is needed.
For those interested in reading the other installments of my transition from WordPress to Jekyll, below is the full list of posts that have been published:
- From melabit to melabit: goodbye WordPress, hello Jekyll
- From melabit to melabit: why Jekyll?
- From melabit to melabit: Jekyll, installation and basic configuration
- From melabit to melabit: developing a web site in Jekyll
- From melabit to melabit: managing comments with Jekyll
- From melabit to melabit: hosting Jekyll
Introduction
I’m not a professional developer, I don’t know much about web development, and I consider myself just a hobbyist when it comes to server and network management.
The thoughts shared below are purely personal reflections, shaped by years of experience and experimentation in managing computing systems – some more complex than others – and web services, both still active and long gone (sadly, more than one). I hope these insights will be useful to anyone considering similar solutions, but those looking for professional answers should turn to someone with deeper expertise.
Why using a Mac isn’t a good idea
As I mentioned last time, I find it impractical to use a Mac as a web server for a Jekyll-based site (or, more generally, for any website, whether static or dynamic).
The reason is simple: for a site with moderate traffic, a Mac is overkill – an unnecessary waste of resources.1
Development is a different story (I used a Mac for that myself). Having a UNIX-based system with a polished graphical interface, powerful yet user-friendly editors, and tools that streamline coding and debugging is invaluable.
What about an old Mac lying around, why not repurpose it to serve my site?
An old Mac is still great for writing, managing emails, browsing the web, video conferencing, making music, learning to code, and much more. Even better if you install a recent version of macOS using Open Core Legacy Patcher.
But using an old computer as a server, keeping it on 24/7? Personally, I wouldn’t do it, it just doesn’t seem reliable enough. And even if you wanted to try, you’d run into the same broader issues I’ll discuss in the next section.
Why doing it yourself isn’t worth it
Instead of a Mac, we might consider using a PC, perhaps one of those slightly older but still capable mini-PCs, available for just over 100 euros, like the Lenovo M95q or the HP 800 G3. Another option could be a Raspberry Pi 5, though unfortunately, it’s no longer as budget-friendly as it used to be, at least if we plan to use it as a regular desktop computer.
As I mentioned years ago, once you install Linux on these mini-PCs, they become perfect “for learning how to manage a web server and the associated Linux system, or for experimenting with different CMSs or static site generators before deciding which one to use for your website.”
You don’t even need to connect a keyboard and monitor, as everything can be done from the Terminal via ssh
. For those who prefer a graphical interface, remote access is easy with Chrome Remote Desktop or with one of the many remote access services we’re all familiar with these days.
But can we use these mini-PCs to run a “real” website, one that needs to be online 24/7?
In my opinion, no.
A website needs a fixed public IP address, and in Italy only Fastweb offers this for free, but under certain conditions. Other providers either don’t know what it is or require special contracts, which are of course more expensive than regular “home” or “business” plans.
I know, there are dynamic DNS services. But the ’90s are long gone, and today I would never trust my web services to a volatile service with unpredictable IP update times. Besides, if you want any level of reliability, you’re going to have to pay for it. At this point, is it worth it?
Another issue is sudden internet or power outages, perhaps due to street work or because your colleague or partner decided to turn on all the air conditioners at once or run the washing machine, oven, and hair dryer at the same time.
Sure, there are UPS devices, but if we’re away from the office or home, even the UPS will eventually run out of power, and our server will shut down.
And let’s not forget the security issue, the inevitable and constant attacks from countless idle youngsters with nothing better to do with their time. If we’re not already security experts, are we really willing to delve into matters far beyond our skill set?
What is worth doing yourself
If you want to do it yourself, the best option is undoubtedly to use a virtual machine on one of the countless cloud services, from UpCloud to Digital Ocean, or Heroku and Linode (now Akamai Cloud), not forgetting the big players like Amazon AWS and Google Cloud (and yes, there’s also Microsoft Azure). If you’re hesitant to buy American right now, here’s a list of European cloud providers.
A virtual machine on the cloud is inexpensive and doesn’t have any of the drawbacks listed so far, except for the security issue, which, however, is at least partially managed by the service provider itself.
Even more secure, and completely free, is to use services like GitHub Pages, which automatically regenerates and publishes the site on github.io
every time a linked Jekyll-based repository is updated. The related documentation is very detailed, so there’s no need for me to add anything further.
What I have done
I am a user like many others, and the solution I have adopted can be a good example of how to manage web hosting efficiently and relatively cheaply (which is always a plus), without compromising on service quality.
This site is hosted by Shock Hosting, a hosting service I have been using for years, with a great support service. Actually, I’ve had very few problems over the years, and they’ve always been minor, like paying a bill twice by mistake, but every time the support response couldn’t have been faster.
The basic “Low Shock” plan at $2.99 per month offers unlimited disk space and data transfer, with no artificial speed limits (which few competitors offer). This plan is more than sufficient for a static site, but also for a site based on WordPress or other CMSs (based on my direct experience). The higher plans are identical to the basic one but allow hosting more domains, and switching between plans only requires opening a ticket and a short wait.
The domain name is also managed by Shock Hosting and costs 12 dollars per year (one dollar per month), which is the standard cost for a .com
domain.
Of course, Shock Hosting is just one of countless hosting services available, although I find it hard to beat in terms of price/quality ratio. In any case, before making a choice, I recommend paying close attention to the terms of service, as most providers impose more or less strict limits on disk space or data transfer. Others may offer very attractive prices for the first year or the first few months, only to raise them significantly later. If you can test how their support works before committing, that’s a big plus.
Otherwise, choose a service that allows you to pay monthly or quarterly so you can carefully evaluate whether it meets your needs. You can always choose to pay at longer intervals later on.
Avoid like the plague those services that offer massive discounts if you commit for two, three, or more years, or even for… eternity. Nothing on the internet lasts forever; in fact, the so-called eternal services are often the first to disappear. And if that happens, you’ll ve lost everything you paid for in advance, so much for saving money!
The hosting service alone is not enough for melabit.com because it doesn’t support running comma
to manage comments. The simplest solution would have been to switch to a virtual server, still on Shock Hosting, but I don’t like simple solutions. Besides, the hosting service offers several advantages that I didn’t want to give up: it handles web server management and site security, performs backups, renews the SSL certificate, provides analytics, and much more. All of this is worth far more than the few euros per month it costs.
Just as I was thinking about what to do, I came across this post, and I decided to give the German kitchen a try by purchasing a virtual server from Hetzner. To run comma
, the base CX22 plan is more than enough. For less than 5 euros per month, it offers a machine equivalent to the base plan from Shock Hosting, which costs twice as much. The virtual machine is powerful enough that I can also generate the site on it and then transfer the result to Shock Hosting using rsync
.
When I chose Hetzner, the ongoing trade war between the U.S. and Europe was only in the minds of the gods, but in hindsight, it turned out to be a wise decision. If I ever lost access to my US-based hosting service or if the cost became prohibitive for a European, it would take very little effort to move everything to a safer location. Bye bye, USA.
Let’s do the math
In this post, I’ve written about why I don’t think it’s worth it to run a website on either a Mac or a PC. But is it at least economically viable to do so?
Let’s start by calculating how much I spend per month for melabit.com. Hosting costs me 3 euros, and the virtual server costs 5 euros. That’s a total of 8 euros per month, which adds up to 96 euros per year. I should also add the cost of the domain, but that has to be paid anyway, so I’ll leave it out.
Now, let’s assume I’m stubborn and insist on using a mini PC or a Raspberry Pi to manage my site. Say the barebones computer costs around 100-120 euros. Then, I need to add a decent SSD and a sufficient amount of RAM, which adds at least another 60-100 euros (for the Raspberry Pi, the RAM is fixed and can’t be upgraded, but instead, I’d need to buy a case, a power supply, a practically mandatory heatsink, and an NVMe SSD adapter, again totaling about 100 euros).2 Then, I’d also need a UPS, which will add another 100 euros.
The total comes to about 300 euros (give or take 30-40 euros), roughly the same as what I spend in three years. But there’s no guarantee that a mini PC, or even worse, a Raspberry Pi, will last three years of uninterrupted use. Maybe today the fan breaks, tomorrow the power supply, the SSD starts acting up, or the UPS batteries die. In short, even financially, it’s not really worth it.
Trust me, the cloud is much, much better.