Toadfarm::Plugin::Letsencrypt - Toadfarm Plugin to handle domain verifications.


  # Toadfarm
  plugin 'Letsencrypt' => {...};


Toadfarm::Plugin::Letsencrypt is a Toadfarm plugin that will generate routes for providing responses for domain verification.

  Config options
  challenges -> /path/to/challenges/root (/tmp/letsencrypt/public_html)
  route -> /path/to/route/called/by/letsencrypt (/.well-known/acme-challenges)

In your Toadfarm script, make sure you mount your apps with a User-Agent rejection (you should reject Github-Hookshot as well so you can use Toadfarm::Plugin::Reload):

  mount '/var/mojo/' => {
    "User-Agent" => qr{^(?:(?!GitHub-Hookshot)(?!letsencrypt).)*$},

Download Run it with ./letsencrypt-auto certonly -a manual -d cn1.domain.tld -d ... For each domain specified, letsenrypt will need to verify ownership and will provide details for capturing the challenge / response:

  mkdir -p /tmp/letsencrypt/public_html/.well-known/acme-challenge
  cd /tmp/letsencrypt/public_html
  printf "%s" 123 > .well-known/acme-challenge/abc

Simplist thing to do is copy and paste that. Toadfarm::Plugin::Letsencrypt will pick up the verification request from letsencrypt and provide the correct challenge response in order to verify domain ownership.


Toadfarm::Plugin::Letsencrypt inherits all methods from Mojolicious::Plugin and implements the following new ones.



Register plugin in Mojolicious application.


Toadfarm, Mojolicious, Mojolicious::Guides,