talira

ACME client and library for Let's Encrypt and other ACME CAs written in Go

open sourceMITself-hostablefree

lego is an ACME client and Go library that obtains, renews and revokes TLS certificates from Let's Encrypt (its default) or any RFC 8555 certificate authority, with short codes for others such as ZeroSSL, Google Trust Services, Sectigo, SSL.com, GlobalSign and DigiCert. It's a single static binary that answers HTTP-01 with its own web server or through a webroot, TLS-ALPN-01, DNS-01 through more than 200 built-in DNS provider integrations, and the new DNS-PERSIST-01, and it supports IP address certificates, ACME Renewal Information, certificate profiles and existing CSRs. The v5 command line manages many certificates, accounts and CAs from a .lego.yml file, obtains and renews with one run command, and runs pre, deploy and post hooks. As a library it lets Go programs request certificates and plug in their own challenge solvers. It's MIT-licensed, maintained by the go-acme project, and installed from release binaries for Linux, macOS, Windows and the BSDs, the goacme/lego Docker image, a snap or go install.

Ways to install

App stores

Package managers

Problems it solves

  • get Let's Encrypt certificates from a single static binary on servers where I can't install Python or other runtimes
  • get a wildcard certificate through DNS validation with a less common DNS provider that other tools don't support
  • add certificate issuance from Let's Encrypt to my Go program as a library instead of shelling out
  • plug my own challenge solver into a Go ACME library so my service can prove domain control its own way
  • manage many certificates, ACME accounts and certificate authorities from one config file instead of long command lines
  • obtain certificates inside a Docker container or CI job with DNS provider credentials passed as environment variables
  • get a TLS certificate for an IP address from an ACME certificate authority
  • renew when the CA suggests through ACME renewal information instead of on a fixed schedule
  • validate a domain once with a persistent DNS TXT record instead of updating DNS on every renewal
  • switch from Let's Encrypt to ZeroSSL, Google Trust Services or a commercial ACME CA without changing tools
  • sign an existing certificate signing request through ACME instead of letting the client create the key
  • reload nginx or copy files to other machines after each successful certificate renewal
  • a certificate client that runs the same way on Linux, FreeBSD, OpenBSD, macOS and Windows
  • get certificates on a server where port 80 is taken, by answering the challenge over TLS on port 443

Features

  • ACME v2 (RFC 8555) client and Go library
  • HTTP-01 with a built-in web server or a webroot, DNS-01, TLS-ALPN-01 (RFC 8737) and DNS-PERSIST-01 challenges
  • more than 200 DNS provider integrations, including Route 53, Cloudflare, Akamai EdgeDNS and Alibaba Cloud DNS
  • IP address certificates (RFC 8738)
  • ACME Renewal Information (RFC 9773) and certificate profiles
  • short codes for ACME CAs: Let's Encrypt (default), ZeroSSL, Google Trust Services, Sectigo DV/OV/EV, SSL.com, GlobalSign, DigiCert, Actalis and others
  • ZeroSSL sign-up by access key, email or External Account Binding
  • obtain, renew and revoke certificates, from scratch or from an existing CSR
  • wildcard and SAN certificates, with CNAME delegation of challenges supported by default
  • YAML configuration file (.lego.yml) for servers, accounts, challenges and certificates
View 4 more
  • pre, deploy and post hooks around issuance and renewal
  • custom challenge solvers through the library
  • single binaries for Linux, macOS, Windows, FreeBSD, OpenBSD and Solaris, plus a Docker image
  • snap and AUR packages maintained by the lego maintainers

Capabilities

Has an APIplan not known
Has a command line toolplan not known

Alternatives

The same job

These do what lego does.

  1. Certbot EFF's tool to obtain certs from Let's Encrypt and (optionally) auto-enable HTTPS on your server
  2. dehydrated letsencrypt/acme client implemented as a shell-script – just add water
  3. win-acme A simple ACMEv2 client for Windows (for use with Let's Encrypt et al.)
  4. cert-manager Cloud native certificate management
  5. acme.sh A pure Unix shell script ACME client for SSL / TLS certificate automation
  6. Nginx UI Yet another WebUI for Nginx

Compare lego with the top 3