I’d previously operated under the assumption that the certs and keys themselves wouldn’t be portable, but looking at one of my instances that was around during the v2 update, they look the same (including folder structure).
The only difference appears to be the
.json file. With ACME v1, the contents are:
Whereas for ACME v2, Caddy keeps this in the
It would be incorrect to adapt the JSON because it is describing the existing certificate. I don’t know whether that will impede the certs’ usage if you simply rename the containing folder to
acme-v02.api.letsencrypt.org, but if not, I expect Caddy will work as you’ve proposed. It deserves some testing.
Something should be done about the
acme-v02.api.letsencrypt.org/users folder, though; the new endpoint requires a new user registration. Possibly deleting this folder and having Caddy recreate it will suffice.