1. Caddy version (caddy version
):
v2.0.0 h1:pQSaIJGFluFvu8KDGDODV8u4/QRED/OPyIR+MWYYse8=
2. How I run Caddy:
a. System environment:
Ubuntu 18.04.4 LTS, systemd
b. Command:
systemctl start caddy
c. Service/unit/compose file:
[Unit]
Description=Caddy
Documentation=https://caddyserver.com/docs/
After=network.target
[Service]
User=caddy
Group=caddy
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
d. My complete Caddyfile or JSON config:
File can be found here: https://bin.alexsguardian.net/raw/amokaledaq I tried posting it here but due to commented out sections the formatting on here was messed up and wasnt inside a blockquoute making it hard to read.
3. The problem I’m having:
Trying to get Unifi devices to communicate to the controller through Caddy. I was able to get a USG3 to work but a US-8 switch and two APs are refusing to connect.
The switch did communicate at least once but after that its been disconnected (green bar shows it received CPU stats)
4. Error messages and/or full log output:
Log file is extremely long horizontal so: https://bin.alexsguardian.net/raw/imingapuci
5. What I already tried:
Currently have the Unifi STUN server forwarded on port 3478 as per docs but not sure what else to do. Caddyfile comments can show what I tried but with CaddyV2 I’m still trying to learn the proper way to do things.
Also tried adding a reverse_proxy section for /wss for websockets but it didnt work either and caused a ton of console errors in the browser.
6. Links to relevant resources:
Docker container I’m using: Docker Hub (also using default port setup from image)
I checked the Unifi server log and it defiantly has something todo with websockets but not sure if that is the only problem. All devices have the correct Inform URL set so they should hopefully light up and connect as soon as I can get this config fixed.