cPanel Setup
For shared hosting or cPanel accounts.
Use acme.sh because it works well in limited SSH environments and supports the cpanel_uapi deploy hook.
1. Open Terminal
Open:
text
cPanel -> Advanced -> TerminalIf Terminal is unavailable, ask the hosting provider to enable SSH / Shell Access.
2. Set Variables
bash
export DOMAIN="example.com"
export EMAIL="[email protected]"
export ACME_SERVER="your Server URL"
export EAB_KID="your EAB MAC ID"
export EAB_HMAC_KEY="your EAB MAC key"
export WEBROOT="$HOME/public_html"Single-domain certificates should include example.com and www.example.com.
3. Install acme.sh
bash
curl https://get.acme.sh | sh
source ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || trueIf command not found appears:
bash
~/.acme.sh/acme.sh --version4. Register the ACME Account
bash
~/.acme.sh/acme.sh --register-account \
--server "$ACME_SERVER" \
--eab-kid "$EAB_KID" \
--eab-hmac-key "$EAB_HMAC_KEY" \
--accountemail "$EMAIL"5. Issue and Deploy to cPanel
Single domain, including the root domain and www:
bash
~/.acme.sh/acme.sh --issue \
--webroot "$WEBROOT" \
--domain "$DOMAIN" \
--domain "www.$DOMAIN" \
--server "$ACME_SERVER" \
--eab-kid "$EAB_KID" \
--eab-hmac-key "$EAB_HMAC_KEY" \
--deploy-hook cpanel_uapiMulti-domain:
bash
~/.acme.sh/acme.sh --issue \
--webroot "$WEBROOT" \
--domain example.com \
--domain www.example.com \
--domain example.net \
--domain shop.example.org \
--server "$ACME_SERVER" \
--eab-kid "$EAB_KID" \
--eab-hmac-key "$EAB_HMAC_KEY" \
--deploy-hook cpanel_uapiWildcard, including the root domain and *.:
bash
export CF_Token="Cloudflare API Token"
export CF_Account_ID="Cloudflare Account ID"
~/.acme.sh/acme.sh --issue \
--dns dns_cf \
--domain "$DOMAIN" \
--domain "*.$DOMAIN" \
--server "$ACME_SERVER" \
--eab-kid "$EAB_KID" \
--eab-hmac-key "$EAB_HMAC_KEY" \
--deploy-hook cpanel_uapiWARNING
Wildcard certificates require DNS validation. Replace dns_cf and API variables for your DNS provider.
Redeploy an existing certificate:
bash
~/.acme.sh/acme.sh --deploy \
--domain "$DOMAIN" \
--deploy-hook cpanel_uapi6. Check
Open:
text
cPanel -> SSL/TLS -> Manage SSL SitesConfirm the new certificate is installed, then open:
text
https://example.com7. Renewal Test
bash
~/.acme.sh/acme.sh --cron --force