Setup Certbot with Auto Renewal for NameCheap
Note: Namecheap has specific requirements to create an API key. As of ~October 2024 they are:
- At least 20 domains under your account.
- A minimum of $50 in your account balance.
- At least $50 spent within the last 2 years.
If you do not meet these requirements, you can request a waiver by contacting Namecheap support.
Steps:
- Navigate to Namecheap -> Profile > Tools > Manage API Access Keys

- On your server, install certbot and DNS plugin for Namecheap
- Install pip
- Install DNS plugin for Namecheap
- Create ini file with api key and secret
- Add api key and secret created in step 1
- Save the file and update permissions
- Generate certificate using certbot with DNS plugin for Namecheap
Results:
- Validate certificate and dns update with dry run (this will not create a new certificate or update dns)
Results:
- Reload nginx to apply new certificate (optional)
- Validate certbot timer
Results: