Update SSL options for all existing accounts

So as you know, SSL always seem to expire on their own or a few certs get dropped at renewal. To resolve this I’ve moved all websites onto Cloudflare so they can manage the SSL renewal process for me. (I give up :stuck_out_tongue: )

The final step is to change two options:

  1. Perform IP validation prior to certificate request.
  2. Enable strict tolerance. Certificates may not drop a hostname during renewal or issuance due to DNS or unreachability.

How can I modify them for all existing sites / accounts? If you could provide cli command that would be great!

Use a collection to enumerate over each site (or just script in bash for * in site*; do ... ; done):

cpcmd -o json admin:collect | jq -r 'keys[]' | while read SITE ; do 
    echo $SITE
    cpcmd -d $SITE common:set-preference letsencrypt.verifyip false
    cpcmd -d $SITE common:set-preference letsencrypt.sensitivity false
done

Preference reference

Be sure to alter the defaults in config.ini as well, [letsencrypt] => verify_ip + [letsencrypt] => strict_mode.

Thank you so very much