npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wildcert

v0.1.5

Published

Wildcert is a wrapper for Greenlock (JS Letsencrypt/ACME client) that supports fully automated wildcard certificate requests using plugins that will automatically update the DNS challenges. Only supports GoDaddy at this time

Downloads

6

Readme

WildCert

WildCert is a wrapper for Greenlock that supports the automatic requesting of wilcard certificates from LetsEncrypt by automatically updating DNS and using the DNS authorisation challenge.

Greenlock / Acme.js Warning

Let’s Encrypt will STOP WORKING with Greenlock and ACME.js at the end of Oct 2019. WITHOUT YOUR HELP we won’t get the next release out in time.

If Greenlock (or ACME.js) has saved you time and money, and taken stress out of your life, or you just love it, please reach out to return the favor today:

SAVE GREENLOCK / ACME.js: https://indiegogo.com/at/greenlock

It is unclear at this time if the breaking changes will effect Wildcert.

Prerequisites

  • Node.JS v8.x or above with NPM
  • Only Linux is supported at this time. Not tested on MacOS/BSD

Installation

To install WildCert simply run the following command on your server:

$ sudo npm install -g wildcert

DNS Plugins

The following providers are supported for automatic DNS updates. You will likely need to generate API keys in order to use one of these plugins.

Server Plugins

After a successful certificate gernation/renewal WildCert can reload the web server for you.

At the moment only HaProxy is supported support for Nginx and Apache is planned.

Configuration Files

{
  "domains": ["*.example.com", "*.foo.com"], 
  //request multiple wilcard certificates in one request on one certificate. 
  //Both domains must be managed by the same DNS provider.
  
  "email": "[email protected]", //email used for renewal emails sent from LetsEncrypt
  
  "expiryThreshold": 5, //the number of days before actual certificate expiry when the renewal should occur
  
  //  GREENLOCK CONFIGURATION
  "greenlock": {
  
    "production": true, //set to false to use the staging API for testing.
    
    "rsaKeySize": 2048, //keysize for certificate must be 2048 or larger and a multiple of 512 e.g 2048, 4096, 2560
    
    // The Greenlock store configuration... le-store-certbot is installed for you but any store plugin can be used. 
    //Search NPM for le-store for other available plugins.
    "store": {
    
      "plugin": "le-store-certbot", //the node.js plugin to use...
    
      // PLUGIN CONFIGURATION
      "config": {
        "debug": false,
        "configDir": "/etc/letsencrypt"   //the directory to store the LetsEncrypt data
      }
    
    },
    
    //When requesting wildcard certificates one can only use the DNS challenge. 
    //Wildcert work by intercepting the LetsEncrypt response and updating DNS using the configured plugin.
    //Search NPM for le-challenge to use other plugins for any type of challenge
    "challenges": {
      "dns-01": "wildcert"  //Setting this to wildcert allows WildCert to intercept the DNS challenge response
    },
    "debug": false
    
  },
  "dns": {
    "plugin": "godaddy",  //The DNS Update Plugin to use...
    "config": {
       "apikey": "", //The GoDaddy API key
       "secret": ""  //The GoDaddy API Secret
    },
    "setIP": true, //if set the DNS plugin will automatically set the A and AAAA records for the appropriate domains
    "ip4List": [/*An array of IPV4 addresses to set*/],
    "ip6List": [/*An array of IPV6 addresses to set*/]
  },
  "server": {
    "plugin": "haproxy",  //The WildCert webserver management plugin to use 
    "config": {
      "certpath": "/etc/haproxy/certs/fullchain.pem", 
      //haproxy requires a full chain style certificate file. 
      // This is the path wheere that key will be written to.
      
      "reload": true 
      //Setting this to true will issue a systemctl reload haproxy.service
      //    after the certificate has been successfuly written to the above path.
    
    }
  }
}

Using WildCert

  1. Create a configuration file and save it somewhere. E.g. /etc/wildcert/example.com.json
  2. Run $ sudo wildcert /etc/wildcert/example.com.json to request your certificate.
  3. Run $ sudo nano /etc/cron.daily/wildcert
  4. Create the Daily Cron file like below:
#!/bin/sh

wildcert /etc/wildcert/example.com.json

Now wildcert will run daily and check to see if the threshold set in the configuration file has been reached and renew the certificate.

It is possible to have multiple WildCert configuration files, if you do just add all the renewals you wish to happen to this cron file.

LICENSE

Please see package.json for included modules and see NPM or the Source for the Licenses for those included modules.

Dual-licensed MIT and Apache-2.0

See LICENSE