# Certbot: error: unrecognized arguments

**URL:** <https://community.letsencrypt.org/t/certbot-error-unrecognized-arguments/166324>\
**Category:** Help\
**Created:** [November 25, 2021, 6:23am UTC](https://community.letsencrypt.org/t/certbot-error-unrecognized-arguments/166324 "2021-11-25T06:23:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yellowboi](https://avatars.discourse-cdn.com/v4/letter/y/e9a140/32.png) [@yellowboi](https://community.letsencrypt.org/u/yellowboi)\
**Post date:** [November 25, 2021, 6:23am UTC](https://community.letsencrypt.org/t/certbot-error-unrecognized-arguments/166324/1 "2021-11-25T06:23:10Z")

</div>

Hello, I tried generating a ssl certificate using certbot and node and while doing so I got this long error message. I tried the exact commands from this guide [Generate Wildcard SSL certificate using Let’s Encrypt/Certbot | by Saurabh Palande | Medium](https://medium.com/@saurabh6790/generate-wildcard-ssl-certificate-using-lets-encrypt-certbot-273e432794d7)

what i didn't do was in the certbot-auto folder. Do I need to be in that folder to execute this command? moreover I couldn't find the certbot-auto folder after cloning the repo. I saw letsencrypt-auto-source. is that the new certbot-auto folder?

Here is the error message

```nohighlight
exec error: Error: Command failed: sudo certbot certonly --manual --preferred-challenges=dns --email johndoe@gmail.com --server https: //acme-v02.api.letsencrypt.org/directory --agree-tos -d example.com *.example.com
usage: 
  certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...

Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
it will attempt to use a webserver both for obtaining and installing the
certificate. 
certbot: error: unrecognized arguments: //acme-v02.api.letsencrypt.org/directory *.example.com

```

and this is my code in express using the exec command from child\_process in nodejs

```nohighlight
app.post("/test", (req, res) => {
  exec(
    `sudo certbot certonly --manual --preferred-challenges=dns --email ${req.body.email} --server https: //acme-v02.api.letsencrypt.org/directory --agree-tos -d ${req.body.domain} *.${req.body.domain}`,
    (error, stdout, stderr) => {
      if (error) {
        console.log(`exec error: ${error}`);
        return;
      }
      console.log(`stdout: ${stdout}`);
      console.log(`stderr: ${stderr}`);
    }
  );
  res.json("all okay");
});

```

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [November 25, 2021, 6:25am UTC](https://community.letsencrypt.org/t/certbot-error-unrecognized-arguments/166324/2 "2021-11-25T06:25:58Z")

</div>

> [@yellowboi](#):
>
> `exec error: Error: Command failed: sudo certbot certonly --manual --preferred-challenges=dns --email johndoe@gmail.com --server https: //acme-v02.api.letsencrypt.org/directory --agree-tos -d example.com *.example.com`

Hi @yellowboi,

Do you see that space in between `https:` and `//acme-v02.api.letsencrypt.org/directory` in your command line above? The space doesn't belong there; [https://acme-v02.api.letsencrypt.org/directory](https://acme-v02.api.letsencrypt.org/directory) is a single URL and should be entered with no spaces as part of the command.

Edit: two other things to keep in mind for the future:

(1) You've added the base domain (`example.com`) alongside the wildcard (`*.example.com`). This is a useful thing to do, but it will require an extra `-d` option, like `-d example.com -d *.example.com` instead of just `-d example.com *.example.com`.

(2) The method you're using with `--manual` will not be capable of automated renewal at all, so you'll have to repeat this process at least every 90 days (ideally sooner than that). If you're not OK with that, you might want to look into more automated options, which Let's Encrypt usually recommends. This can be less convenient for a wildcard certificate specifically, because it would normally require API access from your DNS provider.

---

<div class="post-metadata">

**Author:** ![yellowboi](https://avatars.discourse-cdn.com/v4/letter/y/e9a140/32.png) [@yellowboi](https://community.letsencrypt.org/u/yellowboi)\
**Post date:** [November 25, 2021, 6:59am UTC](https://community.letsencrypt.org/t/certbot-error-unrecognized-arguments/166324/3 "2021-11-25T06:59:59Z")

</div>

Thanks, solved the problem.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [December 25, 2021, 7:00am UTC](https://community.letsencrypt.org/t/certbot-error-unrecognized-arguments/166324/4 "2021-12-25T07:00:41Z")

</div>

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