I had been hosting this website on a small AWS EC2 instance for several years, using Caddy as the web server. But I had been seeing increasing numbers of others using still lower cost options for hosting static web site contents. And I had squirreled away a link to this article that said that Google’s Firebase Hosting free tier was the current winner in that niche. So with that as motivation and no other pressing tasks I gave conversion to Firebase hosting a try that turned out to be remarkably easy:
npm install -g firebase-tools
- Create a Firebase project where the content will be deployed
- cd into the directory where I already have Hugo generate its content
firebase init
firebase serve
- test it locallyfirebase deploy
- Adjust DNS records - the tricky part here was the way Google Domains has you put all the A records together. That and it took a while for the Firebase web console to acknowledge those changes.
That was all the initial deployment required. Later I tweaked the firebase.json
configuration to make the ‘public’ directory reflect where I have hugo
generate its web site files, and adjust the headers on some of the web site
components to make them a little friendlier to visitors - increase the cache times
of the images for example.
In any case, this site has moved since its last incarnation. Interestingly both Caddy and Firebase rely on the increasingly ubiquitous, and free, Let’s Encrypt certificate authority that I started using long ago. And as a bonus I note that SSL Labs gives the results an A+ score now, where previously my tweaking had only achieved an A. More security for less work. Now to consider the implications of moving the other sites I maintain.