This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
certbot [2020-10-13 22:17:59] mi |
certbot [2026-06-02 19:00:58] (current) mi [Add host to existing certificate] |
||
|---|---|---|---|
| Line 190: | Line 190: | ||
| * [[https://github.com/certbot/certbot/pull/6007|WIP commit of adding a --source-address flag. by signop · Pull Request #6007 · certbot/certbot]] | * [[https://github.com/certbot/certbot/pull/6007|WIP commit of adding a --source-address flag. by signop · Pull Request #6007 · certbot/certbot]] | ||
| - | == Add host to existing certificate | + | == Add or remove host in existing certificate |
| - | View existing cert. | + | View existing cert. (Lists certificate name, serial, domains, dates, ...) |
| certbot certificates | certbot certificates | ||
| - | Copy all hosts in existing cert. into comma-separated list, and add the new host. Then: | + | Copy the certificate name and domains, and use a comma-separated list of domains with added or removed domains. Then: |
| - | certbot --expand -d main.example.com,other.example.com,new.example.com | + | certbot certonly --cert-name name.example.com -d name.example.com,othername.example.com,etc.example.com,name2.otherdomain.com,etc.otherdomain.com |
| + | |||
| + | |||
| + | (Found on [[https://eff-certbot.readthedocs.io/en/latest/using.html#changing-a-certificate-s-domains]], [[https://serverfault.com/questions/974393/|Let's encrypt: Remove only one hostname from certificate]], [[https://superuser.com/questions/1432541|How to add a domain to existing certificate generated by Let’s Encrypt/Certbot?]]) | ||
| - | (Found on [[https://superuser.com/questions/1432541|How to add a domain to existing certificate generated by Let’s Encrypt/Certbot?]]) | ||
| == Configs | == Configs | ||
| Line 291: | Line 293: | ||
| m=$(( RANDOM % 60 )); h=$(( RANDOM % 24 )); d=$(( RANDOM % 7 )) | m=$(( RANDOM % 60 )); h=$(( RANDOM % 24 )); d=$(( RANDOM % 7 )) | ||
| - | echo "## Let's Encrypt SSL certificate renewal with certbot" | tee -a /etc/crontab | + | echo "## Let's Encrypt SSL cert. renewal, once per week" | tee -a /etc/crontab |
| - | echo "$m $h * * $d root /usr/bin/certbot -q renew" | tee -a /etc/crontab | + | echo "$m $h * * $d root /usr/bin/certbot -q renew" | tee -a /etc/crontab |
| - | # or | + | |
| - | echo "$m $h * * $d root certbot-auto -q renew" | tee -a /etc/crontab | + | |
| # dom=$(( 1+ RANDOM % 31 )) mon=$(( 1+ RANDOM % 12 )) | # dom=$(( 1+ RANDOM % 31 )) mon=$(( 1+ RANDOM % 12 )) | ||