# Certbot_CloudFlare_DNS01 Certbot allows for the specification of pre and post validation hooks when run in manual mode. The flags to specify these scripts are --manual-auth-hook and --manual-cleanup-hook respectively and can be used as follows:
certbot certonly --manual --manual-auth-hook /path/to/http/authenticator.sh --manual-cleanup-hook /path/to/http/cleanup.sh -d secure.example.comThis will run the authenticator.sh script, attempt the validation, and then run the cleanup.sh script. Additionally certbot will pass relevant environment variables to these scripts: CERTBOT_DOMAIN: The domain being authenticated\ CERTBOT_VALIDATION: The validation string\ CERTBOT_TOKEN: Resource name part of the HTTP-01 challenge (HTTP-01 only)\ CERTBOT_REMAINING_CHALLENGES: Number of challenges remaining after the current challenge\ CERTBOT_ALL_DOMAINS: A comma-separated list of all domains challenged for the current certificate\ Additionally for cleanup: CERTBOT_AUTH_OUTPUT: Whatever the auth script wrote to stdout