I’m a huge fan of Homebridge and use the web interface provided by homebridge-config-ui-x extensively. I’m also a huge fan of Caddy to automate the creation and management of HTTPS-based websites using Let’s Encrypt.

Lot’s of people ask me why I’m such a fan of Caddy and it’s because configuring it to reverse proxy something is usually pretty easy. In this case, the Caddyfile for homebridge-config-ui-x is as simple as:

https://homebridge.yourdomain.com {

    root /usr/share/caddy

    tls { ... }

    proxy /socket.io http://127.0.0.1:8181 { websocket }
    proxy / http://127.0.0.1:8181 { transparent }

}

This assumes Caddy is running on the same box as Homebridge, but if not, just change 127.0.0.1 to the IP address of the box on which Caddy is actually running. You’ll need to configure the tls { .. } stanza yourself based on your own requirements.