Securing Proxmox with Let’s Encrypt
Create the SSL hook file:
This will update the certs on your Proxmox instance after they are issued/renewed.
nano /root/ssl.sh
Paste the follwing into the new file:
#!/bin/sh rm -rf /etc/pve/local/pve-ssl.pem rm -rf /etc/pve/local/pve-ssl.key rm -rf /etc/pve/pve-root-ca.pem cp /etc/letsencrypt/live/{DOMAIN}/fullchain.pem /etc/pve/local/pve-ssl.pem cp /etc/letsencrypt/live/{DOMAIN}/chain.pem /etc/pve/pve-root-ca.pem cp /etc/letsencrypt/live/{DOMAIN}/privkey.pem /etc/pve/local/pve-ssl.key service pveproxy restart service pvedaemon restart
Install Certbot:
apt-get install certbot
Generate the Certificate:
certbot certonly --standalone --post-hook "sh /root/ssl.sh" --agree-tos --email {EMAIL} -d {DOMAIN}