You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `CERTBOT_EMAIL` | Email for Let's Encrypt registration |
162
+
| `ACME_EMAIL` | *(optional)* ACME contact address, in either mode. `CERTBOT_EMAIL` is the historical name and still works. See below — it is optional, and published |
163
163
| `DNS_PROVIDER` | DNS provider (`cloudflare`, `linode`, `namecheap`) |
164
164
165
165
### Optional
@@ -169,9 +169,21 @@ environment:
169
169
| `PORT` | `443` | HAProxy listen port |
170
170
| `DOMAINS` | | Multiple domains, one per line |
171
171
| `ROUTING_MAP` | | Multi-domain routing: `domain=host:port`per line |
172
-
| `SET_CAA` | `false` | Enable CAA DNS record |
172
+
| `SET_CAA` | `false` | Enable CAA DNS record (dns-01 only; tls-alpn-01 cannot write DNS) |
173
173
| `TXT_PREFIX` | `_dstack-app-address` | DNS TXT record prefix |
174
-
| `CERTBOT_STAGING` | `false` | Use Let's Encrypt staging server |
174
+
| `ACME_STAGING` | `false` | Use Let's Encrypt staging, in either mode. `CERTBOT_STAGING` is the historical name and still works |
175
+
| `CHALLENGE_TYPE` | `dns-01` | `dns-01` (certbot + DNS credentials) or `tls-alpn-01` (lego, no DNS credentials) |
176
+
| `DNS_SETUP_MODE` | `wait` | tls-alpn-01 only: `wait`, `print` or `webhook` — see below |
177
+
| `DNS_SETUP_TIMEOUT` | `1800` | tls-alpn-01 only: seconds to wait for the records to appear |
178
+
| `DNS_SETUP_INTERVAL` | `15` | tls-alpn-01 only: seconds between DNS checks |
| `DNS_WEBHOOK_TOKEN` | | Shared secret; the payload is HMAC-SHA256 signed with it |
181
+
| `DOH_RESOLVERS` | Google + Cloudflare | Comma-separated DoH endpoints used to verify records |
182
+
| `TLSALPN_PORT` | `9443` | Loopback port lego's ACME responder binds to |
183
+
| `TLS_TERMINATE_PORT` | `9444` | Loopback port the TLS frontend moves to in tls-alpn-01 mode |
184
+
| `RENEW_DAYS_BEFORE` | client default | Days of remaining lifetime that trigger renewal. Applies to both modes: passed to lego as `--renew-days`, and written to certbot's `renew_before_expiry` |
@@ -266,3 +278,140 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
266
278
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
267
279
268
280
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
281
+
282
+
## Certificates without DNS credentials (tls-alpn-01)
283
+
284
+
The default `dns-01` flow needs a DNS API token inside the CVM: the container
285
+
creates the CNAME, TXT and CAA records itself. `CHALLENGE_TYPE=tls-alpn-01`
286
+
removes that requirement — nothing in the container can touch your DNS zone —
287
+
at the cost of you creating three records by hand (or via a webhook).
288
+
289
+
```yaml
290
+
services:
291
+
dstack-ingress:
292
+
image: dstacktee/dstack-ingress:<tag>
293
+
environment:
294
+
- CHALLENGE_TYPE=tls-alpn-01
295
+
- DOMAIN=app.example.com
296
+
- TARGET_ENDPOINT=http://app:80
297
+
# Printed as the CNAME target, and used to verify that the hostname
298
+
# really resolves to the gateway before issuance starts.
299
+
- GATEWAY_DOMAIN=_.dstack-prod5.phala.network
300
+
# - ACME_EMAIL=you@example.com # optional, and published (see below)
301
+
# - DNS_SETUP_MODE=wait # default; blocks until the records exist
302
+
ports:
303
+
- "443:443"
304
+
volumes:
305
+
- /var/run/dstack.sock:/var/run/dstack.sock
306
+
- cert-data:/etc/letsencrypt
307
+
- evidences:/evidences
308
+
```
309
+
310
+
On first start the container prints the exact records to create, then polls
0 commit comments