This blog is now self-hosted on a virtual machine. It was completely unnecessary but it was a fun little project.
The local publishing workflow is mostly unchanged is:
- create a new blog post locally,
- commit to the repo, and
- push to the virtual machine.
On the server side, I have set up a very rough post-receive hook that:
- clones the repo to a temp directory,
- builds the website using hugo, and
- rewrites the folder nginx serves.
It’s kind of convoluted but it works. For now.
Update no one had asked for: It has been about a week since I set up self hosting this blog. It has worked well so far.
Nginx is able to serve all the 1s of visits that I get. I guess that is the main strength in hosting a static website.
Setting up letsencrypt was a little bit more complicated because the automatic letsencrypt verification kept failing. I probably didn’t set up the nginx server correctly. I moved to the manual verification via dns challenge now that duckdns supports it. It is a somewhat involved process but it worked well.