Skip to content

Commit afa60ae

Browse files
committed
Document how to use different Pebble domain (#160)
1 parent e589b16 commit afa60ae

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/doc/docs/ca/pebble.md

+19
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,22 @@ This ACME provider can be used to connect to a local Pebble server instance, mai
1212
* `acme://pebble/pebble.example.com:12345` - Connect to a Pebble server at `pebble.example.com` and port 12345.
1313

1414
Pebble uses a self-signed certificate for HTTPS connections. The Pebble provider accepts this certificate.
15+
16+
## Different Host Name
17+
18+
The Pebble server provides an end-entity certificate for the `localhost` and `pebble` domain.
19+
20+
If your Pebble server can be reached at a different domain (like `pebble.example.com` above), you need to create a correct end-entity certificate on your Pebble server. [See here](https://github.com/letsencrypt/pebble/tree/main/test/certs) for how to use `minica` to create a matching certificate.
21+
22+
Otherwise you will get an `AcmeNetworkException: Network error` that is caused by a `java.io.IOException: No subject alternative DNS name matching [...] found` when trying to access the Pebble server.
23+
24+
If you cannot create a correct end-entity certificate on your Pebble server, you could also disable host name verification on Java side: `-Djdk.internal.httpclient.disableHostnameVerification`
25+
26+
!!! warning
27+
**Disable hostname verification for testing purposes only, never in a production environment!** Create a correct end-entity certificate whenever possible.
28+
29+
## Custom CA Certificate
30+
31+
Pebble provides a default CA certificate, which can be found at `test/certs/pebble.minica.pem` of the Pebble server. This default CA is integrated into _acme4j_'s Pebble provider, and is automatically accepted.
32+
33+
If you run a Pebble instance with a custom `pebble.minica.pem`, copy your PEM file as a resource to your project (either in the `src/test/resources` or `src/test/resources/META-INF` folder).

0 commit comments

Comments
 (0)