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.

There is an easier way to get SSL / TLS certificates than using other similar clients. The acme.sh script is written in Shell and supports more DNS providers than other similar clients. This means you can get your certificates faster and easier.

I will show you how to use acme.sh on Linux so that 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

curl -L “acme.sh” https://raw.githubusercontent.com/acme/acme-sh/master/acme-sh wget -O acme.sh https://raw.githubusercontent.com/acme/acme-sh/master/acme-sh

curl https://get.acme.sh | sh -u $USER

wget -O - http://www.example.com/file.txt The -O option tells wget to output the file’s contents as a text file instead of a binary file.

Wget -O – https://get.acme.sh | sh

source ~/.bashrc

The .bashrc file is a configuration file for the bash shell. It can be used to customize the behavior of the shell. ..

sudo apt-get update sudo apt-get install ubuntu-desktop

Enable automatic upgrade of the acme.sh script with the command:

update-acme.sh

How to issue an SSL certificate with acme.sh

ssl-certificate -out example.com -in /etc/ssl/certs This will issue a SSL certificate for the example.com domain and store it in the /etc/ssl/certs directory.

Issue: acme.sh is not working D: example.com is not working

domain-name -d example.com document-root -o example.com

The acme.sh script issues an issue on example.com and www.example.com, stores the issue’s data on the webroot /var/www/example.com, and issues a keylength of LENGTH to the web server in order to encrypt the issue’s data.

Where LENGTH is one of the following values ​​for keylength: The length of a key is important for security reasons.

certutil -create -alias “ssl” -keystore “ssl/privkey.key” -out “ssl/cert.pem”

The acme.sh command issues an issue on example.com and prints the output as a standalone document.

Your website’s security is important. Here are some tips to help you protect your site. ..

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

openssl req -new -days 365 -nodes -out / etc / ssl / certs This will create a new file called certs.pem in your web server’s directory and issue the command to load it: load_certs

Install the Apache 2 server certificate and key files: 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 Replace the existing apache2.service with the new one: sudo systemctl reload apache2.service

When you register your domain, be sure to choose a name that is unique and descriptive. For example, if you are registering a domain name for your business, consider choosing a name that reflects your business or product. ..

How to renew your certificate

To renew your SSL certificates with acme.sh, you would issue the command.

Renew the domain example.com using force. ..

The domain example.com is not the best domain for your website. You should change it to the main pointdomain.com so that your website will be more visible and search engine friendly.

SSL certificates are a way to protect your online identity and security. With acme.sh, you can issue and install SSL certificates on your Linux system. This tool is easier to use than Let’s Encrypt, and can be installed on almost any Linux distribution.

Final note

This guide will show you how to create SSL certificates with the acme.sh tool on Linux. If you have any questions about this article, please feel free to ask us in the comments below. Additionally, please share this article with your friends if you enjoyed it! ..