Giter Club home page Giter Club logo

deno-acme's Introduction

deno-acme

Latest version

Get certificates for your domains and or your domains their subdomains from an acme server. Supports http-01 challenges and dns-01 challenges with domains hosted with Cloudflare's DNS server. Use the CLI as a standalone acme client, or use the acme.ts library to use it in your own application.

Prerequisites for HTTP challenge

  • Port 80 needs to be available on the maschine running the acme cli or ...
  • (optional) Port 80 needs to be forwarded to the maschine running the acme cli
  • The requested domain name(s) need to point the IP address of the maschine running the acme cli

Prerequisites for Cloudflare DNS challenge

  • Domain and / or subdomain(s) with nameservers pointing to Cloudflare
  • Cloudflare API token with edit privileges for the given domain(s) / subdomain(s) DNS zone

CLI

How to get & use the CLI:

sudo deno install -A --allow-read=. --allow-write=. --allow-net --name acme --root /usr/local/ https://deno.land/x/[email protected]/cli.ts
# http challenge:
sudo acme http example.com,subdomain.example.com
# cloudflare dns challenge:
sudo acme cloudflare example.com,subdomain.example.com

Library

To use acme as a library in your application, add the following:

import * as ACME from "https://deno.land/x/[email protected]/acme.ts"

// http challenge:
const { domainCertificates } = await ACME.getCertificatesWithHttp("example.com", "https://acme-staging-v02.api.letsencrypt.org/directory");
console.log(domainCertificates);

// cloudflare dns challenge:
const cloudflareToken = Deno.env.get("CLOUDFLARE_TOKEN");
const { domainCertificates } = await ACME.getCertificatesWithCloudflare(cloudflareToken, "example.com", "https://acme-staging-v02.api.letsencrypt.org/directory");
console.log(domainCertificates);

License

MIT

deno-acme's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.