Commit 06944c5
Eric Bower
·
2026-08-10 16:58:05 -0400 EDT
parent 6450bca
fix(caddy): add postgres storage backend for distributed ACME challenges This updates the Caddy Dockerfile to compile with the `github.com/yroc92/postgres-storage` module and configures `Caddyfile.pgs` to use it via the existing `DATABASE_URL` environment variable. Previously, Caddy instances on independent nodes (e.g., US and EU) used their own local filesystem for ACME storage. This caused on-demand TLS to hang or time out for custom domains when Let's Encrypt's ACME verification challenge was randomly routed by DNS to a node that didn't initiate the request. By using a central Postgres database for storage, all Caddy nodes now share certificate state and can seamlessly answer ACME challenges initiated by any other node in the cluster.
2 files changed,
+5,
-1
+3,
-0
| ... | ... | @@ -1,4 +1,7 @@ | |
| 1 | 1 | { | |
| 2 | + | storage postgres { | |
| 3 | + | connection_string {$DATABASE_URL} | |
| 4 | + | } | |
| 2 | 5 | on_demand_tls { | |
| 3 | 6 | ask http://web:3000/check | |
| 4 | 7 | } |
+2,
-1