Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Certificaat is a general-purpose ACME client, fully compatible with the Let’s Encrypt CA.


Certificaat’s aim is to help you retrieve a certificate for your domain, and subsequently help you set up a cron job and forget about it.

Note: If certbot does everything for everybody, Certificaat is narrower in scope, focusing on usability and automated renewals.


Download the latest release, extract the archive and drop the self-contained binary in your PATH.

Note: Java is a system requirement.


Command line

To get a certificate for a domain, you need to initialize certificaat with said domain, then you run it repeatedly until your certificate has downloaded.

  1. certificaat -m init
  2. certificaat -m run

The certificate can be renewed in one pass with certificaat -m cron.


certificaat -m init

The -m option indicates the domain you want to authorize. It will feature in the Subject name of the final X.509 certificate.

certificaat -m -n init

The -n option is for additional domain name you want to authorize. It will feature in the Subject Alternative Name a(SAN) of the certificate. Repeat this option for all required names. Caution: there is a hard limit imposed by the CA.

During this phase, certificaat will, if needed, register a user account with the ACME CA, and write configuration files that you then can edit and customize.

Certificaat follows the XDG Base Directory Specification. The configuration folder is determined by querying the value of XDG_CONFIG_HOME in the environment, and if not set, will default to $HOME/.config/certificaat.

Configuration files are in edn format and can be edited in any text editor.

The local configuration file is stored in the project directory, $HOME/.config/certificaat/ , and looks like this:

{:acme-uri "acme://",
 :challenges #{"http-01"},
 :contact "",
 :domain "",
 :hooks [:before-challenge :after-request],
 :organisation "ChangeMe corporation",
 :san #{""}}

Hopefully, the options are self-explanatory.

  • the email address used by the CA to send expiry reminders.
  • the challenge you want to complete. If you want to offer the CA multiple challenges, that is supported as well.
  • the URI to the ACME CA. By default, Certificaat will talk to Let’s Encrypt’s staging server. The resulting certificates will be fake. This is so you can practice until you are ready to issue a production certificate.
Staging URIProduction URI

The global configuration is stored in the root directory, $HOME/.config/certificaat/ and it looks like this:

{:key-size 2048,
 :key-type :rsa,
 :keypair-filename "account.key",
 :plugins {:diffie-hellman {:enabled false,
                            :filename "dhparam.pem",
                            :group14 true,
                            :modulus 2048},
           :email {:enabled false,
                   :sendmail false,
                   :smtp {:host "",
                          :pass "changeme",
                          :port 587,
                          :user "changeme"}},
           :webroot {:enabled false, :path "/var/www/"}}}


certificaat -m run 

certificaat will display instructions pertaining to the challenge. This is the time to satisfy the requirements (for example, configuring DNS records or preparing your web server). When you are ready, simply repeat the operation and the challenges will be triggered and, if successfully completed, a certificate downloaded and saved to disk.


Hooks are provided to perform additional functionality at key moments, namely before the challenges get triggered, and after a certificate has been acquired or renewed. The hooks are powered by plugins that need to be configured and enabled.

The plugin configuration resides in the root directory, XDG_CONFIG_HOME/.config/certificaat/config.edn


This enables authorizing and requesting the certificate in a single pass.


An email will be sent to the contact registered with the certificate.

Diffie-Helman parameters

This will save a Diffie-Helman parameters file along with the certificate, for further tuning the SSL setup.


certificaat -m info

Certificaat will display a summary of the certificate.


certificaat -m cron

This command can be integrated in an automated workflow. For example, as a cron job.

5 8 1 * * certificaat -m cron && /usr/sbin/service nginx reload


Certificaat will honor all challenges defined in the ACME specification, but please note that Let’s Encrypt CA does not support the OOB challenge and that TLS-SNI comes in two flavors.

ChallengeOption identifierLet’s EncryptCertificaat
TLS with Server Name Indication (SNI)tls-sni-01 & tls-sni-02✓ & ✕

Clojure library

In addition to the command line, Certificaat is available on Clojars as a regular Clojure library which you can require in your projects.

Note: a single namespace exposes a core API which is made available to all interfaces.


If you plan to submit enhancements beyond bug fixes, please coordinate with me beforehand in order to save everybody’s time and effort.


I wish to thank Richard Körber who wrote the Java client for the ACME protocol, acme4j, which serves as the foundation for Certificaat. Not only is it well written, it is exquisitely documented.


Licensing terms will be revealed shortly. In the meantime, do what you want with it. Type certificaat -h to familiarize yourself with the input it expects. For as long as the authorizations remain valid,

Note: With LetsEncrypt, cached authorizations last for 30 days from the time of validation.