daiwai/netcup-certbot-dns

dev-master 2018-11-23 23:39 UTC

This package is auto-updated.

Last update: 2024-04-24 12:17:32 UTC


README

Authentication and cleanup hooks to facilitate obtaining and automatically renewing certificates for (wildcard) domains hosted by and using netcup DNS name servers with Certbot e ACME dns-01

The Authentication Hook will automatically deploy the DNS record with the challenge token via the netcup DNS API.

Install

Prerequisites

These hooks work for domains hosted with netcup that also use netcup's name servers (which is the default). You need to enable Domain API access in the netcup CCP and create an API user.

The server needs to have the following installed:

  • Certbot
  • PHP (cli) with soap extension
  • composer
  • git

Setup

Clone the repo and install dependencies using composer:

git clone https://github.com/daiwai/netcup-certbot-dns netcup-certbot-dns
cd netcup-certbot-dns
composer install

Then edit conifg.php in the netcup-certbot-dns root folder. You need to enter your netcup API key, API pass, and customer ID:

cp config-dist.php config.php
vim config.php

Usage

Pass the hooks to certbot when requesting a certificate for your domain:

certbot certonly --manual --preferred-challenges=dns \
--server https://acme-v02.api.letsencrypt.org/directory \
--manual-auth-hook '/path/to/netcup-certbot-dns/bin/auth.php' \
--manual-cleanup-hook '/path/to/netcup-certbot-dns/bin/cleanup.php' \
--manual-public-ip-logging-ok \
-d '*.example.com'