Let’s Encrypt provides CLI namely Certbot
to generate the certificate
sudo apt install certbot
The command to generate the cert is relatively simple. You can do for single domain, for multiple domains then just needs to append -d DOMAIN
. In this case I used *.DOMAIN
so that the certificate can be used for subdomain as well. The wizard will ask for a few simple information.
sudo certbot certonly --manual --preferred-challenges dns -d "*.DOMAIN"
Once Y is entered in the previous step, Certbot
will revert with ACME challenge token to be configured in DNS provider to allow verification. Copy the token and insert as TXT record in DNS console of Namecheap.
Please set TTL to 1 minute to allow Top-level DNS servers to pick up this new subdomain — _acme-challenge.DOMAIN
. You can verify this DNS TXT record using nslookup
before proceed with verification.
nslookup -type=TXT _acme-challenge.DOMAIN
Step 4 — Verify the domain challenge
Press Enter and Certbot
will continue with the verification process.
Step 5 — Retrieve the certificate
You will hit permission error when trying to retrieve the file. This is due to folder permission of /etc/letsencrypt/live
is set to root. Therefore we can set permission to allow other users to read via sudo chmod +x /etc/letsencrypt/live
After that you can extract the fullchain.pem
and privkey.pem
for ingress / route / web server configuration.
Reference: here
Updated: August 17, 2025 A practical guide to the best free CRM (Customer Relationship Management)…
If you run a VPS or dedicated server with Linux, you probably know that managing…
Short summary: Use built-in Linux tools (`who`, `last`, `journalctl`, `/var/log/auth.log`) and optional audit logs to…
Whether you're a new Linux user or a beginner sysadmin, mastering the terminal is a…
Choosing the right Content Management System (CMS) is key when you're building a blog, portfolio,…
Securing your Linux server is a critical task for every sysadmin. One of the simplest…
This website uses cookies.