UniFi devices (UDM/UDM-SE/CloudKey) are picky about certificates.
They require:
- A valid Common Name (CN)
- A correct Subject Alternative Name (SAN) list
- A certificate and key that mathematically match
- No missing SANs (or the UI and WebSockets will fail)
This article shows how to generate a fully working UniFi certificate using mkcert and how to refine it using OpenSSL.