How to Install HTTPS Certificates on PTZOptics Cameras
April 07, 2025
HTTPS Certificates for PTZOptics cameras
This guide will demonstrate how to generate and add a HTTPS certificate for your camera. You will need access to a remote machine that is running certbot: Certbot (eff.org)
- These instructions are written using a Ubuntu 22.04 LTS Linux distribution.
- If not installed, install certbot: sudo snap install certbot –classic
- You need to forward port 80 through your router, so that your PC is connected directly to the internet. Your PC will be the mock web server which will register the domain for the camera
- You need to register a domain and point it to your IP address. I am using camera.havsys.com
- Run the following command on your PC: sudo certbot certonly --standalone
- After a successful certificate generation, you should see something like the following:
- The process will generate several .pem files. We will need to concatenate the private key (privkey.pem) and the server certificate cert.pem.
- The letsencrypt directory is only made for root access. Let’s switch to the root user, for the next few steps: sudo -i
- Navigate to the directory with your certs (using camera.havsys.com as example):
cd /etc/letsencrypt/live/camera.havsys.com/
- enter the following command to create the ssl.pem file:
cat privkey.pem cert.pem > ssl.pem - This command creates the ssl.pem file from the other two files.
- I will put this file in my home directory, so it is easy for me to download
mv ssl.pem /home/geoff/Downloads/Type - Change back to a normal user: exit
- I will logout from my Ubuntu machine and download the file to my local machine via SSH:
scp optinix:/home/geoff/Downloads/ssl.pem ./ - Swap the port forward from your linux PC to the camera you want to host
- Upload the ssl.pem file to your camera in the System menu and reboot. Your camera should default to https.