I have a “NUC” today with HassOS, but it’s exposed through DuckDNS. I also have my very own separate domain with a simple and static HTML/CSS/JS website on it, very lightweight. It’s just me and a few friends who use it. DuckDNS has been blocked at my workplace, so I want to move away from it, and to me, it sounds like a good idea to host the website myself on the same “NUC” as I use for HA. I’ve found this addon, Apache2, and I think(don’t know for sure) that it should be able to run my simple website.
My home IP address is a lease, so I need to update it automatically, and I guess using the Hass.io Addon Dynamic IP Updater for Cloudflare or the Cloudflare Integration (What’s the difference?) should take care of that. If I understand correctly, It will keep the A-record up to date, which will make sure that mysite.com always points to the correct public IP address for my home network. The tricky part for me is how to route these connections and make them all work. I want to use www.mysite.com for my website, hass.mysite.com for HA, plex.mysite.com for Plex etc. That would be creating the CNAME’s www, hass, plex etc, correct? Optionally, I can use subdomains such as www.mysite.com/hass, that’s totally fine if it’s the easier way.
How/where do I route those connections to my server at home? Somewhere, I need to setup ports, like 8123 for HA, 443 for my website etc. Is that done at Cloudflare, in my router and/or at my server? Do they all use the same certificate for SSL? Do I need a reverse proxy addon as well? Or anything else I need?
It’s confusing for me at the moment, and this post is to get my head straight before I jump into it and keep the downtime at a minimum.