I spent some time today building a Caddyfile example for TP-Link Omada Controller software. Decided to share (and so fellow Googlers might save themselves some headaches going forward).
I forward 8043 > 443 in my docker config. I used to do 8043>8043 but my setup changed that wouldn’t allow for that.
set 1.2.3.4 to your Omada controller. Also check your controller’s HTTPS port - the default for docker is 8043, which is what I’m using, personally. To confirm - you should be able to navigate to https://1.2.3.4:8043 (replacing with your values) and the controller should work great. If it doesn’t, this won’t work either.
My snippet has some me-specific things that might not apply to you (Cloudflare DNS challenge, for example).
Set your Omada Controller Hostname/IP in the controller to be omada.url.com:443
You MUST use the header_up host header modification. It modifies the host header sent to the Omada controller to append the :8043 port. If this port isn’t in the host header, the Omada 302s the request to ensure HTTPs is being used (what a silly design, but whatever).
An FYI - tls_insecure_skip_verify is inherently insecure. But since I trust the source, I’m not personally concerned. Ideally you would instead specify tls_trusted_ca_certs to trust the known certificate from the upstream. And the most ideal situation would be to add a valid cert to your Omada controller.
With this in place, my TPLink Omada Controller loads up great via Caddy!
Hey @warllo, I’d suggest you might want to start a Help post and fill out some details. Link to this wiki page when you post it, but still fill out all the relevant information; we’d be much better equipped to sort out whatever issue you’re running into this way.
Sorry (also sorry for not seeing this!), not sure what happened when I’d pasted the original post - updated it, and can confirm you need tls_insecure_skip_verify to make it work. Thanks for the heads up!
I was unable to get the posted config working, but after some poking got the following config working. The general approach is the one I found in use in most nginx reverse proxy configs for the Omada controller: replace Host with the host with port 8043 appended, and strip out the :8043 port in the Location headers coming back from the controller.
It seems that it does not work anymore. I had to do it the hackish way and handle normal browser 443/80 requests through caddy and the rest directly by the omada software:
I could not see the device requests. Neither in the caddy logs nor in the omada software. Just the requests from the device and very short answers in tcpdump (which are encrypted)