How and where are hook script certbot variables set, such as CERTBOT_DOMAIN?

My domain is: inteliquent.net

I ran this command: echo $CERTBOT_DOMAIN, as cerbot account

It produced this output:

My web server is (include version): Apache (version, unsure)

The operating system my web server runs on is (include version): Ubuntu 16.04

My hosting provider, if applicable, is: self hosted

I can login to a root shell on my machine (yes or no, or I don't know): YES

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): NO

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 1.1.0

Hi @erglazier,

Are you developing your own validation hook script for use with certbot --manual? That's the only case where CERTBOT_DOMAIN is set.

If you're wondering where in the Certbot code it's set, it's at

although we were just saying in another forum thread that you shouldn't need to look at things in _internal in order to develop code to work with Certbot. :slight_smile:

Certbot sets these variables in the process running the hook script, when actually performing an authentication. That means that you'll never see them on the command line or anything.

The explanation of how these are meant to be used appears in the Certbot documentation at

If you found that unclear for what you're trying to do, maybe you could give us some more context and we can try to help you understand how to do what you want.

1 Like

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