Subdomain cloudflare tunnel to local homeassistant

hi folks, am following this youtube guid to setup local homeassistant to be reachable via cloudflare tunnel:

I already have a domain of my own though I was trying to understand if it is possible to use a subdomain for the tunnel instead of creating/purchasing a TLD for it,

this stack exchange thread says it should be possible to apply an NS record to a specific subdomain, and my domain registar has kindly applied the NS that cloudflare assigned me when I created the account,

now as for the next steps, is where I am lost,

when I made the cloudflare account it made me input my TLD, i had no way to input the subdomain alone, am not sure what manual steps I should go through to setup the homeassistant tunnel,

did anyone try it or is it possible only with TLDs?


Regarding the sub-domain setup at Cloudflare:


Since you’ve already have a domain name, great!
When you’re creating a cloudflared tunnel, you can add a Public hostname like (sub-domain) and point it to your local Home Assistant, therefore you’d see listed is already using Cloudflare (has got the assigned Cloudflare nameservers for your Cloudflare account added at your domain registrar).

I am using this approach for HDL related stuff and controlling a “smart-home” room via Home Assistant from a locally hosted VM (without exposing it online).

A CNAME (partial) setup approach would be possible, if so:

hi @fritex thanks a lot for the detailed reply!
both the subdomain setup and partial CNAME setup are unavailable for the free tier, which I planned to use given am planning to use it for personal stuff, nothing biz related…so I suspect this leaves me only with buying a cheap .uk domain as “economically” viable alternative :sweat_smile:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.