Skip to content

Commit

Permalink
Merge pull request quarkusio#43070 from cescoffier/lets-encrypt-port-80
Browse files Browse the repository at this point in the history
Add a note about let's encrypt challenge requiring the port 80 to be accessible
  • Loading branch information
sberyozkin authored Sep 9, 2024
2 parents 65eb49e + 2871848 commit fa483ae
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/src/main/asciidoc/tls-registry-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ This guide is maintained in the main Quarkus repository
and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
[id="tls-registry-reference"]
= TLS registry reference
include::_attributes.adoc[]
:categories: network
:categories: web
:summary: TLS registry configuration and usage
:numbered:
:sectnums:
Expand Down Expand Up @@ -1180,6 +1181,27 @@ quarkus.tls.lets-encrypt.enabled=true
quarkus.management.enabled=true
----

[IMPORTANT]
====
.Port 80
The Let's Encrypt ACME challenge requires that the application is reachable on port `80` (basically: `http://your-dns-name`).
Ensure the port `80` is accessible from the Internet.
It might require an explicit security policy depending on your hosting provider.
We also recommend setting `quarkus.http.insecure-requests` to `redirect` to redirect all HTTP requests to HTTPS.
The ACME challenge accepts self-signed certificates and up to 10 redirections:
[source, properties]
----
quarkus.tls.lets-encrypt.enabled=true
quarkus.management.enabled=true
quarkus.http.insecure-requests=redirect
----
====

[[lets-encrypt-prepare]]

The challenge is served from the primary HTTP interface (accessible from your DNS domain name).

IMPORTANT: Do not start your application yet.
Expand Down Expand Up @@ -1305,5 +1327,6 @@ Now, because ngrok only forwards ACME challenges over HTTP, start ngrok as follo
ngrok http --domain <YOUR-NGROK-DOMAIN> 8080 --scheme http <1>
----
<1> `8080` is the localhost HTTP port your application is listening on.
Note that the application will be accessible from `http://YOUR-NGROK-DOMAIN` on port `80` but redirected to your local machine on port `8080`.

You can now test the Quarkus Let's Encrypt ACME feature from your local machine.

0 comments on commit fa483ae

Please sign in to comment.