talira

A pure Unix shell script ACME client for SSL / TLS certificate automation

open sourceGPL-3.0-onlyself-hostablefree

acme.sh is an ACME client written entirely in Unix shell (it runs under sh, bash or dash) that issues, renews and installs TLS certificates, with no Python to install and no need for root. It proves domain control in webroot, standalone HTTP, standalone TLS-ALPN, Apache or nginx mode, through DNS API hooks for about 180 DNS providers, in DNS alias mode, or with a single long-lived TXT record in the new DNS persist mode, and its cron job renews certificates every 30 days or earlier when the CA's ACME Renewal Information says so. Deploy hooks copy renewed certificates into HAProxy, Docker containers, Proxmox VE, TrueNAS, Synology DSM, RouterOS, Vault, GitLab and dozens of other targets, and notify hooks report renewals and errors. ZeroSSL is its default CA, with Let's Encrypt, Google Public CA, SSL.com, Actalis and any RFC 8555 CA selectable. Neil Pang is its original maintainer; ZeroSSL has sponsored and maintained it since 2021, and OPNsense, pfSense and Proxmox use it for their certificate features.

Ways to install

Problems it solves

  • issue and renew Let's Encrypt certificates on a router or NAS that has only a basic shell and no Python
  • get TLS certificates without giving the renewal tool root access
  • renew a wildcard certificate automatically through my DNS provider's API
  • my DNS provider has no API but I still want certificate renewals to run unattended
  • push a renewed certificate to my Synology, TrueNAS or Proxmox box automatically
  • get an email or chat message when a certificate renewal fails
  • get free certificates from a CA other than Let's Encrypt, like ZeroSSL or Google's public CA
  • issue a certificate from a CSR generated on our appliance or HSM
  • reload nginx or Apache after each certificate renewal without writing my own scripts
  • automate TLS certificates on FreeBSD, Solaris or OpenWrt where the usual clients don't run
  • prove domain control over port 443 with TLS-ALPN when port 80 is blocked
  • run certificate renewals in a Docker container and deploy the certificates into other containers

Features

  • full ACME protocol client in POSIX shell, compatible with bash, dash and sh
  • doesn't need root
  • webroot, standalone (port 80), standalone TLS-ALPN (port 443), Apache and nginx modes
  • DNS API hooks for about 180 DNS providers, including Cloudflare, Route 53, Google Cloud DNS, Azure DNS and DigitalOcean
  • DNS alias mode and DNS manual mode
  • DNS persist mode (draft-ietf-acme-dns-persist): one long-lived TXT record for every issuance and renewal
  • SAN and wildcard certificates
  • ECDSA P-256 (default), P-384 and P-521, and RSA 2048, 3072 and 4096 keys
  • daily cron job renews every 30 days, or earlier when the CA's ACME Renewal Information (RFC 9773) says so
  • ZeroSSL (default), Let's Encrypt, Google Public CA, SSL.com, Actalis and any RFC 8555 CA
View 6 more
  • issue from an existing CSR
  • deploy hooks for about 55 targets: HAProxy, Docker, Synology DSM, TrueNAS, Proxmox VE, RouterOS, Vault, GitLab, cPanel, FortiGate, UniFi and more
  • notify hooks for renewal and error messages from the cron job
  • self-upgrade with optional auto-upgrade
  • release tags signed with the maintainer's SSH key from 3.1.6
  • Docker image

Limitations

  • Doesn't configure Apache or nginx to use the certificate: you point the server at the files and give a reload command3
  • Doesn't run natively on Windows: it's tested there only under Cygwin, with curl, openssl and crontab3

Capabilities

Has a command line toolplan not known
Takes pluginsplan not known

Alternatives

The same job

These do what acme.sh does.

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

Compare acme.sh with the top 3