Cloudflare tunnel and local access

Now fixed, and I thought I’d specify what I did for anybody else having the same issue. You’ll need to be on your local network accessing via your local https://IP:8123

  1. Go to the Cloudflared add-on, configuration, edit in YAML, copy the YAML into somewhere so you’ve got it for later
  2. Uninstall the add-on
  3. Go to your code editor of choice, and in the configuration.yaml file you need to delete the ssl_certificate and ssl_key lines. Save
  4. Restart home assistant
  5. Go to Cloudflare site itself. Click Access in the left hand menu. Launch Zero Trust
  6. Go to Networks/Tunnels on the left hand menu
  7. You should see your tunnel listed. Click the 3 dots at the end of the row, and delete. You’ll get some warnings which you need to accept.
  8. Go back to home assistant, but you’ll now need to use http://IP:8123 (note not https)
  9. Reinstall cloudflared add-on
  10. In configuration, edit in YAML, and paste your config you saved earlier
  11. Start the add-on and give it a few seconds.
  12. Go to the logs. You should get instructions for copying a url to authorise your new tunnel. Do that and confirm on the Cloudflare site
  13. Go back to HA, and your Cloudflared logs should switch shortly to confirming the new tunnel, and you’re all done! Your local access is now http, and external is all https.
1 Like