Caddy
Common parts of every card (states, backoff, Unit and ExecReload, Test config, manual commands) are described in Monitor window.
| Detected by | systemd units caddy, caddy-api or binaries caddy |
| Read every | 60 s while the Monitor window shows the tab |
| Active probe | yes, off by default |
| Test config | on demand |
What the card reads and shows
Section titled “What the card reads and shows”Caddy: sites with their addresses, root, file_server, reverse_proxy / php_fastcgi upstreams, redir and tls; the global options that matter for certificates and the admin endpoint; the certificates Caddy obtained (expiry); the version; and, with the active probe, the state of the upstreams from the admin API.
Passive: on the host the probe finds the running caddy process (/proc/<pid>/comm, its real and effective uid from status, the same PID namespace, its trusted exe; only --config, --adapter, --resume and the subcommand of its argv are used), runs caddy version of a trusted binary (with the active probe only) and reads the Caddyfile itself: caddy/reader.sh follows import, caddy/filter.awk prints only listed directives with filtered fields. JSON configurations (caddy.json, --resume autosave) are not read at all: they hold every secret. caddy adapt is never run (it expands {$ENV}); caddy validate only on demand (Test config). Certificates: only *.crt in Caddy’s storage, openssl x509 -enddate.
Active (off by default): GET /reverse_proxy/upstreams of the admin API, only over a unix socket (admin unix//…) whose path is owned by root, the caddy account or the session’s and not writable by others (a TCP port such as localhost:2019 cannot be told apart from another program’s); never GET /config/ (DNS tokens, basic_auth hashes).
Card layout
Section titled “Card layout”- Caddy
with the binary path, and Processes used: N. When the binary was not run: Version not read: KryoDesk did not run (…) in orange (trusted binaries). - Configuration: the file and where it came from: –config of the running caddy process,
–config of the systemd unit’s ExecStart (no running process with –config) or
default path (no process or unit with –config); the format and
--adapter. - Problems while reading the Caddyfile (N) in orange, each tagged cannot read, missing, not read fully, not understood or reader message. They come from KryoDesk’s own reader, not from Caddy; Caddy’s verdict is Test config.
Sites table (first sites only; the count says how many exist):
| Column | Content |
|---|---|
| Addresses | Site addresses; click to expand the site’s root, file_server, reverse_proxy (proxy → … with lb_policy), php_fastcgi (PHP FastCGI → …) and redir (redir → target (code)), each with its matcher or handle scope. |
| Serves | The main handler: a proxy, else a redirect, else a root; (+N more). ⚠ N upstream(s) with failures in orange when the admin API reports fails > 0. |
| TLS | The site’s tls directive, or no tls directive. |
| File | file:line of the site block. |
Global options: admin (localhost:2019 (default; the CADDY_ADMIN environment variable of the
process can change it)), http_port, https_port, auto_https, local_certs,
skip_install_trust, acme_ca, default_sni; a storage module is noted (its certificates may
not be in the default storage).
Certificates in Caddy’s storage: each storage folder as read, does not exist, no certificates directory or, in orange, no access for this account (Caddy’s storage is usually 0700 of the caddy user); then a table Name, Validity, Issuer. Validity colours:
| Text | Colour |
|---|---|
N days left (<date>) |
normal |
expires in N days (<date>) |
orange, under 14 days |
EXPIRED N days ago (<date>) |
red |
cannot read: <error> |
orange |
Upstreams (admin API) with the active probe: asked the admin API at
Active probe
Section titled “Active probe”Runs: GET /reverse_proxy/upstreams of Caddy’s admin API with curl (curl -q –noproxy ‘*’ –max-time 5, clean environment, under timeout), only when the global option admin is a unix socket (unix//…) whose path is owned by root, the caddy account or yours and not writable by others; only address, num_requests and fails leave the host. Never GET /config/ (it holds DNS tokens and basic_auth hashes). A TCP admin address (the default localhost:2019) is not asked: KryoDesk cannot tell it is Caddy. Every 60 s while the Monitor is open
Traces on the host: Caddy logs each admin request (“admin.api received request”, INFO) in its log or the journal; nothing else
Test config
Section titled “Test config”What it does, as the card says: adapts the configuration to JSON and provisions every module as a start would, without starting the servers: reads every imported file and certificate, expands {$ENV} placeholders from the session’s environment, resolves names, may create Caddy’s data and configuration directories (~/.local/share/caddy, ~/.config/caddy) of the account that runs it; provisions logging (may create or open the files of log { output file … } as that account, as root under sudo), the PKI of tls internal / local_certs (may create a root CA in the storage), health checks (may send requests to upstreams) and third-party modules (their own provisioning); does not touch the running Caddy.