Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: Any domain pointed to our server. I'm generating certificates for each domain inputs in our system.
I ran this command: certbot certonly --manual --manual-auth-hook ./authenticator.sh --manual-cleanup-hook ./cleanup.sh --agree-tos --manual-public-ip-logging-ok --config-dir ./.tmp/{hostname}/config --logs-dir ./.tmp/{hostname}/logs --work-dir ./.tmp/{hostname}/work -d {hostname} -m ${email} -n
It produced this output: It's working fine but eventually It will hit the "too many registrations for this IP address" limit.
My web server is (include version): Nodejs http. I'm using the manual mode.
The operating system my web server runs on is (include version): Debian GNU/Linux 10 (buster)
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 0.31.0
Running from within a container is one of the tricky scenarios we're often presented with here. The best way to handle accounts (and certificates) in this type of setup is to create the account(s) up front and import the credentials into the containers. The same applies to certificates for domain names that are being re-used.
I don't believe that you do. As long as you're using the same installation of certbot, the same account will be used for all executions. In essence, once you've created an account, strip away all the extra parameters for account creation and management from your command.
You might want a --preferred-challenges in there somewhere too.
The idea here is just to duplicate the credentials between the folders for each instance. That way you're not creating a new account. Consider it like making photocopies of an ID badge. The Let's Encrypt server doesn't care if you use the same account with 500 instances (as long as you're within the rate limits).
The global configuration file is really your friend here. You CAN specify your credentials in that file. This should save you the hassle of duplicating many things.
Running multiple instances of Certbot at the same time, against the same configuration directory, is unsafe.
Certbot uses a lockfile to prevent this scenario.
Some approaches you can use:
Serialize your use of Certbot so that only one copy of it is running at once. Put requests into a queue, and process the queue one at a time.
Run Certbot concurrently, but against different configuration directories (e.g. one per tenant). You could copy the accounts/ directory so that each instance of Certbot is still technically using the same ACME account.
(My recommendation): don't use Certbot at all if you are doing things programmatically. Find an ACME library for Node.js and obtain certificates using the API. Since you've already written the auth hooks, you've done the hard part. The rest is just some basic function calls.
Someone might have the same approach so I'll share what I did.
Created a main account: certbot register -m email@gmail.com --agree-tos -n
It will produce the account in /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/MAIN_ACCOUNT(its hashed)
Now you can freely copy and rename the MAIN_ACCOUNT anywhere in the host or in another machine.
Copied the MAIN_ACCOUNT in the root directory of our system/project and renamed it to certbot-account
Then attach --account /path/to/certbot-account on our certbot command certbot certonly --manual --manual-auth-hook ./authenticator.sh --manual-cleanup-hook ./cleanup.sh --agree-tos --manual-public-ip-logging-ok --config-dir ./.tmp/{hostname}/config --logs-dir ./.tmp/{hostname}/logs --work-dir ./.tmp/{hostname}/work -d {hostname} -m --account /path/to/certbot-account -n
This time it will not create a new account because you are pointing it to the certbot-account.
Note: I'm using certbot 0.40.0 --account /path/to/account may not work on lower versions because it doesn't recognize the path and you will encounter Account IDS mismatch. IDK