Skip to content

Feature request: expose version/build info via admin API endpoint #8044

Description

@zackwag

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 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:

  • Security: requires Docker socket access, which grants broad privileges beyond what's needed
  • Portability: doesn't work easily in Kubernetes, Podman, or bare-metal deployments
  • Complexity: requires configuring container names and socket permissions

What would you like to see?

A lightweight admin API endpoint (e.g. GET /info or GET /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.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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussion 💬The right solution needs to be found

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions