For a long time I've built all my sites (kellyrenee.me, brushfire.games, polychromaticgame.com, shipwreckgame.com) as plain HTML static sites. That means there's not only no server but there's no build step either.
Despite the simplicity of the sites, I've generally relied on various platforms for hosting. These platforms usually handle all the SSL stuff, have nicer interfaces for redirects, and handle all the auto deploys for me. I used Netlify for years before moving to Cloudflare last year. I decided recently I didn't care much for Cloudflare and wanted to move. I looked at Netlify again, but their new plans would run me $19/mo for Brushfire's websites, because they are private org-owned repos on GitHub. That's a bit extreme given I don't need 99% of Netlify's feature set so I thought: maybe I'll just host them myself?
And so I went off and did that. It really isn't too hard either. Here's the five step approach I used to get my sites hosted with GitHub web hooks triggering updates:
- Set up an Ubuntu droplet on DigitalOcean (I'm using the cheap $4/mo droplet because I get nearly 0 traffic so it ought to be enough for a while)
- Set up nginx on your droplet
- Use Let's Encrypt to get SSL for your domains
- Configure GitHub web hooks to trigger updates of your site
- Optional, but I disabled all nginx logging. I probably could've futzed around with logging formats but basically I don't want to store a bunch of IP addresses and access logs. It feels like extra data collection I frankly don't need.
And this is all working splendidly for me so far. Admittedly this is more work than Netlify and there's probably a number of improvements I've yet to make, but given I'm a nerd and have minimal requirements, this should be plenty sufficient.
Plus it's kinda neat to learn a bit more about how this stuff works. 😁