acme-tiny icon indicating copy to clipboard operation
acme-tiny copied to clipboard

Add support for --challenge-deploy as an alternative to --acme-dir, also supports DNS-01 challenge style

Open adelton opened this issue 6 months ago • 3 comments

I'm offering for consideration changes that make it possible to offload the challenge work to external scripts.

So instead of

    --acme-dir /var/www/acme-challenges/

you can use

    --challenge-deploy 'read d t ka ; echo "$ka" > /var/www/acme-challenges/"$t"'

That by itself does not sound useful but it gets useful in situations like

    --challenge-deploy /usr/local/bin/acme-challenge-deploy-to-my-servers

or

    --challenge-deploy 'ssh -i ~/.ssh/acme-deploy [email protected] 2>&1'

The change itself is not ready for merging on top of master as the code exceeds the 200 line limit.

However, when applied on top of other pull requests that are currently open, namely https://github.com/diafygi/acme-tiny/pull/296, https://github.com/diafygi/acme-tiny/pull/297, or parts of https://github.com/diafygi/acme-tiny/pull/273 (I can provide separate PR for just the "Remove comments where the subsequent log.info line can carry the same information" part), it is possible to have this logic within 200 lines.

Moving the challenge deployment logic to external script lends itself nicely to the DNS-01 challenge type support, as the only thing that is needed in the acme-tiny code is a support for the slightly different key authorization token format.

I've been running with this change for a couple of weeks and I feel I can show it now.

adelton avatar Jun 12 '25 07:06 adelton