CERTBOT_AUTH_OUTPUT empty for the manual cleanup hook


I am trying to update my DNS records using a shell script that gets trigger using the manual-auth-hook param. The same script should also delete the DNS records when the manual-cleanup-hook is triggered.

According to the manual the enviroment variable CERTBOT_AUTH_OUTPUT contains the output “the auth script wrote to stdout”. In my case this variable is always empty and I have no idea why.

I am trying to update the cert using certbot:

sudo certbot certonly --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory --manual-public-ip-logging-ok -d test.de --dry-run --test-cert --manual-auth-hook=/home/pi/./auth.sh --manual-cleanup-hook=/home/pi/./cleanup.sh

In this example I use another shell script for cleanup just to be sure it gets called. Has anyone a solution for this issue?

All I can say is it’s always worked for me…

Maybe there’s a bug in your code? Even a typo somewhere?

Could you post it?

Is the auth script properly outputting things in the first place? Certbot should display the output, and log it, FWIW.

1 Like

Omg my bad. I thought the variable would contain everything certbot writes to stdout, not the auth script itself. I didn’t return anything, so that’s the reason for the empty variable.

Thanks for your help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.