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

certbot-dns-ovh

v0.1.2-2

Published

Respond to Certbot dns challenges by updating your DNS zone on OVH.

Downloads

13

Readme

⚠️ Note: this module was built before the official plugin.
I'd suggest using that if possible: https://certbot-dns-ovh.readthedocs.io/en/stable/

Certbot plugin for OVH DNS

Certbot hook scripts that allow to respond to DNS-01 challenges from Let's Encrypt by updating the DNS zone in an OVH account.

Available on NPM: npm i certbot-dns-ovh

Why and when you might need this

There are several use cases for DNS challenge with Certbot. For example, when the server or machine that needs a certificate is not directly accessible from the internet; this way, you can secure machines and services in your internal network or company domain, even behind a firewall or VPN. Another example for this is to automatically deploy certificates to servers that for any reason cannot perform their challenges, like CDNs or other servers that for any reason cannot run Certbot. In this case you would need more automation to deliver the certificates securely to those hosts, but it's not the scope of this project.

Prerequisites

Usage

  1. Install via NPM: certbot-dns-ovh. Otherwise, you can download or clone this repo, and then from a terminal enter the directory: cd certbot-dns-ovh and run npm install.

  2. Get an App Key and App Secret from OVH by registering a new app at this URL: OVH Developers: Create App (see more details here: First Steps with the API - OVH).

  3. Obtain a Consumer Key (aka Authentication Token) by running the included script in a terminal:
    node bin/authorize.js --endpoint=ovh-eu --app_key=yourappkey --app_secret=yourappsecret
    by replacing "yourappkey" and "yourappsecret" with the values you received in the previous step, and optionally using a different endpoint than "ovh-eu".

  4. You will get a response with an URL:
    { validationUrl: 'https://eu.api.ovh.com/auth/?credentialToken=jed...', consumerKey: '69X...', state: 'pendingValidation' }
    Visit the validationUrl and login with the account with the DNS zone to be updated, and select a suitable Valitidy (it would make sense to use Unlimited, unless for testing purposes). The consumerKey that you received with the validationURL will now be authorized to access your account.

  5. Copy the file .env.example to .env, and fill the values that you received from OVH. As endpoint, the default value is ovh-eu.

  6. Now you're ready to setup Certbot! You can run the following command:
    sudo certbot certonly --manual --preferred-challenges=dns --manual-auth-hook '/path/to/certbot-dns-ovh/bin/create-record.js' --manual-cleanup-hook '/path/to/certbot-dns-ovh/bin/delete-record.js' -d www.example.com.
    This command will wait for up to 60 seconds (or more if you raise the value DNS_TIMEOUT in your .env file).

  7. If everything goes right, you will get a certificate! It will be saved at /etc/letsencrypt/live/www.example.com/fullchain.pem. You can add it your webserver configuration or copy to another server if you need to.

  8. Now, automate! You can add the line @weekly certbot renew --quiet to your crontab, for example: sudo crontab -e. If you're using a webserver like Nginx, this line could be @weekly certbot renew --quiet && systemctl restart nginx.service.

NB: the certbot renew command uses the same options as the certbot certonly command, so please do not move or delete the ovh-certbot-dns directory.

See Also

https://github.com/ovh/node-ovh

Author

David Gasperoni

License

MIT