Skip to content

docs(tls): add Configure TLS with Caddy page, fix custom-cert paths and examples - #68

Open
DataBoyTX wants to merge 2 commits into
masterfrom
docs/fix-caddy-tls-config
Open

DataBoyTX wants to merge 2 commits into
masterfrom
docs/fix-caddy-tls-config

Conversation

@DataBoyTX

@DataBoyTX DataBoyTX commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a Configure TLS with Caddy page (docs/security/configure-tls-caddy.md, in the Security section next to the manual Let's Encrypt handshake page) and fixes Caddy TLS examples that do not work on current releases.

New page

Collects the Caddy material that lived in app-config/configure.md (a Visual Playbooks page) and adds what admins hit in practice:

  • Option chooser: automatic Let's Encrypt, custom certificates, manual handshake, or offload to a load balancer, with when to use each and how renewal works.
  • How Caddy is configured: where the Caddyfile and certificate folders are mounted in the container, caddy validate, and restarting with ./graphistry. Plain docker compose in the release folder uses a different project name and fails with port is already allocated.
  • Automatic TLS: requirements (DNS name, inbound 80/443 reachable by Let's Encrypt). For firewalls that only allow known addresses: the Timeout during connect symptom, the staging fallback, opening port 80 temporarily, renewal timing, and changing public IPs.
  • Custom certificates: PEM full chain, unencrypted key, domain in the SAN, /config paths, an OCSP note for offline networks, and renewal.
  • Redirect HTTP to HTTPS: domain, :80 { serves the whole app over plain HTTP to requests by IP. Adds a separate :80 block that keeps /caddy/health/ (used by the container health check) and redirects everything else.
  • Security headers, offloading, debugging: moved from configure.md, with a list of common symptoms added to debugging.

configure.md keeps the TLS intro and the application server cookie settings. The #tls, #tls-hardening and #caddy anchors stay, as pointers to the new page.

Fixes

  • Custom certs: the old doc used ./.caddy/ and /root/.caddy/..., Caddy v1 paths that current releases do not mount. On v2.53.6 the caddy container mounts data/config/Caddyfile, data/caddy/config (/config) and data/caddy/data (/data), so Caddy failed with "no such file". Now data/caddy/config/ and /config/..., matching the handshake page.
  • Automatic TLS sample: used tls { max_certs 100 } (Caddy v1; Caddy 2 rejects it: unknown subdirective: max_certs) on a wildcard name, which Let's Encrypt only issues through a DNS challenge. Replaced with a plain domain block.
  • Links: two links pointed to a nonexistent docs/configure.md#tls-hardening, and two to #application-servers, a level-4 heading that gets no anchor (myst_heading_anchors = 3). All now point to existing anchors.

Testing

  • Every Caddyfile example on the new page (automatic, custom certs with ocsp_stapling off and the :80 redirect block, security headers, trusted_proxies) passes caddy validate with Caddy 2.10.2.
  • sphinx-build -b html with sphinxdoc/sphinx:8.0.2 and graphistry[docs]: no warnings in the touched pages. The remaining warnings are pre-existing, in telemetry, SSO, debugging and scripts-reference. A script over the rendered HTML found 0 broken internal page or #anchor links on the five touched pages.
  • The /config mount was checked on a v2.53.6 install. If an older supported release mounted .caddy, a version note may be needed.

- Setup custom certs: certs go in data/caddy/config/, which the caddy
  container mounts as /config. The old ./.caddy and /root/.caddy paths
  date from Caddy v1 and are not mounted, so Caddy failed to start with
  "no such file". Matches the manual Let's Encrypt handshake doc. Adds
  PEM/full-chain/unencrypted-key requirements, restart command, and a
  renewal note.
- Setup free Automatic TLS: the sample used `tls { max_certs 100 }`, a
  Caddy v1 option that Caddy 2 rejects ("unknown subdirective:
  max_certs"), on a wildcard name, which Let's Encrypt only issues via a
  DNS challenge. Replaced with a plain FQDN site block and a note on
  wildcard names.
Moves the Caddy-specific TLS material out of app-config/configure.md
into docs/security/configure-tls-caddy.md, next to the manual Let's
Encrypt handshake page, and adds:

- an option chooser (automatic, custom certs, manual handshake, offload)
- where the Caddyfile and certificate folders are mounted, how to
  validate, and restarting with ./graphistry (plain docker compose uses
  a different project name and fails on port 80)
- automatic TLS requirements, firewalls that block Let's Encrypt
  validation (temporary port 80, renewal timing, staging fallback), and
  changing public IPs
- custom certificate requirements, OCSP note for offline networks
- HTTP to HTTPS: why `domain, :80` serves the app over plain HTTP by IP,
  and a :80 block that keeps the health check
- common symptoms in Debugging TLS

configure.md keeps the TLS intro and application server cookie settings,
with the #tls / #tls-hardening / #caddy anchors kept as pointers. Fixes
links that targeted the nonexistent docs/configure.md#tls-hardening and
the unanchored (level 4) #application-servers heading.
@DataBoyTX DataBoyTX changed the title docs(tls): fix Caddy custom-cert paths and automatic TLS example docs(tls): add Configure TLS with Caddy page, fix custom-cert paths and examples Oct 16, 2026
@DataBoyTX DataBoyTX self-assigned this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant