Not all promised environment variables available in hook script #541

Open
opened 2025-12-29 01:27:02 +01:00 by adam · 1 comment
Owner

Originally created by @ingmar on GitHub (Jul 27, 2021).

It seems dehydrated doesn't actually make many of the variables from dehydrated --env available to the hook scripts. I've ran across this with DOMAINS_TXT missing - adding it to the export line seems to fix it, but there's probably others that should be added here too.

91cccc0c23/dehydrated (L577)

Originally created by @ingmar on GitHub (Jul 27, 2021). It seems dehydrated doesn't actually make many of the variables from `dehydrated --env` available to the hook scripts. I've ran across this with DOMAINS_TXT missing - adding it to the export line seems to fix it, but there's probably others that should be added here too. https://github.com/dehydrated-io/dehydrated/blob/91cccc0c234e4decf0a19595fa19a6f306788032/dehydrated#L577
Author
Owner

@lukas2511 commented on GitHub (Jul 28, 2021):

Not really a bug, but probably bad wording.
dehydrated --env is available if (for whatever reason) you want to export the dehydrated config parameters for use in other scripts (e.g. a wrapper script which reuses the same config) or for debug purposes.

Adding those exports might also require some documentation since some of those variables would then be certificate/domain-set specific, but only for certain hooks before they return to their original state, while others are valid for all domain-sets.
Since I'll be restructuring a lot around that config behaviour I won't add the exports right now, but I'll keep this issue open as reminder to add them later.

@lukas2511 commented on GitHub (Jul 28, 2021): Not really a bug, but probably bad wording. `dehydrated --env` is available if (for whatever reason) you want to export the dehydrated config parameters for use in other scripts (e.g. a wrapper script which reuses the same config) or for debug purposes. Adding those exports might also require some documentation since some of those variables would then be certificate/domain-set specific, but only for certain hooks before they return to their original state, while others are valid for all domain-sets. Since I'll be restructuring a lot around that config behaviour I won't add the exports right now, but I'll keep this issue open as reminder to add them later.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#541