Skip to content

Commit a18a8f0

Browse files
committed
Improve documentation for --preferred-challenges
1 parent a8b2880 commit a18a8f0

File tree

2 files changed

+36
-29
lines changed

2 files changed

+36
-29
lines changed

certbot/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ def prepare_and_parse_args(plugins, args, detect_defaults=False): # pylint: dis
794794
default=flag_default("tls_sni_01_port"),
795795
help=config_help("tls_sni_01_port"))
796796
helpful.add(
797-
["certonly", "renew", "run"], "--http-01-port", type=int,
797+
["certonly", "renew", "run", "manual"], "--http-01-port", type=int,
798798
dest="http01_port",
799799
default=flag_default("http01_port"), help=config_help("http01_port"))
800800
helpful.add(
@@ -848,13 +848,13 @@ def prepare_and_parse_args(plugins, args, detect_defaults=False): # pylint: dis
848848
help="Require that all configuration files are owned by the current "
849849
"user; only needed if your config is somewhere unsafe like /tmp/")
850850
helpful.add(
851-
["certonly", "renew", "run"], "--preferred-challenges",
851+
["manual", "certonly", "renew", "run"], "--preferred-challenges",
852852
dest="pref_challs", action=_PrefChallAction, default=[],
853853
help="A sorted, comma delimited list of the preferred challenge to "
854854
"use during authorization with the most preferred challenge "
855-
"listed first (e.g. tls-sni-01,http-01). If none of the "
856-
"preferred challenges can be used by the selected plugin to "
857-
"satisfy the CA, authorization is not attempted.")
855+
'listed first. Eg, "dns-01" or "tls-sni-01,http-01,dns-01").'
856+
' Not all plugins support all challenges. See '
857+
'https://certbot.eff.org/docs/using.html#plugins for details.')
858858
helpful.add(
859859
"renew", "--pre-hook",
860860
help="Command to be run in a shell before obtaining any certificates."

docs/using.rst

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ an alternate method fo install ``certbot``.
6060

6161
Certbot-Auto
6262
^^^^^^^^^^^^
63-
The ``certbot-auto`` wrapper script installs Certbot, obtaining some dependencies
63+
The ``certbot-auto`` wrapper script installs Certbot, obtaining some dependencies
6464
from your web server OS and putting others in a python virtual environment. You can
6565
download and run it as follows::
6666

@@ -77,8 +77,8 @@ download and run it as follows::
7777

7878
The ``certbot-auto`` command updates to the latest client release automatically.
7979
Since ``certbot-auto`` is a wrapper to ``certbot``, it accepts exactly
80-
the same command line flags and arguments. For more information, see
81-
`Certbot command-line options <https://certbot.eff.org/docs/using.html#command-line-options>`_.
80+
the same command line flags and arguments. For more information, see
81+
`Certbot command-line options <https://certbot.eff.org/docs/using.html#command-line-options>`_.
8282

8383
Running with Docker
8484
^^^^^^^^^^^^^^^^^^^
@@ -88,8 +88,8 @@ certificate. However, this mode of operation is unable to install
8888
certificates or configure your webserver, because our installer
8989
plugins cannot reach your webserver from inside the Docker container.
9090

91-
Most users should use the operating system packages (see instructions at
92-
certbot.eff.org_) or, as a fallback, ``certbot-auto``. You should only
91+
Most users should use the operating system packages (see instructions at
92+
certbot.eff.org_) or, as a fallback, ``certbot-auto``. You should only
9393
use Docker if you are sure you know what you are doing and have a
9494
good reason to do so.
9595

@@ -113,12 +113,12 @@ to, `install Docker`_, then issue the following command:
113113
quay.io/letsencrypt/letsencrypt:latest certonly
114114
115115
Running Certbot with the ``certonly`` command will obtain a certificate and place it in the directory
116-
``/etc/letsencrypt/live`` on your system. Because Certonly cannot install the certificate from
116+
``/etc/letsencrypt/live`` on your system. Because Certonly cannot install the certificate from
117117
within Docker, you must install the certificate manually according to the procedure
118118
recommended by the provider of your webserver.
119119

120-
For more information about the layout
121-
of the ``/etc/letsencrypt`` directory, see :ref:`where-certs`.
120+
For more information about the layout
121+
of the ``/etc/letsencrypt`` directory, see :ref:`where-certs`.
122122

123123
.. _Docker: https://docker.com
124124
.. _`install Docker`: https://docs.docker.com/userguide/
@@ -242,8 +242,8 @@ whole process is described in the :doc:`contributing`.
242242

243243
.. _plugins:
244244

245-
Getting certificates
246-
====================
245+
Getting certificates (and chosing plugins)
246+
==========================================
247247

248248
The Certbot client supports a number of different "plugins" that can be
249249
used to obtain and/or install certificates.
@@ -252,34 +252,41 @@ Plugins that can obtain a cert are called "authenticators" and can be used with
252252
the "certonly" command. This will carry out the steps needed to validate that you
253253
control the domain(s) you are requesting a cert for, obtain a cert for the specified
254254
domain(s), and place it in the ``/etc/letsencrypt`` directory on your
255-
machine - without editing any of your server's configuration files to serve the
255+
machine - without editing any of your server's configuration files to serve the
256256
obtained certificate. If you specify multiple domains to authenticate, they will
257257
all be listed in a single certificate. To obtain multiple seperate certificates
258258
you will need to run Certbot multiple times.
259259

260-
Plugins that can install a cert are called "installers" and can be used with the
260+
Plugins that can install a cert are called "installers" and can be used with the
261261
"install" command. These plugins can modify your webserver's configuration to
262-
serve your website over HTTPS using certificates obtained by certbot.
262+
serve your website over HTTPS using certificates obtained by certbot.
263263

264264
Plugins that do both can be used with the "certbot run" command, which is the default
265265
when no command is specified. The "run" subcommand can also be used to specify
266266
a combination of distinct authenticator and installer plugins.
267267

268-
=========== ==== ==== ===============================================================
269-
Plugin Auth Inst Notes
270-
=========== ==== ==== ===============================================================
271-
apache_ Y Y Automates obtaining and installing a cert with Apache 2.4 on
268+
=========== ==== ==== =============================================================== =============================
269+
Plugin Auth Inst Notes Challenge types (and port)
270+
=========== ==== ==== =============================================================== =============================
271+
apache_ Y Y Automates obtaining and installing a cert with Apache 2.4 on ``tls-sni-01`` (443)
272272
Debian-based distributions with ``libaugeas0`` 1.0+.
273-
webroot_ Y N Obtains a cert by writing to the webroot directory of an
273+
webroot_ Y N Obtains a cert by writing to the webroot directory of an ``http-01`` (80)
274274
already running webserver.
275-
standalone_ Y N Uses a "standalone" webserver to obtain a cert. Requires
276-
port 80 or 443 to be available. This is useful on systems
275+
standalone_ Y N Uses a "standalone" webserver to obtain a cert. Requires ``http-01`` (80) or
276+
port 80 or 443 to be available. This is useful on systems ``tls-sni-01`` (443)
277277
with no webserver, or when direct integration with the local
278278
webserver is not supported or not desired.
279-
manual_ Y N Helps you obtain a cert by giving you instructions to perform
280-
domain validation yourself.
281-
nginx_ Y Y Very experimental and not included in certbot-auto_.
282-
=========== ==== ==== ===============================================================
279+
manual_ Y N Helps you obtain a cert by giving you instructions to perform ``http-01`` (80) or
280+
domain validation yourself. ``dns-01`` (53)
281+
nginx_ Y Y Very experimental and not included in certbot-auto_. ``tls-sni-01`` (443)
282+
=========== ==== ==== =============================================================== =============================
283+
284+
Under the hood, plugins use one of several "Challenge Types" to prove you control a domain.
285+
The options are ``http-01`` (which uses port 80), ``tls-sni-01`` (port 443) and ``dns-01``
286+
(requring configuration of a DNS server on port 53, thought that's often not
287+
the same machine as your webserver). A few plugins support more than one
288+
challenge type, in which case you can choose it with
289+
``--preferred-challenges``.
283290

284291
There are also many third-party-plugins_ available. Below we describe in more detail
285292
the circumstances in which each plugin can be used, and how to use it.

0 commit comments

Comments
 (0)