Websocket Proxy (Phoscon App) - Caddy as NGINX alternative

I was suggesting this:

Browser -> HTTPS (port 443) -> Docker -> Caddy -> deconz:8080
Browser -> WSS (port 443) -> Docker -> Caddy -> deconz:8081

To do this, the browser would need to attempt to connect on port 443, so the app would need to tell the browser that the websocket port to use is 443 (or just omit it because like I said, default for wss:// is 443), so it would try to connect to wss://phoscon.lan instead.

You could make Caddy listen on another port as well if this is easier for you, but it means you’d need to configure the Caddy container to also publish that port, and if you mean to access it from outside your network, port forward that as well.

https://phoscon.lan {
	tls internal
	reverse_proxy 192.168.1.10:8080
}

https://phoscon.lan:8081 {
	tls internal
	reverse_proxy 192.168.1.10:8081
}

But :man_shrugging: it’s up to you to choose which option is best for you.

1 Like