Using OpenBSD, you can use httpd, cron,
pf, and acme-client to begin hosting static
websites. If your website becomes more complex in the future, OpenBSD
provides upgrade paths through relayd. OpenBSD provides
example configuration files in /etc/examples.
Allow incoming http(s) connections in your firewall
Allow outgoing connections to letsencrypt in your firewall. This
will be used to get HTTPS certificates.
Modify the example acme-client config file to match your domain name
Modify the example httpd config file to match your domain[1].
Enable httpd
Run acme-client in the console (to test if it works)
If it works, create a daily cronjob to renew the certificate.
Despite us running this daily, acme-client is smart enough to only
reach out to letsencrypt if the certificate is almost out of date.
Put at least an index.html file on your server so that
you may test that it works.
Bonus
I like my unprivelaged user to be the owner of the server directory. It
allows me to have a git repo sitting directly on the server, and makes
editing easier. The directory still has global read/execute permissions,
so httpd is able to serve it just fine. And it means once I'm satisfied
with my changed, I login to my server, cd to the directory, and type
git merge dev, and everything is great.
What's missing from this guide?
While this does get you a site, you're still stuck writing it in raw
HTML, which isn't very fun. On top of that, the experience of
modifying this site locally is pretty annoying without the right
tools. This should be added in the future.