![]() |
|
Guide Wildcard SSL on CyberPanel with acme.sh and a Manual DNS Record - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CyberPanel (https://adminsforum.com/Forum-cyberpanel) +---- Forum: CyberPanel Guides & Tutorials (https://adminsforum.com/Forum-cyberpanel-guides-tutorials) +----- Forum: CyberPanel Domains, DNS & SSL Guides (https://adminsforum.com/Forum-cyberpanel-domains-dns-ssl-guides) +----- Thread: Guide Wildcard SSL on CyberPanel with acme.sh and a Manual DNS Record (/Thread-guide-wildcard-ssl-on-cyberpanel-with-acme-sh-and-a-manual-dns-record) |
Wildcard SSL on CyberPanel with acme.sh and a Manual DNS Record - JAY - 11-14-2026 Wildcard SSL on CyberPanel with acme.sh and a Manual DNS Record (Tested) A wildcard certificate covers every subdomain at once: Code: *.yourdomain.comCode: acme.shKnow the trade-off first: done by hand, the certificate does not renew by itself. It's valid for 90 days, and you repeat steps 2 to 4 before it runs out. More on that at the end. Below, Code: yourdomain.comStep 1: Point all subdomains at the server In your DNS, add one A record with the name Code: *Step 2: Ask for the certificate Over SSH as root: Code: /root/.acme.sh/acme.sh --issue -d yourdomain.com -d "*.yourdomain.com" --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please --server letsencryptCode: Add the following TXT record:
Domain: '_acme-challenge.yourdomain.com'
TXT value: 'CyX27L-gRHvJdxQgSDlVtdh0hrKv--6qIBRLKTmPYiY'Step 3: Add the two TXT records In your DNS, add a TXT record named Code: _acme-challengeCode: _acme-challenge.subThen add a second TXT record with the same name and the second value. Don't edit the first one. Both have to exist together: Check that the world can see them before you go on: Code: dig +short TXT _acme-challenge.yourdomain.com @1.1.1.1Step 4: Finish the certificate Run the same command again, with Code: --renewCode: --issueCode: --eccCode: /root/.acme.sh/acme.sh --renew -d yourdomain.com -d "*.yourdomain.com" --ecc --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please --server letsencryptCode: Verifying: yourdomain.com
Success
Verifying: *.yourdomain.com
Success
Cert success.Step 5: Put the certificate on the website CyberPanel keeps each site's certificate in Code: /etc/letsencrypt/live/yourdomain.com/Code: mkdir -p /root/ssl-backup
cp -a /etc/letsencrypt/live/yourdomain.com/*.pem /root/ssl-backup/
/root/.acme.sh/acme.sh --install-cert -d yourdomain.com --ecc \
--fullchain-file /etc/letsencrypt/live/yourdomain.com/fullchain.pem \
--key-file /etc/letsencrypt/live/yourdomain.com/privkey.pem \
--reloadcmd "/usr/local/lsws/bin/lswsctrl restart"Code: openssl x509 -in /etc/letsencrypt/live/yourdomain.com/fullchain.pem -noout -enddate -ext subjectAltNameCode: DNS:*.yourdomain.com, DNS:yourdomain.comStep 6: Make the website answer for every subdomain The certificate is ready, but the website also has to accept the extra names. Our server runs LiteSpeed Enterprise, where the site config is Apache-style. Open Websites → your site → Config → vHost Conf and add the wildcard to both Code: ServerAliasCode: ServerAlias www.yourdomain.com *.yourdomain.comCode: /usr/local/lsws/bin/lswsctrl restartOur test results We opened subdomains that we had never created anywhere: Code: yourdomain.com 200, certificate valid
anything.yourdomain.com 200, certificate valid (wildcard)
shop.yourdomain.com 200, certificate valid (wildcard)Renewal: the part you must not forget
Questions, or a step that fails? Reply below with the acme.sh output (hide your server IP first). |