April 2, 2022

Valid https Certificates for UniFi Video Cameras

Update: 2023-11-26
Update: 2022-06-10

UniFi Protect cameras are capable of delivering snapshots via http or https. The cameras are delivered with a self signed Ubiquiti certificate for https. This is unacceptable. Replacing the /etc/server.pem on the camera with a valid pem file that includes the public certificate and the private key corrects the problem. The fix is not persistent. No persistent method has been identified.

A clumsy workaround involves a secure copy of a valid pem file to camera_ip:/etc/server.pem and a restart of the lighttpd process. This workaround must be executed after any boot of the camera. Device (camera) ssh must be enabled.

  • scp valid_cert_file_with_key ubnt@camera_ip:/etc/server.pem
  • ssh ubnt@camera_ip 'kill $(cat /var/run/lighttpd.pid)'

Reveal the camera ssh password, called the Recovery Code, at Configured at UNVR → Protect → General → Other Configurations → Recovery Code.

Enable ssh to cameras by changing "enableSsh": false to "enableSsh": true in the appropriate file in the Protect Controller. As of this page update, the primary configuration file does not have to be updated. A separate override file can be created to enble SSH.

  • UNVR and Cloud Key, create file: /etc/unifi-protect/config.json
  • File Contents: { "enableSsh": true }
  • File can be created with this jq command
  • jq --null-input '.enableSsh=true' > /etc/unifi-protect/config.json
  • restart Protect: systemctl restart unifi-protect.service

No comments:

Post a Comment