-
-
Save iamshreeram/a67abbbd23d56d058786c5530834086b to your computer and use it in GitHub Desktop.
# Installation of SSL Certificate | |
## Enable SSH : | |
ssh [email protected] -p 65002 | |
## Download acme-client | |
git clone https://github.com/kelunik/acme-client | |
## Install composer | |
``` | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; | |
php composer-setup.php; | |
php -r "unlink('composer-setup.php');"; | |
php composer.phar install --no-dev | |
``` | |
## Generating SSL | |
php bin/acme setup --server letsencrypt --email [email protected] | |
php bin/acme issue --domains yourdomain.com:www.youdomain.com --path /home/x123011738/public_html:/home/x123011738/public_html --server letsencrypt | |
Certificate : `/home/x123011738/acme-client/data/certs/acme-v01.api.letsencrypt.org.directory/yourdomain.com/fullchain.pem` | |
private key : `/home/x123011738/acme-client/data/certs/acme-v01.api.letsencrypt.org.directory/yourdomain.com/key.pem` | |
## [Add CRT and privatekey in hostinger] | |
## Checking expiration date and renewing SSL certificate | |
php acme-client/bin/acme check --name yourdomain.com --server letsencrypt | |
## Automatically renew Let’s Encrypt SSL certificate with cron job | |
php acme/acme-client/bin/acme issue --domains yourdomain.com:www.yourdomain.com --path /home/x123011738/public_html:/home/x123011738/public_html --server letsencrypt |
Just copy and paste line by line, just replace x123011738 by your user in Hostinger
Hi, the code in line 14 return a erro. say that composer.json is not installed. Do you know how it can fixed?
this code is old. it hasn't been working
Installation Steps in here was created two years back. I have made this as a github repository . If any one is interested in fixing the commands, here is the issue . Feel free to fix and raise a PR. Thanks!
need to put composer.json from acme-client
this code works like a charm, just add the "--agree-terms" flag on line 18 and adapt the personal data on the following lines
note also that today, path to cert and pem are to acme-v02.api.letsencrypt.org.directory folder, according to the current acme version
Working on 26 June 2022
Installation of SSL Certificate
Enable SSH :
ssh [email protected] -p 65002
Download acme-client
git clone https://github.com/kelunik/acme-client
Change directory to acme client
cd acme-client
Install composer inside acme-client directory, needs your php version to be 7.4
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');";
php composer-setup.php;
php -r "unlink('composer-setup.php');";
php composer.phar install --no-dev
Generating SSL
php bin/acme setup --server letsencrypt --email [email protected] --agree-terms
php bin/acme issue --domains yourdomain.com:www.youdomain.com --path /home/x123011738/public_html:/home/x123011738/public_html --server letsencrypt
Update 26/6/22 Certificates are stored in acme-v02.api instead of v01
Certificate : /home/x123011738/acme-client/data/certs/acme-v02.api.letsencrypt.org.directory/yourdomain.com/fullchain.pem
private key : /home/x123011738/acme-client/data/certs/acme-v02.api.letsencrypt.org.directory/yourdomain.com/key.pem
[Add CRT and privatekey in hostinger]
Checking expiration date and renewing SSL certificate
php acme-client/bin/acme check --name yourdomain.com --server letsencrypt
Automatically renew Let’s Encrypt SSL certificate with cron job
php acme/acme-client/bin/acme issue --domains yourdomain.com:www.yourdomain.com --path /home/x123011738/public_html:/home/x123011738/public_html --server letsencrypt
Hello Brother,
Can you please explain how I can use this script?