M
M
mirexdoors2018-05-22 20:56:37
ubuntu
mirexdoors, 2018-05-22 20:56:37

How to get Let's Encrypt locally?

Hello! You need to get a Let's Encrypt certificate for the domain hosted on masterhost.ru. You cannot bind it from the panel, you can only upload the certificate file and key. Support offered to create a certificate and key locally and then upload them to the hosting.
I also have a VPS on the run. There I tried to create SSL as root via https://github.com/letsencrypt/letsencrypt, specifying the desired domain there, but when checking the database, it gives a MySQL Error.
Now the question itself: can I get the certificate and key file, for example, on OpenServer locally? Or is it possible to use some other service?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2019-04-13
@mirexdoors

0. Everything is done in the console of some local Linux or WSL for Windows 10.
1. Download getssl ( https://github.com/srvrco/getssl).

sudo mkdir /opt/getssl
sudo chown $USER:$USER /opt/getssl
curl https://raw.githubusercontent.com/srvrco/getssl/master/getssl --output /opt/getssl/getssl
chmod 700 /opt/getssl/getssl
2. Create a config for your site/domain sample.ru.
3. Change the config \opt\getssl\sample.ru\getssl.cfg to work with ftp/ssh on masterhost.
CA="https://acme-v01.api.letsencrypt.org"
SANS="www.sample.ru"
ACL=('ftp:u123456:p123456:u123456.ftp.masterhost.ru:/sample.ru/www/.well-known/acme-challenge')
USE_SINGLE_ACL="true"
4. Create a folder for the token /sample.ru/www/.well-known/acme-challenge on ftp masterhost
5. Run the script for obtaining a certificate
6. In the masterhost admin panel:
- "Domain characteristics" > "SSL support" > " add"/"change"
- "Upload your certificate"
- field "Certificate" - file /opt/getssl/sample.ru/sample.ru.crt
- field "Key" - file /opt/getssl/sample.ru/sample .ru.key
- "Add"/"Save"
7. Check https://sample.ru
PS Probably you will have to use passive mode to work with ftp - https://github.com/srvrco/getssl/pull/275

C
crazy-beard, 2019-03-20
@crazy-beard

If anyone else wanders into this senior post, look at the solution on blog.arost.ru/2016/12/get-https-for-free.html

P
Pavel, 2019-03-15
@webtime

Also interested. Is there any progress in resolving the issue?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question