Skip to content

Instantly share code, notes, and snippets.

@lichti
Last active September 12, 2022 20:14
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save lichti/facf6e51c047cc01af1428bc85739ab9 to your computer and use it in GitHub Desktop.
Save lichti/facf6e51c047cc01af1428bc85739ab9 to your computer and use it in GitHub Desktop.
Proxmox with letsencrypt ssl
git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
  --standalone \
  --email meu-email@gmail.com \
  -d xxx.com.br
cat << EOF > /root/letsencrypt.sh
#!/bin/bash
certbot renew --no-self-upgrade 
mv /etc/pve/local/pve-ssl.pem /root/
mv /etc/pve/local/pve-ssl.key /root/
mv /etc/pve/pve-root-ca.pem /root/
cp /etc/letsencrypt/live/pve01.lichti.com.br/fullchain.pem /etc/pve/local/pve-ssl.pem  
cp /etc/letsencrypt/live/pve01.lichti.com.br/privkey.pem /etc/pve/local/pve-ssl.key  
cp /etc/letsencrypt/live/pve01.lichti.com.br/chain.pem /etc/pve/pve-root-ca.pem  
service pveproxy restart  
service pvedaemon restart  
EOF
chmod +x /root/letsencrypt.sh
echo '@daily /root/letsencrypt.sh' > /etc/cron.d/letsencrypt
/root/letsencrypt.sh
@janvanveldhuizen
Copy link

janvanveldhuizen commented Nov 7, 2020

Hi, I am obviously missing something...
I am trying to use certbot for my proxmox server, but it keeps saying that the challenge failed for my domain: hefty.village.papasmurf.nl
In the public DNS I have an A record for *.village.papasmurf.nl pointing to my home router.
I can perfectly browse to https://hefty.village.papasmurf.nl, because I have port forward from 443 to 8006 on the ip address of my proxmox box.
I added hefty.village.papasmurf.nl explicitly with its own A record, but in the meantime I can't proceed because of rate-limit messages...

My home network uses village.papasmurf.nl as local domain name, so the server name corresponds perfectly with the DNS.

@jaskolowski
Copy link

Hello,
just to say that for pve 6.3.2, debian /buster the script ain`t work any more:
Skipping bootstrap because certbot-auto is deprecated on this system.
Your system is not supported by certbot-auto anymore.
Certbot cannot be installed.

@meyerje
Copy link

meyerje commented Feb 1, 2021

Hello,
just to say that for pve 6.3.2, debian /buster the script ain`t work any more:
Skipping bootstrap because certbot-auto is deprecated on this system.
Your system is not supported by certbot-auto anymore.
Certbot cannot be installed.

https://certbot.eff.org/lets-encrypt/debianbuster-other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment