CPanel/WHM

Configuration for CPanel/WHM.

  • Code: cpanel
  • Since: v4.16.0

Here is an example bash command using the CPanel/WHM provider:

### CPANEL (default)

CPANEL_USERNAME = "yyyy"
CPANEL_TOKEN = "xxxx"
CPANEL_BASE_URL = "https://example.com:2083" \
lego --email you@example.com --dns cpanel --domains my.example.org run

## WHM

CPANEL_MODE = whm
CPANEL_USERNAME = "yyyy"
CPANEL_TOKEN = "xxxx"
CPANEL_BASE_URL = "https://example.com:2087" \
lego --email you@example.com --dns cpanel --domains my.example.org run

Credentials

Environment Variable Name Description
CPANEL_BASE_URL API server URL
CPANEL_TOKEN API token
CPANEL_USERNAME username

The environment variable names can be suffixed by _FILE to reference a file instead of a value. More information here.

Additional Configuration

Environment Variable Name Description
CPANEL_HTTP_TIMEOUT API request timeout
CPANEL_MODE use cpanel API or WHM API (Default: cpanel)
CPANEL_POLLING_INTERVAL Time between DNS propagation check
CPANEL_PROPAGATION_TIMEOUT Maximum waiting time for DNS propagation
CPANEL_REGION The region
CPANEL_TTL The TTL of the TXT record used for the DNS challenge

The environment variable names can be suffixed by _FILE to reference a file instead of a value. More information here.

More information