# caddyserver/certmagic

Automatic HTTPS for any Go program: fully-managed TLS certificate issuance and renewal

Repository: https://github.com/caddyserver/certmagic
Canonical: https://ross.abutalabs.com/products/certmagic
Homepage: https://pkg.go.dev/github.com/caddyserver/certmagic?tab=doc
Language: Go
License: Apache-2.0
License Family: permissive
Topics: https, acme, letsencrypt, golang, go, automatic-https, tls, tls-certificate
Last push: 2026-08-21T20:05:27+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 71, longevity 100
- inputs: {"age_days": 2823, "days_push": 12, "days_rel": 114, "gap_med": 68.5, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5588, forks 351 (observed 2026-08-28T04:09:22.645084+00:00)

## What it is
CertMagic is a Go library that provides fully-managed automatic HTTPS, handling TLS certificate issuance, renewal, and OCSP stapling via ACME (Let's Encrypt). It is the same library that powers the Caddy web server's automatic HTTPS features.

## Use cases
- serve a Go HTTP handler over HTTPS with automatic certificates
- obtain and renew Let's Encrypt certificates programmatically in Go
- get a tls.Config with managed certificates for a custom TLS listener
- issue wildcard certificates via DNS challenge
- manage certificates across a cluster or behind a load balancer
- add one-line HTTPS with HTTP-to-HTTPS redirects to a Go app

## When to choose
- you write Go servers and want zero-touch TLS certificate management
- you need a mature, full-featured ACME client library for Go
- you want Caddy's automatic HTTPS behavior embedded in your own application
- you need wildcard certs, OCSP stapling, or distributed certificate storage

## When to avoid
- you are not writing Go
- you terminate TLS at a reverse proxy or load balancer and don't need certs in the app
- you need certificates for non-ACME CAs or manual certificate workflows only

## Facets
- artifact type: library
- maturity: stable
- function: security, http-server, middleware
- domain: security, web-development, backend, networking
- platform: go, cross-platform, windows
- tags: acme, letsencrypt, tls, https, certificate-management, certificate-renewal, ocsp-stapling, linux, macos

## Member repositories
- caddyserver/certmagic (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:22.645084+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:55:31.695363+00:00, confidence not recorded.
  - readme: https://github.com/caddyserver/certmagic (fetched 2026-08-28T04:09:22.645084+00:00, sha e9624bb98c0c)
  - homepage: https://pkg.go.dev/github.com/caddyserver/certmagic?tab=doc (fetched 2026-08-29T08:50:28.031540+00:00, sha f01e1903ee3a)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T08:50:28.038474+00:00, sha 757852027879)
  - site_page: https://go.dev/project (fetched 2026-08-29T08:50:28.040737+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
