Skip to content

Instantly share code, notes, and snippets.

View immjs's full-sized avatar
✉️
Plurriel, November 1st!

Juliet Wang immjs

✉️
Plurriel, November 1st!
  • France
  • 20:26 (UTC +02:00)
View GitHub Profile
@benjaminblack
benjaminblack / lets-encrypt-certbot-acme-client-manual-dns-challenge.md
Last active August 6, 2023 23:28
Let's Encrypt certbot ACME client manual DNS challenge

Let's Encrypt certbot ACME client manual DNS challenge

certbot certonly [--dry-run] --manual --preferred-challenges dns-01 \
--domain example.com --domain www.example.com [...]

For each host passed via --domain, Let's Encrypt will prompt the user to create an _acme-challenge TXT record (_acme-challenge.example.com, _acme-challenge.www.example.com, etc.) with a specific value.

import Yoga from 'yoga-layout-prebuilt';
import { useEffect, useRef } from 'react';
import { useStdin, useStdout, useApp } from 'ink';
import { Program } from 'blessed';
// TODO: yogaNode.getComputedLayout() returns all 0s except
// for the width and height, which means we have to manually
// track the positions of elements in the code below. I'm
// not sure why this is, but it probably needs some sort of
// upstream fix in Ink.