How to update account certbot to acme.sh

hello there.

I want to update my account (certbot -> acme.sh)
I found some files but I don't know how to update.
Can you tell me the search keywords or link?

[my system]
Ubuntu 20.04 / I can login to a root. / certbot 0.40.0

[certbot 0.40.0]
ls /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/*/
meta.json private_key.json regr.json

[acme.sh]
ls /.acme.sh/ca/acme-v02.api.letsencrypt.org/directory/
account.json account.key ca.conf

I think @Neilpang mentioned acme.sh didn't support migration from certbot because account configuraions are in different formats (back in 2016). If you are not part of the ECC early access where you registered the account ID, it's better (and easier) to simply register a new account on Let's Encrypt using acme.sh.

I did investigate the structure of the two program, and hopefully the below text will provide some help if you insisted to proceed:

The structure are not equal. certbot generates three files: meta.json, private_key.json and regr.json. acme.sh typically use account.json, account.key and ca.conf. To get those in order, you'll need to spend much more effort.

The private_key.json under /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/${hash} is the combination of account.json and account.key. You'll need to find a way to convert that json into RSA private key and leave n, kty and e with account.json. Then merge the account.json with meta.json for the final account.json product.
Then, you'll need to copy the uri from regr.json into ca.conf as ACCOUNT_URL, and derive CA_KEY_HASH somewhere.

Good luck!

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.