Generate portable TLS certificate files

Once, I needed valid TLS certificate files of a domain, which ran on a shared hosting. The webspace had a certificate from Letsencrypt, but the hoster did not allow to download it.

The solution, I found, was the nice bash script acme.sh. It's very lightweight and has multiple advantages: There is no root access or installation required, and it supports multiple providers.

The only requirements, I found:

Here are the simple steps, I had to do:

# download and make file executable
wget https://github.com/acmesh-official/acme.sh/raw/refs/heads/master/acme.sh
chmod +x acme.sh

# create certification files
./acme.sh --issue --server letsencrypt --keylength 2048 -d example.com -d www.example.com -w ~/htdocs/

The script automatically created the authentication files in your web root and does all the required communication with the TLS provider. Several key types and lenghts are supported.

Please check https://github.com/acmesh-official/acme.sh/ for all the numerous configuration parameters.