@interactivetraining/le-challenge-cloudflare

A Cloudflare challenge for greenlock

Usage no npm install needed!

<script type="module">
  import interactivetrainingLeChallengeCloudflare from 'https://cdn.skypack.dev/@interactivetraining/le-challenge-cloudflare';
</script>

README

@ddg-gmbh/le-challenge-cloudflare

greenlock ACME dns-01 challenge for Cloudflare.

Prior Art

Usage

import Greenlock from 'greenlock';
import LEStoreCertbot from 'le-store-certbot';
import LEChallengeCloudflare from '@ddg-gmbh/le-challenge-cloudflare';

const store = LEStoreCertbot.create();

const DNSChallenge = new LEChallengeCloudflare({
  cloudflare: {
    email: process.env.cloudflare_email,
    key: process.env.cloudflare_api_key,
  },
  acmePrefix: '_acme-challenge', // default
  verifyPropagation: { waitFor: 5000, retries: 20 }, // default
  useDNSOverHTTPS: false // default
});

const greenlock = Greenlock.create({
  server: Greenlock.stagingServerUrl,
  store,
  challenges: { 'dns-01': DNSChallenge },
  challengeType: 'dns-01'
});

greenlock.register({
  domains: ['example.com'],
  email: 'admin@example.com',
  agreeTos: true,
  rsaKeySize: 2048
});