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
Third-party UIs and monitoring tools that interact with Caddy via its admin API currently have no way to query the running Caddy version programmatically through the API. The only way to get version info is by running caddy version on the CLI, which in containerized environments means shelling out via docker exec into the Caddy container.
For example, caddy-ui currently requires users to mount the Docker socket into its container and runs docker exec <caddy-container> caddy version to display the server version on the status page. This has downsides:
This information is already available internally via Go's runtime/debug.BuildInfo and caddy.Version — it just isn't exposed over the admin API.
Related
Consider caddy status command #7453 discusses a caddy status CLI command that would include version among other info — an admin API endpoint would complement that nicely, as the CLI command could consume it.
Why it's useful beyond our case
Any tool that communicates with Caddy over the admin API (dashboards, health checks, fleet management, Prometheus exporters) would benefit from being able to query version info without needing CLI access to the Caddy process.
What is the problem or use case?
Third-party UIs and monitoring tools that interact with Caddy via its admin API currently have no way to query the running Caddy version programmatically through the API. The only way to get version info is by running
caddy versionon the CLI, which in containerized environments means shelling out viadocker execinto the Caddy container.For example, caddy-ui currently requires users to mount the Docker socket into its container and runs
docker exec <caddy-container> caddy versionto display the server version on the status page. This has downsides:What would you like to see?
A lightweight admin API endpoint (e.g.
GET /infoorGET /version) that returns the Caddy version and build metadata. Something like:{ "version": "v2.11.3", "go_version": "go1.24.4", "os": "linux", "arch": "amd64" }This information is already available internally via Go's
runtime/debug.BuildInfoandcaddy.Version— it just isn't exposed over the admin API.Related
caddy statuscommand #7453 discusses acaddy statusCLI command that would include version among other info — an admin API endpoint would complement that nicely, as the CLI command could consume it.Why it's useful beyond our case
Any tool that communicates with Caddy over the admin API (dashboards, health checks, fleet management, Prometheus exporters) would benefit from being able to query version info without needing CLI access to the Caddy process.