Using Caddy for local subdomains

Started by RobLatour, September 19, 2024, 10:58:06 PM

Previous topic - Next topic
October 06, 2024, 11:25:14 PM #15 Last Edit: October 06, 2024, 11:27:17 PM by RobLatour
Ok, I finally got ssl access to Home Assistant via my own domain name, CloudFlare, and the OPNSense Caddy plugin.  Here is how:

1. setup my domain dns, cloudflare and Caddy in the same was is in my previous post (directly above) for ha.example.com

2. created and installed a SSL a self signed certificate as detailed in this video:
    https://www.youtube.com/watch?v=d-CbVVxAHtI
    (on the Home Assistant box and on the local machine I wanted to use to access Home Assistant)
    (note: without the certificate I could still access portions of Home Assistant screens, however some key
    features like changing Home Assistant settings were blocked)

3. added the following to Home Assistant's configuration.yaml file:

http:
  ssl_certificate: /config/homeassistant.pem
  ssl_key: /config/homeassistant-key.pem
  server_port: 8123
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.1.1
    - 172.30.33.0/24
    - ::1
    - 127.0.0.0



After that I could access Home Assistant with https://ha.example.com/lovelace/default_view

Thanks to all for their help!