# Internal Environment Variables

Nginx-LE uses a no. of internal environment variables primarily to communicate with Auth providers. You do not normally need to worry about these as the Nginx-LE sets these as necessary based on the selected Auth Provider.

| Name                           | Type   | Domain                                                                                                                                                                                                          | Description                                                                                                                                                        |
| ------------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| LOG\_FILE                      | String | Path                                                                                                                                                                                                            | The name of the logfile that certbot writes to. We also redirect the auth providers to write to this log file.                                                     |
| CERTBOT\_ROOT\_PATH            | String | Path                                                                                                                                                                                                            | Path to the letsencrypt root directory which defaults to: `/etc/letsencrypt`. You don't normally need to alter this. Its primary purpose is for Unit Testing.      |
| CERTBOT\_VERBOSE               | String | true \| false                                                                                                                                                                                                   | Used by the `acquire` command to control the log level of the Certbot Auth and Cleanup hooks.                                                                      |
| CERTBOT\_AUTH\_HOOK\_PATH      | String | Path                                                                                                                                                                                                            | Path to the auth\_hook script provided as part of nginx-le. The auth hook is called by certbot at the start of an attempt to acquire or renew a certificate.       |
| CERTBOT\_CLEANUP\_HOOK\_PATH   | String | Path                                                                                                                                                                                                            | Path to the cleanup\_hook script provided as part of nginx-le. The cleanup hook is called by certbot when completing an attempt to acquire or renew a certificate. |
| CERTBOT\_DEPLOY\_HOOK          | String | Path to the deploy\_hook script provided as part of nginx-le. The deploy hook is called by certbot to deploy certificates into nginx. Its is only called when a certificate is sucessfully renewed or acquired. |                                                                                                                                                                    |
| DNS\_RETRIES                   | int    | Integer                                                                                                                                                                                                         | The number of times the DNS Auth Hook will check the DNS for the required TXT record.                                                                              |
| NGINX\_CERT\_ROOT\_OVERWRITE   | String | Path                                                                                                                                                                                                            | Only used for Unit Testing. Sets the path where certbot saves certificates to.                                                                                     |
| NGINX\_ACCESS\_LOG\_PATH       | String | Path                                                                                                                                                                                                            | Path to the Nginx access.log file in the container.                                                                                                                |
| NGINX\_ERROR\_LOG\_PATH        | String | Path                                                                                                                                                                                                            | Path to the Nginx error.log file in the container                                                                                                                  |
| NGINX\_LOCATION\_INCLUDE\_PATH | String | Path                                                                                                                                                                                                            | Path of the .location and .upstream files.                                                                                                                         |

### Certbot environment variables.

Certbot sets a number of environment variables during the auth process to communicate to the Auth and Cleanup hooks. You don't need to set this but if you are writing a custom auth or cleanup hook they are available to the hook.

| Name                | Type   | Domain               | Description                                                                                                                                                                                                                  |
| ------------------- | ------ | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CERTBOT\_TOKEN      | String | Filename             | Used only by HTTP01Auth. This is the name of the file that the CERTBOT\_VALIDATION string must be written into e.g. .well-known/acme-challenge/$CERTBOT\_TOKEN                                                               |
| CERTBOT\_VALIDATION | String | Generated by Certbot | This is the validation string Certbot generates to verify ownership of your domain. For DNS Auth Providers this is written into a TXT record on your DNS server. For HTTP01Auth this is written int the CERTBOT\_TOKEN file. |
| CERTBOT\_DOMAIN     | String | Domain name          | Will be the same as DOMAIN but required by Certbot                                                                                                                                                                           |
