HTTPS certificate installation

Here is a good news to everyone, my website supports https.

Free certificate provider used Let’s Encrypt.

How to get the installation, there is a detailed tutorial on Let’s Encrypt.

Let’s Encrypt recommend that most people with shell access use the Certbot ACME client.

  • It can automate certificate issuance and installation with no downtime.
  • It also has expert modes for people who don’t want autoconfiguration.
  • It’s easy to use, works on many operating systems , and has great documentation.

Visit Certbot site :

Choose the webserver and system you use


sudo mv certbot-auto /usr/local/bin/certbot-auto
sudo chown root /usr/local/bin/certbot-auto
sudo chmod 0755 /usr/local/bin/certbot-auto

Get Started

$ sudo /usr/local/bin/certbot-auto --nginx

If you want to manually change the Nginx configuration, you can use the certonly subcommand:

$ sudo /usr/local/bin/certbot-auto --nginx certonly
Certbot installed to the default webserver directory.

Since my webserver is not the default installation directory, I will report the following error here:

The error was: NoInstallationError("Could not find a usable 'nginx' binary.

Can create two symlinks to resolve this issue

ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx
ln -s /usr/local/nginx/conf/ /etc/nginx

Automating renewal

$ sudo /usr/local/bin/certbot-auto renew --dry-run

Add cron job

10 1 * */2 * python -c 'import random; import time; time.sleep(random.random() * 3600)' && /usr/local/bin/certbot-auto renew 

Add a Comment

Your email address will not be published. Required fields are marked *