Several certs from two different issuers on the same server. Credentials (server, eab-kid and eab-hmac-key) to both issuers are written in /etc/letsencrypt/cli.ini. The credentials to the issuer that has the fewest certificates are commented out. When the renewal time comes, I am supposed to uncomment them, and comment out the others, and run the renewal once again just for that other issuer.
What I want
I think there should be a better way. For example, is it possible to have all the information required for the renewal of a given certificate stored somewhere with it, so that it gets picked up by certbot automatically? This way there's no need to pass the credentials via the arguments or cli.ini.
(I looked at /etc/letsencrypt/renewal/example.com.conf, and I can see the account ID under the renewalparams section. When I go to the matching account folder, I can see the meta, private_key and regr files. Can them combined act as credentials if I simply remove the server, eab-kid and eab-hmac-key from cli.ini?)
This is definitely true. And depending on the provider (Google and ZeroSSL in particular), the EAB credentials used to register an account may only be usable to register a single new account. Of the free ACME CAs that use EAB, I think only SSL.com allows you to reuse EAB creds.
While it's not good to change variables in these files, you can have multiple config files:
Create multiple cli.ini files, and invoke Certbot with --config /path/to/cli.ini or -c /path/to/ini
Certbot supports using --config-dir to change the default location from /etc/letsencrypt to something else (e.g. /etc/letsencypt-alt). That allows you to use the same binary/installation but on a completely different directory structure.
With either of those options, you can manage multiple cli.ini config files and minimize the options passed on the commandline to simply --config or --config-dir. When doing automated renewals, you just have a dedicated cron (or other scheduler) entry for each configuration.
Because of the way things are automated on my server, I can't make these command line customisations, not easily. Simply speaking, right now I have CRON call certbot renew and that's it. So is there a way to have the required config value (only the server value, apparently) picked up automatically? I can see it in regr.json inside the account folder that is linked to from within the renewal conf. Will that be picked up?
If you're mixing multiple cli.ini files and you DON'T specify any --config or --config-dir options when renewing, this can only lead to many issues, as cli.ini values are overriding the renewal configuration files, as far as I know. And if renewals are working with just a single cli.ini files, for most it won't be the correct one.
The server option is stored in the renewal configuration file. But if an incorrect cli.ini is used, it could be overridden by cli.ini and thus be incorrect.
I'd like to urge you VERY strongly to reconsider your current setup..