There are some popular methods of generating SSL and TLS certificates in Linux. One of the most popular methods of issuing SSL certificates is Let’s encrypt which is a certificate authority that offers free SSL certificates. There is an even easier way to issue the certificate which does not require any dependencies and requirements. The script written in Shell makes it easy to generate and install SSL certificates in Linux systems. In this article, we will learn how to install the script in the Linux system and how to use it to generate and install SSL certificates. Installation

Installation of is a simple and straightforward process. Follow the steps below to install the application.

Method1 : Using curl command

$ curl | sh

Method2: Using git repository

$ git clone
$ cd ./
$ ./ --install

Once the installation is completed, run the following command to verify.

$ --version


Generate SSL Certificate

Generating SSL certificates using is a very simple process. Follow the steps below to generate the certificate.

Generate a certificate for a single domain using webroot mode.

$ --issue -d -w /home/wwwroot/

Generate a certificate for multiple domains in the same certificate

$ --issue -d -d -d -w /home/wwwroot/


/home/wwwroot/ is the webroot folder where the website file is hosted. Remember to give write access to the webroot folder. is the domain name I have used to generate SSL certificates. You can select your domain name accordingly.

All the domain names should be pointed to the same webroot directory.

The generated SSL certificate will be located in the directory ~/<domain-name>

Where domain-name is the directory created with your domain provided while generating the certificate.

Issue certificate using the standalone server

Use the following command to generate an SSL certificate using the standalone server.

For single domain

$ --issue --standalone -d

For multiple domain

$ --issue --standalone -d -d -d

Sudo or root user permission is needed to listen on TCP port 80. Port 80 must be free to listen on the server.

Generate SSL certificate using standalone SSL server

Use the following command to generate an SSL certificate using a standalone SSL server. In this example, I have used the domain for demonstration. Consider your own domain name while generating the certificate.

$ --issue --alpn -d -d -d

Sudo or root user permission is needed to listen on TCP port 443. Also, remember to free port 443 to be listened to, otherwise prompts will appear to free it.

Use apache mode to generate certificates

Webroot mode is recommended to generate an ssl certificate for running a web server. If apache is being used as a web server then Apache mode can be used to issue the certificate. This mode does not write any files to the webroot directory.

This mode needs to interact with Apache web server, so you need to have root/sudo privilege.

$ --issue --apache -d

The above command will generate only the certificate file. You need to point the certificate file directory in the apache configuration file to install the certificate.

Use nginx mode to issue the certificate

Particularly, if you are using nginx as a web server then nginx mode can be used instead of webroot mode. All you need to have is root/sudo privilege since this interacts with nginx web server. This mode will not write any files in the webroot directory.

$ --issue --nginx -d

The above command will generate the certificate only. You need to point the certificate file directory in the nginx configuration file to install.

Issue certificate for wildcard domain

Generating certificates for wildcard domains is easy. In the place of -d parament, use wildcard domain as:

$ --issue -d -d * --dns dns_cf

The –dns parameter specifies which DNS hoster you are using, dns_cf stands for cloudflare.

Renew Let’s Encrypt SSL Certificate with

During installation, it creates a cronjob to renew the SSL certificate every 60 days. So you don’t need to renew the certificate manually. However, you can renew the certificate with force option as:

$ --renew -d --force

To find the cron job, run the following command.

$ crontab -l cronjob


Log file directory

Log file of is located at the directory ~/ .Log file generation is not enabled by default. Make the following changes in the account.conf file.

$ cd ~/
$ vi account.conf log

Now use the following command to find the log file generated.

$ cd ~/
$ tail -f


In this article, we learned how to install script to generate SSL certificates in Linux systems. I showed you how to generate SSL certificates for multiple domains at once and how to renew SSL certificates.

How to Install and Use script to get free SSL Certificates on Linux

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn