Define path from certificate using webroot ( automatic generate)

Hello, i’ve been using a automatic certificate generate with this command:

certbot certonly --webroot -w C:\path_to_challenge -d domain

So, it works fine, but i want to define where the certificate is generated but it always generate to default path from certbot in Windowns: C:\Certbot

I want to change this and include to another directory, so i try it:

certbot certonly --webroot -w C:\path_to_challenge --config-dir C:\project\certificate -d domain

But when i set --config-dir it makes webroot have some steps that haven’t before. I need the process automatic to generate first time. How can i do that?

Note: I would like to see the response from cmd but dont want write anything.

System Operational : Windowns 10
Using cmd.


Are you trying to specific the directory where certbot output the certificates? If this is the case, it’s not possible to change. You can create symmetry links to link the certificate file to wherever you desired, but it’s not possible to output the certificates to directory other than the default one.

Thank you

Yes, the directory that is generated the certificates.

Well, this answer show it possible(Force certbot-auto to generate certificate at a custom path instead of /etc/letsencrypt/live)

But possible with certbot-auto, no certibot webroot with no steps.

I think that’s might only work with certbot-auto…
Ping @schoen for confirmation.

1 Like

certbot and certbot-auto run the same software with the same options and features. All documentation that refers to one should also work with the other one.

The difference between the two is not in how you can use them but in how you install them; certbot-auto is a script that you download outside of your operating system’s software package manager, while certbot is the command that you run when you install Certbot using your operating system’s official software distribution channels (or sometimes a related mechanism like a PPA).

Certbot does let you choose where certificates are saved using --config-dir. In that case, you must also specify that when running Certbot again in the future (for example with certbot renew).

Yes, it works in renew using:
certbot certonly --webroot -d --config-dir C:\project\certificate --force-renewal

But when i try to use it in first generate:

certbot certonly --webroot -w C:\path_to_challenge --config-dir C:\project\certificate -d domain

It ask me to accept some terms and insert the email, same if i use:


it ask me again to other things. I just want to generate accepting all terms without stop to write something.


That makes sense. Each individual question that you get asked during the initial certificate creation has a corresponding command line option to answer it. For example, you can use --agree-tos and --no-eff-email in order not to be asked about the Let’s Encrypt terms of service or about getting e-mail from EFF.


Thanks @schoen

final command that works for me:

certbot certonly --webroot -w C:\path_challenge --config-dir C:\project\path_certificate --agree-tos --no-eff-email -d

Note that this assumed that you had an account already registered; if you’re starting absolutely from the beginning (without ever having registered an account), there are additional options that you would want to provide in order to avoid any interactivity. On the other hand, the account registration is normally a one-time process per computer that uses Let’s Encrypt services, so avoiding interactivity may not be so important for that.

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