Skip to content

Commit

Permalink
Docs: Clarify standalone dns01 API configuration structure with examp…
Browse files Browse the repository at this point in the history
…le (#1155)

* adding additional documentation detail for standalone DNS-01 verification

* added example

* Update Standalone-certificates.md

* minor mistake

* Update Standalone-certificates.md

* Update Standalone-certificates.md
  • Loading branch information
stuartbirrell authored Sep 27, 2024
1 parent 044f056 commit 904b5e3
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion docs/Standalone-certificates.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,51 @@ LETSENCRYPT_app_HOST=('myapp.yourdomain.tld' 'myapp.yourotherdomain.tld' 'servic
LETSENCRYPT_othersite_HOST=('yetanotherdomain.tld')
```

**Example using DNS-01 verification:**

In this example: `web` and `app` generate a certificate using the global/default configuration. However `othersite` will perform it's certificate verification using a specific DNS-01 API configuration.

```bash
LETSENCRYPT_STANDALONE_CERTS=('web' 'app' 'othersite')
LETSENCRYPT_web_HOST=('yourdomain.tld' 'www.yourdomain.tld')
LETSENCRYPT_app_HOST=('myapp.yourdomain.tld' 'myapp.yourotherdomain.tld' 'service.yourotherdomain.tld')
LETSENCRYPT_othersite_HOST=('yetanotherdomain.tld')

ACME_othersite_CHALLENGE=DNS-01
declare -A ACMESH_othersite_DNS_API_CONFIG=(
['DNS_API']='dns_cf'
['CF_Token']='<CLOUDFLARE_TOKEN>'
['CF_Account_ID']='<CLOUDFLARE_ACCOUNT_ID>'
['CF_Zone_ID']='<CLOUDFLARE_ZONE_ID>'
)
```

### Optional configuration parameters:

Those are all single bash variables.
Single bash variables:

`LETSENCRYPT_uniqueidentifier_EMAIL` : must be a valid email and will be used by Let's Encrypt to warn you of impeding certificate expiration (should the automated renewal fail).

`LETSENCRYPT_uniqueidentifier_KEYSIZE` : determines the size of the requested private key. See [private key size](./Let's-Encrypt-and-ACME.md#private-key-size) for accepted values.

`LETSENCRYPT_uniqueidentifier_TEST` : if set to true, the corresponding certificate will be a test certificates: it won't have the 5 certs/week/domain limits and will be signed by an untrusted intermediate (ie it won't be trusted by browsers).

DNS-01 related variables:

`ACME_uniqueidentifier_CHALLENGE`: Defaults to HTTP-01. In order to switch to the DNS-01 ACME challenge set it to `DNS-01`

`ACMESH_uniqueidentifier_DNS_API_CONFIG`: Defaults to the values of DNS_API_CONFIG. However if you wish to specify a specific DNS-01 verification method on a particular standalone certificate. It must be defined as a bash associative array.

Example
```bash
declare -A ACMESH_alt_DNS_API_CONFIG=(
['DNS_API']='dns_cf'
['CF_Token']='<CLOUDFLARE_TOKEN>'
['CF_Account_ID']='<CLOUDFLARE_ACCOUNT_ID>'
['CF_Zone_ID']='<CLOUDFLARE_ZONE_ID>'
)
```

### Picking up changes to letsencrypt_user_data

The container does not actively watch the `/app/letsencrypt_user_data` file for changes.
Expand Down

0 comments on commit 904b5e3

Please sign in to comment.