Forrest logo
back to the certbot tool

certbot:tldr:fa29e

certbot: Obtain a new certificate via webroot authorization, but do not install it automatically.
$ sudo certbot certonly --webroot --webroot-path ${path-to-webroot} --domain ${subdomain-example-com}
try on your machine

This command is used to obtain a SSL/TLS certificate for a specific subdomain using Certbot, a free and open-source software tool designed for automatically managing SSL/TLS certificates.

Here's a breakdown of the command and its options:

  • sudo: It runs the command with administrative privileges (root access), which is often required to modify certain system settings and files.

  • certbot: This is the actual Certbot command-line utility.

  • certonly: It specifies that the intention is to only obtain the certificate and not carry out any installation or renewal.

  • --webroot: It is a Certbot plugin that performs the domain validation by placing a temporary file in the specified webroot directory.

  • --webroot-path ${path-to-webroot}: It denotes the web root directory for the subdomain in question. You need to replace ${path-to-webroot} with the actual path to the webroot directory.

  • --domain ${subdomain-example-com}: It specifies the subdomain for which the SSL/TLS certificate is being obtained. You need to replace ${subdomain-example-com} with the actual subdomain.

Overall, this command tells Certbot to generate a SSL/TLS certificate for the specified subdomain by performing domain validation using the webroot method and the provided webroot path.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the certbot tool