letsencrypt/acme client implemented as a shell-script – just add water
open sourceMITself-hostablefree
dehydrated is an ACME client written as a single bash script (zsh-compatible) that signs and renews certificates from Let's Encrypt, ZeroSSL, Google Trust Services, Buypass or any other ACME server, using only openssl, cURL, sed, grep, awk and mktemp. You list certificates in domains.txt, one line per certificate, and run dehydrated -c from cron: it issues missing certificates and renews ones close to expiry or whose names changed. HTTP-01 works by writing challenge files to a WELLKNOWN directory, while DNS-01, TLS-ALPN-01 and (on the master branch) DNS-PERSIST-01 go through a hook script, which also deploys certificates and reloads services. It handles wildcard and IP address certificates, ACME profiles, External Account Binding, RSA and ECDSA keys and signing existing CSRs. It's MIT-licensed and maintained by lukas2511, and its README says ZeroSSL officially maintains the repository; the latest release, 0.7.2, is from May 2025, and newer fixes and features are on the master branch.
Ways to install
Package managers
Problems it solves
- get Let's Encrypt certificates on a minimal server or router with only bash, openssl and curl, no Python or Go
- a certificate client small enough to read and audit in one sitting before giving it access to our keys
- renew all certificates listed in one text file from a nightly cron job
- answer DNS challenges for wildcard certificates with my own shell script for our in-house DNS
- deploy renewed certificates and reload nginx or postfix from a hook script after each renewal
- sign a CSR generated elsewhere, for example on a hardware device, through Let's Encrypt
- get a certificate for an IPv4 or IPv6 address using the short-lived profile
- use ZeroSSL or Google Trust Services instead of Let's Encrypt with external account binding credentials
- keep per-certificate settings such as key type, CA or renewal days for some certificates only
- issue certificates on BSD or macOS with the base system's tools instead of GNU ones
Features
- single bash script (zsh-compatible) depending only on openssl, cURL, sed, grep, awk and mktemp
- domains.txt with one certificate per line, plus aliases and per-certificate config files
- cron mode (-c) that signs missing certificates and renews expiring or changed ones (32 days before expiry by default)
- http-01, dns-01, tls-alpn-01 and dns-persist-01 challenges (dns-persist-01 on master, not yet released)
- hook script interface: deploy_challenge, clean_challenge, deploy_cert, unchanged_cert, invalid_challenge, request_failure, generate_csr, startup_hook, exit_hook and more
- wildcard certificates
- IP address certificates with the shortlived profile, validated over http-01
- ACME profile selection (--acme-profile) and preferred chain selection
- CA presets for Let's Encrypt, ZeroSSL, Buypass and Google Trust Services, with staging variants
- External Account Binding, fetched automatically for ZeroSSL from the account email
View 4 more
- RSA, prime256v1, secp384r1 and secp521r1 keys
- signing custom CSRs, certificate revocation and account deactivation
- automatic cleanup or deletion of old certificate files
- ACME v1 and v2
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what dehydrated does.
