The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Mojolicious::Plugin::ACME - ACME client integration for your Mojolicious app


  use Mojolicious::Lite;

  # optionally load config in application config
  # shown directly below but config plugins work too
  my %acme = (...);
  app->config->{acme} = \%acme;

  plugin 'ACME';


Establishes a route at the top level of your application to handle the challenge request from the application server. Also loads configuration which is reused at multiple levels of the ACME cycle.


Mojolicious::Plugin::ACME is configured via a key named acme in your application's config method. The value should be a hash reference of configuration. If one is not passed in, one will be created for later inspection.

The recognized keys within that hash are:


A hash reference containing keys which identify certificate authorities used by "ca" and values which can be used to initialize an instance of Mojo::ACME::CA. Any hashreference provided will be merged on top of the defaults which currently contains one entry: letsencrypt.


The certificate authority to use for issuance. This may be a hash reference suitable for constructing an instance of Mojo::ACME::CA, a pre-initialized instance or subclass thereof, or else a string. In the case of a string, this key must exist in "authorities". The default is the string letsencrypt.


A url suitable to be passed to "listen" in Mojo::Server::Daemon. This url is used by the client and server for the application server to forward challenge requests. The default is


Please note that the application's first secret is used as a mechanism of signing messages between the ACME client and the application server. This may be configurable eventually but is not yet.

Early versions of this module used the name cas rather than "authorities".