How to create Let’s Encrypt SSL certificates with acme.sh on Linux – Guide

Installing SSL certificates isn’t difficult, but it’s a process every Linux administrator will have to take on at some point in their career. One of the most popular methods of obtaining and installing SSL certificates on Linux is through Let’s Encrypt, which is a certificate authority that offers free automated SSL and TLS certificates. And Let’s Encrypt is not at all challenging to use. But there is an even easier way, one that has no dependencies or requirements. The acme.sh script is written in Shell and supports more DNS providers than other similar clients. This means you can get your SSL / TLS certificates faster and easier. I will show you how to get and use acme.sh on Linux, so you can start working with SSL without the hassle.

what will you need

To get started with acme.sh, you’ll need a running instance of Linux (the distribution doesn’t matter as acme.sh should work on almost every type of Linux available). This will preferably be the server on which you want to install SSL certificates (otherwise, up have to move them). That’s it. let’s get this up and running.

How to get acme.sh

There are several ways to get the acme.sh script installed on your Linux machine. I will show you how to do this using curl or wget. The curl command is: curl https://get.acme.sh | sh The wget command is: wget -O – https://get.acme.sh | sh After running any of the commands, you need to source your .bashrc with: source ~ / .bashrc To verify the installation, issue the command: acme.sh -version You should see the installed script version printed. Finally, enable automatic upgrade of the acme.sh script with the command: acme.sh –upgrade –auto-upgrade

How to issue an SSL certificate with acme.sh

And now we will issue an SSL certificate on a web server for a single domain. We’ll use the example.com domain to illustrate. The command for this is: acme.sh –issue -d example.com –webroot /var/www/example.com Of course, you will change example.com to your server’s domain as well as change /var/www/example.com to the document root. If you have multiple domains associated with this server (such as for email, FTP and www), you can issue the command: acme.sh –issue -d example.com -d www.example.com -d mail.example.com -d ftp.example.com –webroot /var/www/example.com –keylength LENGTH Where LENGTH is one of the following values ​​for keylength: You can also issue an SSL certificate in standalone mode (if you don’t have a web server) with the command: acme.sh –issue -d example.com –standalone Again, replace example.com with your domain.

How to copy the certificates to the proper location in the local storage

With these certificates issued, you will need to install them in the proper location for your web server. Let’s say you are using Apache as your web server and the location for your certificates is / etc / ssl / certs. To do this, you would issue the command: acme.sh –install-cert –domain example.com –cert-file /etc/ssl/certs/cert.pem –key-file /etc/ssl/certs/keyfile/key.pem –fullchain-file / etc / ssl /certs/fullchain/fullchain.pem –reloadcmd “sudo systemctl reload apache2.service” Be sure to change example.com for your domain.

How to renew your certificate

As you know, SSL certificates expire. To renew these certificates with acme.sh, you would issue the command. acme.sh –renew -d example.com –force Be sure to change example.com for your domain. And that’s it for issuing and installing SSL certificates with acme.sh on Linux. You will probably find this tool a little easier to use than Let’s Encrypt, as well as being a little more universal, so it can be installed on almost any Linux distribution.

Final note

I hope you like the guide How to create Let’s Encrypt SSL certificates with acme.sh on Linux. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.

How to create Let s Encrypt SSL certificates with acme sh on Linux  2022  - 84How to create Let s Encrypt SSL certificates with acme sh on Linux  2022  - 77How to create Let s Encrypt SSL certificates with acme sh on Linux  2022  - 74How to create Let s Encrypt SSL certificates with acme sh on Linux  2022  - 8